Correlation Calculator

Correlation measures how closely two quantities move together, from −1 (perfectly opposite) through 0 (no straight-line link) to +1 (perfectly together).

Separate numbers with commas or spaces.
Separate numbers with commas or spaces.
Results update as you type.

Pearson correlation (r)

0.977718

very strong positive relationship

r² (shared variation)
0.95593395.59% of the variation in Y goes with X
p-value (two-tailed)
0.000140644Significant at α = 0.05: p < 0.05
t statistic
10.4146df = 5
Spearman rank correlation (ρ)
0.964286uses ranks; less sensitive to outliers
Pairs
7

Correlation shows that two things move together, not that one causes the other.

About this calculator

Enter paired data, such as study hours and marks. The calculator also tests whether the correlation is significant and gives Spearman’s rank correlation.

How to use it

  1. Enter the X values.
  2. Enter the matching Y values in the same order.
  3. Read r, r² and the p-value.

The formula

r = Σ(x − x̄)(y − ȳ) ÷ √(Σ(x − x̄)² × Σ(y − ȳ)²); t = r√(n − 2) ÷ √(1 − r²)
r
Karl Pearson’s coefficient
n
number of pairs

Worked example

Hours 2, 4, 5, 7, 9, 10, 12 and marks 11, 15, 16, 22, 24, 23, 30

  1. r = 0.978, a very strong positive correlation.
  2. p = 0.00014, so it is significant at 5%.

What the result means

Strength: above 0.7 is strong, 0.3 to 0.7 moderate, below 0.3 weak. Always look at a scatter plot too.

Assumptions

  • Paired data; Pearson assumes a straight-line relationship.

Limitations

  • Correlation does not prove cause and effect.

Frequently asked questions

What is a good correlation?

It depends on the field, but |r| above 0.7 is usually called strong.

When should I use Spearman?

When the data are ranks, have outliers or the relationship is curved but steadily rising or falling.

What does r² mean?

The share of the variation in one variable that goes with the other.

Last reviewed on 6 October 2026. Found a mistake? Tell us.