Statistics

Correlation Coefficient Calculator (Pearson’s r)

Measure how strongly two lists of numbers move together in a straight line — and why a strong correlation never proves one causes the other.


Correlation Coefficient Calculator (Pearson’s r)

Advertisement

Correlation measures how strongly two lists of paired numbers move together in a straight-line sense. This computes Pearson’s r from your data, and explains what the number can and cannot tell you.

How it works

Pearson’s correlation coefficient

r = Σ((x−x̄)(y−ȳ)) / √(Σ(x−x̄)² × Σ(y−ȳ)²)

r ranges from −1 (perfect inverse relationship) to +1 (perfect direct relationship), with 0 meaning no straight-line pattern was found.

Correlation is not causation

A strong r tells you the two lists move together — nothing about why. Ice cream sales and drowning incidents correlate strongly across a year, because both rise with summer heat; neither causes the other. This is the single most important limitation of this number, and it applies regardless of how strong the correlation is.

r measures straight-line association specifically

Two lists related by a perfect curve — y = x² over a range symmetric around zero, say — can produce an r close to zero, because Pearson’s r only detects the linear component of a relationship. A near-zero r means “no straight-line pattern found,” not “these two things have nothing to do with each other.”

How to use this calculator

  1. Enter your X values, separated by commas, spaces or new lines.
  2. Enter the matching Y values, in the same order.
  3. Read r, and the plain-language description of its strength and direction.

Frequently asked questions

What counts as a “strong” correlation?

There is no universal cutoff, but a common rough guide treats |r| above 0.7 as strong, 0.4 to 0.7 as moderate, and below 0.1 as negligible. Context matters enormously — an r of 0.3 can be meaningful in a noisy real-world dataset and unremarkable in a controlled experiment.

Why does a negative r not mean “worse” or “less correlated”?

A negative r means the two lists move in opposite directions — one rises as the other falls — which is just as strong a relationship as a positive r of the same magnitude. −0.9 is a stronger relationship than +0.3, not a weaker one.

What happens if one list has no variation at all?

Correlation is undefined — if every X value (or every Y value) is identical, there is no straight-line relationship to measure at all, and this calculator declines the case rather than dividing by zero.

Do the two lists need to be the same length?

Yes, and each position needs to be a genuine matched pair — the first X value paired with the first Y value, and so on. Mismatched lengths are declined rather than silently truncated to the shorter list.

Should I trust a correlation from a very small dataset?

Be cautious — with very few points, a strong-looking r can appear by chance alone. Formal hypothesis testing (checking whether r is significantly different from zero) accounts for sample size properly; this calculator reports r itself without that additional check.

Be the first to rate this

Written by

J. Adeyemi

Statistics writer

J. Adeyemi writes the statistics and probability calculators, from descriptive summaries through to distributions and conditional probability. The recurring theme is scope: each page states precisely which question it answers, because most statistical mistakes come from applying a correct formula to the wrong question. Related-but-different measures get separate pages rather than being quietly merged.

Reviewed by

K. Novak

Calculator reviewer — statistics

K. Novak reviews the statistics and probability calculators, checking formula correctness and the scope boundary each page draws around itself. Closely related measures are routinely confused with one another, so review confirms that a page computing one of them says clearly that it is not computing the others.

How we write and review

Related calculators