Correlation Coefficient Calculator

The correlation coefficient r measures how closely paired numbers follow a straight line: r = Σ(x − x̄)(y − ȳ) ÷ √[Σ(x − x̄)² × Σ(y − ȳ)²], always between −1 and 1. Paste your x and y values to get r, r² and the p-value that says whether the correlation is significant.

Same number of values in each list, in the same order. Separate them with commas, spaces or new lines. Type 1200, not 1,200.

Correlation coefficient
0.6631 Positive correlation

r = 0.6631: as x goes up, y tends to go up. The straight line explains 43.97% of the variation in y, and the p-value of 0.0262 is less than α = 0.05, so the correlation is significant.

r² (share explained) 0.4397
t (9 df) 2.6576
p-value (two-tailed) 0.0262

What is the correlation coefficient?

The correlation coefficient r, also called Pearson’s r, measures the strength and direction of the straight-line link between two sets of paired numbers. It is always between −1 and 1. Values close to 1 or −1 mean the points sit close to a straight line; r = 1 or −1 means every point is on it.

The sign gives the direction: positive when y tends to rise as x rises, negative when it tends to fall. An r near 0 means there is little straight-line link, but look at the points too: a curve or a V shape can have r = 0. A strong correlation doesn’t mean x causes y.

Source OpenStax · Introductory Statistics 2e, 12.3 The Regression Equation (the correlation coefficient r) ↗

How to calculate the correlation coefficient

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

Here it is with your numbers:

  1. There are 11 pairs, so the t test has 9 degrees of freedom (11 − 2).
  2. x̄ = 69.1818
  3. ȳ = 160.4545
  4. Σ(x − x̄)² = 81.6364
  5. Σ(y − ȳ)² = 4,326.7273
  6. Σ(x − x̄)(y − ȳ) = 394.0909
  7. r = 394.0909 ÷ √(81.6364 × 4,326.7273)
  8. r = 0.6631
  9. t = 0.6631 × √9 ÷ √(1 − 0.4397)
  10. t = 2.6576
  11. p = 0.0262 (both tails of the t distribution with 9 degrees of freedom)

It means the link is positive, and a sample this size would rarely show it if there were no link at all (p < 0.05).

The t test checks whether r is far enough from 0 for the number of pairs: t = r√(n − 2) ÷ √(1 − r²), with n − 2 degrees of freedom, and the p-value is the area in both tails of the t distribution beyond t.

Source NIST Dataplot Reference Manual · CORRELATION ↗OpenStax · Introductory Statistics 2e, 12.4 Testing the Significance of the Correlation Coefficient ↗

Correlation coefficient examples

Datarp-value
Exam scores (11 students)0.66310.0262
Dive depth and time−0.96290.0020
A V shape01

The exam scores and dive times are OpenStax’s examples. The V shape shows why r = 0 doesn’t mean “no relationship”: y follows x exactly, just not in a straight line.

FAQs

What is the formula for the correlation coefficient?

r = Sxy ÷ √(Sxx × Syy), where Sxy = Σ(x − x̄)(y − ȳ), Sxx = Σ(x − x̄)² and Syy = Σ(y − ȳ)². For the 11 exam scores, r = 394.0909 ÷ √(81.6364 × 4,326.7273), which is 0.6631.

Source NIST Dataplot Reference Manual · CORRELATION ↗

Is r or r^2 the correlation coefficient?

r is the correlation coefficient. r² is the coefficient of determination: the share of the variation in y that the straight line explains. An r of 0.6631 gives an r² of 0.4397, so the line explains about 44% of it.

Source OpenStax · Introductory Statistics 2e, 12.3 The Regression Equation (the correlation coefficient r) ↗

What is 0.7 correlation coefficient?

An r of 0.7 is a positive correlation: y tends to rise with x, and r² = 0.49, so the line explains 49% of the variation in y. Whether it is significant depends on the number of pairs: with 10 pairs the 5% critical value is 0.632, so 0.7 is significant; with 6 pairs it is 0.811, so 0.7 is not.

Source OpenStax · Introductory Statistics 2e, 12.4 Testing the Significance of the Correlation Coefficient ↗

Is 0.5 a strong correlation coefficient?

There is no single cut-off. An r of 0.5 means the line explains 25% of the variation in y (r² = 0.25). Whether it is significant depends on the sample: with 14 pairs the 5% critical value is 0.532, so 0.5 is not significant; with more pairs it can be.

Sources

Related calculators