Correlation Calculator

Pearson correlation coefficient.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter one x,y pair per line to get Pearson's correlation. The pairs (1,2), (2,3), (3,5), (4,7) have r = 0.989778, a very strong positive link.

How to use

1
Step 1
Type one x,y pair per line.
2
Step 2
Press Calculate.
3
Step 3
Read r, between −1 and 1.

How it works

r measures how closely points follow a straight line: +1 is a perfect upward line, −1 a perfect downward line and 0 no linear relationship. Squaring it gives R², the share of variation in y explained by x. Correlation alone does not show cause.

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

Worked example

A negative relationship

Input
(1,10), (2,8), (3,5), (4,1)
Output
r = −0.989071
Walkthrough
y falls as x rises, almost along a straight line, so r is close to −1.

Limitations

  • If every y value is the same, as in (1,5), (2,5), (3,5), the correlation is undefined and the tool returns an error.
  • Measures straight-line association only; a clear curve can have r near 0.

Questions

What is r for (1,2), (2,3), (3,5), (4,7)?
0.989778.
What is r for (1,10), (2,8), (3,5), (4,1)?
−0.989071.
Does a high r prove one variable causes the other?
No. It shows association only.

Features

  • Pearson's r
  • Instant
  • Runs in your browser

Guides

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Variables, expressions, and equations

    Khan Academy

    Algebra language shared by many math calculators.

    Watch on YouTube
  • The essence of calculus

    3Blue1Brown

    Visual calculus story that complements symbolic solvers.

    Watch on YouTube