Statistics & Probability

Correlation Coefficient Calculator (Pearson r)

Enter paired X and Y values to measure how strongly they move together.

Your numbers

Separate numbers with commas, spaces or new lines. You can paste a column from a spreadsheet.
Separate numbers with commas, spaces or new lines. You can paste a column from a spreadsheet.

Your results

Correlation coefficient r
Correlation coefficient r
—
Coefficient of determination r²
—
Strength
—
Sample covariance
—
Pairs
—

Correlation Coefficient Calculator (Pearson r) by TheCalcTools

How the Correlation Coefficient Calculator (Pearson r) works

Pearson’s r measures the strength of a straight-line relationship between two variables, from −1 (perfect negative) through 0 (none) to +1 (perfect positive).

It is the covariance of X and Y divided by the product of their standard deviations. r² is the share of the variation in Y that a straight line through X explains.

The strength labels used here (0.3, 0.5, 0.7, 0.9) are common rules of thumb; fields differ in what they call strong.

The formula

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

Worked example

Using the default values shown in the calculator:

X values1, 2, 3, 4, 5, 6
Y values (same order)2.1, 3.9, 6.2, 7.8, 10.1, 12.2
  1. The six pairs rise together almost perfectly.
  2. r = 0.9991, so r² = 0.9982: the straight line explains about 1.00 of the variation in Y.

Result:

Correlation coefficient r0.9991
Coefficient of determination r²0.9982
StrengthVery strong positive
Sample covariance7.0700
Pairs6

Frequently asked questions

Does correlation mean causation?

No. Two variables can move together because a third factor drives both, or by coincidence. Correlation is evidence of a relationship, not of what causes it.

What if the relationship is curved?

Pearson’s r only captures straight-line relationships. A strong curved pattern can give a low r. Plot the data first.

Sources and further reading

More in Statistics & Probability · All calculators

This calculator gives estimates for information only. Check important results independently before you rely on them. See our disclaimer.