Correlation Coefficient Calculator

Calculate Pearson correlation between two variables, with significance testing.

What the Correlation Coefficient Calculator does

The Pearson correlation coefficient measures the strength and direction of a linear relationship, running from −1 to +1. Its square, r², gives the proportion of variance in one variable explained by the other.

Formula

  • r = Σ((x − x̄)(y − ȳ)) ÷ √(Σ(x − x̄)² × Σ(y − ȳ)²)
  • r² = Coefficient of determination
  • t = r × √((n − 2) ÷ (1 − r²))

Inputs explained

InputUnitRequiredNotes
X valuestextYesSeparate values with commas, spaces or new lines.
Y valuestextYesSeparate values with commas, spaces or new lines.

How to use it

  1. Enter X values and Y values.
  2. Select Calculate.

Worked example

X values 1–5 against Y values 2.1, 4.3, 6.2, 8.1, 9.8.

X
1, 2, 3, 4, 5
Y
2.1, 4.3, 6.2, 8.1, 9.8

r ≈ 0.9990, r² ≈ 0.9979 — an almost perfect positive linear relationship.

Reading the result

  • The p-value tests whether r differs from zero, not how strong the relationship is — with a small sample even a fairly large r can miss significance, and with a large sample a tiny, practically meaningless r can still be "significant," so |r| and the p-value need reading together.

Assumptions and limitations

  • Pearson r only measures linear association — the notes state a perfect parabola can give r near zero, so a genuinely strong non-linear pattern can look deceptively weak here.
  • The significance test assumes independent observations — repeated measurements on the same subject, or an autocorrelated time series, would make the reported p-value unreliable even if r itself is computed correctly.

Common mistakes

  • Treating "statistically significant" as synonymous with "strong" or "meaningful" — the FAQ makes this point directly.
  • Computing correlation without checking for outliers first — a single extreme point can swing r substantially, especially with a small sample like the one in this example.

Frequently asked questions

What does a negative correlation mean?

That the variables move in opposite directions — as one rises, the other tends to fall. The strength depends on the absolute value, not the sign.

Is a significant correlation meaningful?

Statistical significance only says the correlation is unlikely to be zero. With a large enough sample, trivially small correlations become significant without being important.

Related calculators