Pearson Correlation Coefficient Calculator
Enter two lists of numeric values (same length) to calculate Pearson’s r.
Accepted separators: commas, spaces, semicolons, or new lines.
What is a correlation coefficient?
The correlation coefficient is a number that describes how strongly two variables move together in a linear way. It is commonly represented by r and ranges from -1 to +1.
- +1 means a perfect positive linear relationship.
- 0 means no linear relationship.
- -1 means a perfect negative linear relationship.
In practical terms, if one variable tends to increase when the other increases, correlation is positive. If one variable tends to decrease as the other increases, correlation is negative.
How to use this calculator
Step-by-step
- Enter your first dataset in the X values box.
- Enter the matching dataset in the Y values box.
- Make sure both lists contain the same number of observations.
- Click Calculate Correlation.
The tool returns Pearson’s r, the coefficient of determination (R2), and a quick interpretation of direction and strength.
The formula behind Pearson’s r
Pearson correlation is computed as:
r = Σ[(xi - x̄)(yi - ȳ)] / √(Σ(xi - x̄)2 × Σ(yi - ȳ)2)
Where:
- xi, yi are paired observations
- x̄, ȳ are sample means
- The numerator measures shared variation
- The denominator rescales values to keep r between -1 and +1
How to interpret your result
A useful quick interpretation framework:
- 0.00 to 0.19: very weak
- 0.20 to 0.39: weak
- 0.40 to 0.59: moderate
- 0.60 to 0.79: strong
- 0.80 to 1.00: very strong
Use absolute value for strength and sign (+/-) for direction.
Important caveats
1) Correlation is not causation
A high correlation does not prove one variable causes the other. There may be confounding factors, reverse causality, or coincidence.
2) Outliers can distort correlation
A single extreme point can greatly inflate or reduce r. Always inspect your data with a scatter plot when possible.
3) Pearson measures linear relationships
If the relationship is curved (nonlinear), Pearson’s r may be low even when variables are strongly related in another pattern.
When to use Spearman instead
If your data are ordinal, highly skewed, or full of outliers, a rank-based metric such as Spearman’s rho may be more appropriate. Pearson is best for roughly linear relationships with interval/ratio data.
Quick practical example
Suppose you track weekly study hours and quiz scores for a group of students. If r = 0.74, that indicates a strong positive linear relationship: more study hours are generally associated with higher quiz scores. If R2 = 0.55, then about 55% of score variation is associated with linear variation in study time.
FAQ
What is a “good” correlation coefficient?
It depends on context and field. In behavioral data, 0.3 may be meaningful. In engineering data, you may need much higher values.
Can I use negative values?
Yes. Negative numbers are fully valid in both X and Y datasets.
Why am I getting an error about zero variation?
If all X values (or all Y values) are identical, standard deviation is zero and Pearson correlation is undefined.
Final thought
This correlation coefficient calculator is a fast way to quantify linear association. Use it as a starting point, then pair results with visualization and domain knowledge for stronger conclusions.