Home › Statistics & Probability Calculators › Pearson Correlation Coefficient Calculator
Pearson Correlation Coefficient Calculator
Pearson’s correlation coefficient r measures the strength and direction of the linear relationship between two numeric variables, from −1 (perfect negative) through 0 (no linear relationship) to +1 (perfect positive). Enter paired x and y values and the calculator computes r from the deviation products, along with r², the share of variation in y that a straight line on x explains.
It then tests whether the correlation is significantly different from zero using t = r√[(n − 2)/(1 − r²)] with n − 2 degrees of freedom, reporting the p-value, critical value and a plain-language conclusion for the alternative you chose. A confidence interval for the population correlation ρ is computed with the Fisher z transformation when n exceeds 3.
Correlation describes association, not causation, and it only captures straight-line relationships. For ranked or non-linear monotonic data use the Spearman correlation; to get the equation of the line itself, use the linear regression calculator, and plot the points with the scatter plot maker first.
Separate values with commas, spaces or new lines.
Separate values with commas, spaces or new lines.
Result and step-by-step solution
- Meansx̄ = 7.625, ȳ = 70.875 (n = 8)
- Deviations and products
x y x − x̄ y − ȳ (x − x̄)(y − ȳ) (x − x̄)² (y − ȳ)² 2 55 −5.625 −15.875 89.2969 31.6406 252.0156 4 60 −3.625 −10.875 39.4219 13.1406 118.2656 5 64 −2.625 −6.875 18.0469 6.8906 47.2656 7 70 −0.625 −0.875 0.5469 0.3906 0.7656 8 71 0.375 0.125 0.0469 0.1406 0.0156 10 78 2.375 7.125 16.9219 5.6406 50.7656 12 85 4.375 14.125 61.7969 19.1406 199.5156 13 84 5.375 13.125 70.5469 28.8906 172.2656 - SumsΣ(x − x̄)(y − ȳ) = 296.625; Σ(x − x̄)² = 105.875; Σ(y − ȳ)² = 840.875
- Correlation coefficientr = Σ(x − x̄)(y − ȳ) ÷ √[Σ(x − x̄)² × Σ(y − ȳ)²] = 296.625 ÷ √(105.875 × 840.875) = 0.9941
- Significance testH₀: ρ = 0 H₁: ρ ≠ 0 (two-tailed test)
t = r√[(n − 2)/(1 − r²)] = 0.9941 × √(6 ÷ 0.0117) = 22.5168, df = 6; p = < 0.0001 - Decisionp = < 0.0001 < α = 0.05. critical values ±2.4469 (reject when |t| > 2.4469).
| 95% CI for ρ (Fisher z) | 0.9666 to 0.999 |
|---|
Frequently asked questions
- What is a strong correlation?
- Guidelines vary by field, but |r| above 0.7 is usually called strong, 0.4–0.7 moderate and below 0.3 weak. Always look at the scatter plot as well; outliers can inflate or hide r.
- How is the p-value for r calculated?
- From a t statistic, t = r√[(n − 2)/(1 − r²)], compared with the t distribution on n − 2 degrees of freedom. This is what SciPy, R and Excel’s regression output use.
- Does correlation imply causation?
- No. A strong r can come from a third variable influencing both, from reverse causation, or from coincidence in small samples.
- What is r squared?
- The coefficient of determination: the proportion of the variance in y explained by the linear relationship with x. An r of 0.8 gives r² = 0.64, or 64%.
Last reviewed: September 25, 2026. Calculations run in your browser and were validated against SciPy.
