Skip to content
LoveToCalc

Definition — what does that mean?

Correlation coefficient

How closely two lists move together in a straight line, from −1 to 1.

In Swedish: Korrelationskoefficient

Correlation coefficient

The relation

r=Σ(xi−x)(yi−y)(Σ(xi−x)²)(Σ(yi−y)²)

How closely two paired lists move together, from −1 (a perfect falling line) to 1 (a perfect rising one), with 0 no straight-line relationship at all.

Separate the numbers with spaces, commas or semicolons, for example 2.5, 4, 7

Separate the numbers with spaces, commas or semicolons, for example 2.5, 4, 7

r≈0.7746

r equals (((1 minus 3) times (2 minus 4)) plus ((2 minus 3) times (4 minus 4)) plus ((3 minus 3) times (5 minus 4)) plus ((4 minus 3) times (4 minus 4)) plus ((5 minus 3) times (5 minus 4))) divided by the square root of (((1 minus 3) squared plus (2 minus 3) squared plus (3 minus 3) squared plus (4 minus 3) squared plus (5 minus 3) squared) times ((2 minus 4) squared plus (4 minus 4) squared plus (5 minus 4) squared plus (4 minus 4) squared plus (5 minus 4) squared)), equals ((−2 times (−2)) plus ((−1) times 0) plus (0 times 1) plus (1 times 0) plus (2 times 1)) divided by the square root of (((−2) squared plus (−1) squared plus 0 squared plus 1 squared plus 2 squared) times ((−2) squared plus 0 squared plus 1 squared plus 0 squared plus 1 squared)), equals (4 plus 0 plus 0 plus 0 plus 2) divided by the square root of ((4 plus 1 plus 0 plus 1 plus 4) times (4 plus 0 plus 1 plus 0 plus 1)), equals 6 divided by the square root of (10 times 6), equals 6 divided by the square root of (60), is approximately 6 divided by 7.746, is approximately 0.7746

Working7 steps

What the formula says

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

The correlation coefficient measures how closely two paired lists follow a straight line. x and y are the lists, in pairs: the first x value goes with the first y value. r always lies between −1 and 1. Near 1 the relationship is a rising line, near −1 a falling one, and near 0 there is no straight-line relationship. The formula is a definition, and it is often called Pearson’s r.

The numerator grows large and positive when x and y lie above their means at the same time and below them at the same time. The denominator scales away the units and the spread, so r does not change if x is measured in centimetres rather than metres.

Worked examples

Five pairs. x = 1, 2, 3, 4, 5 and y = 2, 4, 5, 4, 5. The means are x̄ = 3 and ȳ = 4. The deviations are −2, −1, 0, 1, 2 for x and −2, 0, 1, 0, 1 for y.

A clear but not perfect rising relationship: y grows with x, but the points do not lie on a line.

A perfect line. If y = 2x for every pair, r = 1, however steep the line. r measures how close to the line the points lie, not how steep it is.

Common mistakes

Common questions

What does a correlation of exactly 1 or −1 mean? That every point lies exactly on a straight line, rising at 1 and falling at −1. In measured data it almost never happens, and when it does, check whether the same thing was measured twice or one list was computed from the other.

Does correlation prove causation? No. Two lists can move together because one affects the other, because both are affected by something else, or by chance. The correlation only says that they move together.

How is this related to the least-squares line? The least-squares line is the line r measures the distance to. Its slope is r times the ratio of the y list’s standard deviation to the x list’s. For the example above that comes to 0.6.

Looking for another letter? The formula solved for each one
Solved for each letter
Solve forRearrangedWith the numbersComes to
rΣ(xi−x)(yi−y)(Σ(xi−x)²)(Σ(yi−y)²)(1−3)(2−4)+(2−3)(4−4)+(3−3)(5−4)+(4−3)(4−4)+(5−3)(5−4)((1−3)²+(2−3)²+(3−3)²+(4−3)²+(5−3)²)((2−4)²+(4−4)²+(5−4)²+(4−4)²+(5−4)²)0.7746

Last reviewed October 6, 2026 ·How pages are reviewed

Read more in articles

Statistics and probabilityAll formulas

Put this formula on your site

Copy the code into your page where the formula card should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.