Correlation Coefficient Calculator

Pearson r from paired data, with r squared and the direction of the relationship.

Pearson r
Adjust the inputs

Your result updates live as you type.

Pearson correlation measures how closely two variables move together on a scale from minus one to plus one. It is the covariance divided by the product of the two standard deviations, which strips out the units and leaves a pure measure of linear association.

Two cautions apply throughout. First, r only detects straight-line relationships: a perfect parabola can return a correlation of zero. Second, and more famously, correlation is not causation — two series can move together because one drives the other, because something else drives both, or by sheer coincidence over a short window. The coefficient of determination, r squared, is often the more honest figure to quote, since it states the share of variance actually accounted for.

Below the calculator sits the what each value of r accounts for table: 8 rows — 0.1 at one end, 0.99 at the other — which is usually faster than entering a value you have seen before. The page opens with x values already set to 1, 2, 3, 4, 5, 6, 7, 8, so there is a finished result on screen before anything is typed. The 4 bands (strong negative at one end, strong positive at the other) exist to answer the question a number on its own cannot: is this high, low or ordinary? Independent Events Probability Calculator and Margin of Error Calculator are the nearest neighbours to this one.

The formula

r = Σ((x−x̄)(y−ȳ)) ÷ √(Σ(x−x̄)2 Σ(y−ȳ)2)
x, y
The paired observations
x̄, ȳ
The two means
r
Pearson correlation coefficient
Share of variance explained

How it works, step by step

  1. Paste your x values, separated by commas or spaces.
  2. Paste the matching y values in the same order.
  3. The gauge shows Pearson r.
  4. The r squared value and best-fit slope appear below.

Worked examples

Eight near-linear pairs

The correlation is 0.999143, so r squared is 0.998286 — about 99.83% of the variance in y is explained. The best-fit slope is 2.0095.

Where r misses the pattern

For x = −3 to 3 against y = x squared, the covariance sum is exactly 0, so r is 0 despite a perfect deterministic relationship. Pearson only sees straight lines.

Checking the 0.8 row

The reference table lists Pearson r = 0.8, giving r squared: 0.6400, Variance explained: 64.00%, Variance unexplained: 36.00%. Entering that above should reproduce the same figures — if it does not, the input is being read differently to the way the table assumes.

How to read your score

—–-0.5Strong negativeThe two variables move firmly in opposite directions.
-0.5–0.3Weak or noneLittle linear association in either direction.
0.3–0.7Moderate positiveA real but noisy relationship.
0.7–—Strong positiveThe variables track each other closely.

Frequently asked questions

What counts as a strong correlation?

It depends on the field. Physics might treat 0.95 as poor while social science treats 0.4 as notable. Judge against typical results in your own domain.

Should I report r or r squared?

r squared is usually more informative, because it states the share of variance explained. An r of 0.5 sounds substantial until you note it accounts for only a quarter of the variation.

Does a correlation of zero mean the variables are unrelated?

No. It means no linear relationship. Curved, cyclical or threshold relationships can all produce an r near zero, which is why plotting the data first matters.

How many pairs do I need?

At least two for the arithmetic to work, but small samples produce wildly unstable correlations. Thirty pairs is a reasonable minimum before taking a value seriously.

What do the bands under the pearson r mean?

They label the figure so it can be read without a reference point of your own: Strong negative up to -0.5; Weak or none from -0.5 to 0.3; Moderate positive from 0.3 to 0.7; Strong positive from 0.7 upwards. The band is a reading aid only — the number itself is exact, and a value sitting just over a boundary is not meaningfully different from one just under it.

What formula does the Correlation Coefficient Calculator use?

It computes r = Σ((x−x̄)(y−ȳ)) ÷ √(Σ(x−x̄)^2 Σ(y−ȳ)^2), where x, y is the paired observations; x̄, ȳ is the two means; r is pearson correlation coefficient; r² is share of variance explained. The same expression is printed on the page above the inputs, so the result can be reproduced by hand or in a spreadsheet.

Correlation and variance explained

What each value of r accounts for
Pearson rr squaredVariance explainedVariance unexplained
0.10.01001.00%99.00%
0.30.09009.00%91.00%
0.50.250025.00%75.00%
0.70.490049.00%51.00%
0.80.640064.00%36.00%
0.90.810081.00%19.00%
0.950.902590.25%9.75%
0.990.980198.01%1.99%

A correlation of 0.7 still leaves half the variation unaccounted for.

Related calculators