🔒 100% private — runs in your browser, nothing is uploaded

Pearson Correlation Coefficient Calculator

Pearson’s r, r² and the best-fit line for paired data — with the causation warning built in.

Pearson’s r is the covariance of two variables scaled by their standard deviations, which pins it between −1 (a perfect downward line) and +1 (a perfect upward line), with 0 meaning no linear association. The scaling is what makes it unit-free: hours-versus-marks and centimetres-versus-kilograms are comparable on the same axis. The worked pair on this page, X = (1, 2, 3, 4, 5) against Y = (2, 3, 5, 4, 6), gives r = 0.9 exactly — the cross-products sum to 9 and both squared-deviation sums are 10 — a strong positive association with r² = 0.81, read as “81% of the variance in Y is linearly accounted for by X”, not “X causes 81% of Y”.

Pearson’s r measures straight-line association only, it assumes the pairs are independent, and a single wild outlier can drag it a long way. A strong r is not evidence that X causes Y — and a near-zero r does not rule out a strong curved relationship. Plot your data before you quote the number.

Quick answers

How do you calculate Pearson’s correlation coefficient?

Divide the sum of (x − x̄)(y − ȳ) products by the square root of the product of the two squared-deviation sums. For X = (1,2,3,4,5), Y = (2,3,5,4,6) that is 9 ÷ √(10 × 10) = 0.9.

r runs from −1 to +1 and measures linear association only. A constant list makes it undefined (zero spread), and this calculator refuses that case explicitly.

Does a strong correlation prove causation?

No. r = 0.9 can arise from a confounder driving both variables, from causation running the other way, or occasionally from chance — correlation alone cannot distinguish these. Design (controls, randomisation, timing) is what supports causal claims.

Treat a strong r as a reason to investigate a relationship, never as the conclusion of the investigation. That caution applies to every correlation quoted anywhere, not just here.

How to use

  1. Paste the X values into the first box and the Y values into the second, in pairing order — row 1 of X goes with row 1 of Y.
  2. Check the counts match; correlation works on pairs and the page refuses mismatched lists with the counts shown.
  3. Read r (from −1 to +1), r² and the least-squares line fitted through the pairs.
  4. Before quoting r anywhere, plot or at least eyeball the pairs: one outlier or a curve can make the number lie with a straight face.

About this tool

The assumptions deserve equal billing. Pearson’s r measures straight-line association only: a perfect parabola can return r ≈ 0 while being perfectly predictable. It assumes independent pairs, is most at home with roughly interval-scale, roughly bivariate-normal data, and is notoriously movable by a single outlier, which can manufacture or destroy an apparent correlation on its own. Above all, correlation is not causation — a third variable, reverse causation or coincidence can all produce a handsome r. This page computes r exactly and reports the fitted line; what the number licenses you to conclude depends on how the data were gathered, which no calculator can inspect.

Frequently asked questions

What does an r of 0.9 mean?

A strong positive linear association: as X rises, Y tends to rise, and the pairs sit close to an upward straight line. Its square, 0.81, is the share of Y’s variance linearly accounted for by X. It does not mean X causes Y, nor that the relationship is 90% of anything.

Can r be exactly 1 or −1?

Yes — when every pair lies exactly on a straight line. Y = (2, 4, 6, 8) against X = (1, 2, 3, 4) gives r = 1; the same points in reverse give r = −1. Real measured data almost never sits exactly on a line, so exact ±1 in real data usually means one variable was derived from the other.

Why does the page refuse a constant list?

A constant list has zero spread, and r divides by the product of the two spreads — division by zero. Conceptually it also makes sense: something that never varies cannot co-vary. The page names the problem instead of printing NaN or a fake zero.

What if my relationship is curved?

Pearson’s r will under-report it, possibly all the way to zero for a symmetric curve. If a plot shows a bend, Spearman’s rank correlation (which detects any monotonic relationship) or fitting the curve itself is the right tool; a low Pearson r is not evidence of “no relationship”.

📦 Embed this tool on your site

<iframe src="https://verystep.com/embed/pearson-correlation-coefficient-calculator/" title="Pearson Correlation Coefficient Calculator" width="100%" height="520" loading="lazy" style="border:0"></iframe>

Free to use. The embed shows a small "Powered by Verystep" link.

First time embedding? Read the step-by-step guide →

More free tools