Correlation coefficient calculator
Paste two columns of numbers to get Pearson’s r, what it means in plain English, r², the t statistic and a scatter plot of your data.
Two columns pasted from a spreadsheet, or “x, y” per line. A header row is optional. 12 valid pairs.
| r | 0.987 |
|---|---|
| Interpretation | very strong positive linear relationship |
| r² | 0.9743 |
| t statistic (df = 10) | 19.456 |
| n | 12 |
| Mean x · mean y | 4.875 · 70.9167 |
| SD x · SD y (sample) | 2.4966 · 12.7597 |
Want to style and download this chart? Open the scatter plot maker.
How r is calculated
r = Σ(x − x̄)(y − ȳ) ÷ √[Σ(x − x̄)² · Σ(y − ȳ)²]
The top adds up how much x and y move together around their means; the bottom scales it so the answer is always between −1 (perfect downhill line) and +1 (perfect uphill line). 0 means no linear relationship. A curved pattern can still have r near 0.
To test significance, t = r√(n − 2) ÷ √(1 − r²) with n − 2 degrees of freedom. Compare it to a t table or use statistics software for the p-value.
Need the line itself? Use the linear regression calculator.
Drag a point, watch the best-fit line react
The line is placed so the total area of the yellow squares — the squared vertical errors — is as small as possible. Drag points up or down (or focus one and use the arrow keys).
y = 0.84x + 1.193 · r = 0.95 · squared error = 1.33
Questions
What is a strong correlation?
A common rule of thumb: |r| ≥ 0.7 strong, 0.5–0.7 moderate, 0.3–0.5 weak, below 0.3 very weak or none. Conventions vary by field.
Does correlation prove causation?
No. Two variables can move together because a third factor drives both, or by coincidence. Correlation shows association only.
What is the difference between r and R²?
r (−1 to 1) shows the direction and strength of a linear relationship. R² (0 to 1) is r squared: the share of variation in y explained by a straight line through x.
Which correlation does this calculate?
Pearson’s product-moment correlation coefficient, the standard measure of linear association. It is the same as Excel’s CORREL and PEARSON functions.