Correlation Calculator
Pearson correlation coefficient.
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
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)?
What is r for (1,10), (2,8), (3,5), (4,1)?
Does a high r prove one variable causes the other?
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 YouTubeThe essence of calculus
3Blue1Brown
Visual calculus story that complements symbolic solvers.
Watch on YouTube
- Geometry Index
Math is Fun
Shape and formula index for geometry calculators.
- Standard Normal Distribution
Math is Fun
Z-score background for normal-distribution calculators.