Correlation Coefficient Calculator
Enter two paired data sets (X and Y) and get Pearson's r, the plain-language strength of the relationship, and a scatter plot with a best-fit trend line.
Correlation explained, step by step
Each concept below has a plain-English definition, its formula, a small diagram and a worked example — all in one card so you never have to jump between sections to piece it together.
1. What Pearson's r measures
r captures how tightly two variables move together in a straight line. It always sits between −1 and +1, with the sign giving the direction and the magnitude giving the strength.
2. Where the formula comes from
The numerator sums products of paired deviations (x − x̄)(y − ȳ). When both variables move up or down together the products are positive; when they move oppositely the products are negative. The denominator scales that sum into the −1…+1 range.
3. Reading the strength
A common rule of thumb: |r| ≥ 0.9 very strong, 0.7–0.9 strong, 0.5–0.7 moderate, 0.3–0.5 weak, below 0.3 negligible. The sign is direction — an r of −0.95 is exactly as tight as +0.95.
4. Correlation is not causation
A strong r means two variables move together. It does not prove one causes the other — a hidden third variable, or pure coincidence, can produce the same pattern. Always ask what mechanism could plausibly connect them.
Features of this calculator
- Pearson's correlation coefficient r computed from two paired data lists
- Plain-language classification — very strong / strong / moderate / weak positive or negative
- Scatter plot of every (x, y) point with a dashed least-squares best-fit line
- Full step-by-step working: means, deviations, products, sums and the formula
- Best-fit line equation y = m·x + b returned alongside r
- Handles negative numbers, decimals, and messy pasted data (currency symbols, thousand separators)
- Copy the result summary or download the whole panel — plot and steps — as an image
Frequently asked questions
+What does r = 0 mean?
No linear relationship in your data. There could still be a strong non-linear one (like a U-shape) that Pearson's r cannot see.
+Does a strong correlation prove causation?
No. r measures how tightly two variables move together, not why. A third variable, or coincidence, can produce a strong correlation without any causal link.
+What's the difference between r and r²?
r is the correlation coefficient (direction + strength, −1 to +1). r² is the coefficient of determination — the share of Y's variance explained by X, from 0 to 1.
+Can the X and Y lists have different lengths?
No — each observation contributes one x and one y. Different lengths means at least one point has no partner, so r is not defined.
+What if all my X values are the same?
Then there is no variation in X to correlate with Y, and r is undefined. The calculator will show a clear error in that case.