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.

Pearson correlation coefficient
r0.987
Interpretationvery strong positive linear relationship
r²0.9743
t statistic (df = 10)19.456
n12
Mean x · mean y4.875 · 70.9167
SD x · SD y (sample)2.4966 · 12.7597
4050607080901000246810(1, 52)(2, 55)(2.5, 61)(3, 58)(4, 67)(4.5, 70)(5, 74)(6, 73)(6.5, 80)(7, 84)(8, 86)(9, 91)y = 5.045x + 46.324 R² = 0.974xy

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.