Correlation Calculator
Pearson’s r, r², and significance from two paired datasets.
strong positive correlation · r² = 0.7714 · p = 0.0213
Pearson’s r measures the strength and direction of a linear relationship, from −1 to +1. For X = 1–5 and Y = 2, 3, 5, 4, 6, r = 9 ÷ √(10 × 10) = 0.9, so r² = 0.81 — about 81% of the variance is shared. An r near 0 means no linear link.
How strongly are two variables related?
Pearson’s r measures the strength and direction of a linear relationship, from −1 (perfect negative) through 0 (none) to +1 (perfect positive). It compares how the two variables vary together to how much they vary on their own. Squaring it gives r², the share of variance in one variable that the other accounts for.
covariation divided by the product of each variable’s spread
Worked example
Five pairs — X: 1, 2, 3, 4, 5 and Y: 2, 3, 5, 4, 6. Here x̄ = 3 and ȳ = 4.
- 1 Sum the cross-products. Σ(x−x̄)(y−ȳ) = 4 + 1 + 0 + 0 + 4 = 9.
- 2 Sum each squared deviation. Σ(x−x̄)² = 10 and Σ(y−ȳ)² = 10.
- 3 Divide and square. r = 9 ÷ √(10 × 10) = 9 ÷ 10 = 0.9, so r² = 0.81 — 81% of the variance is shared.
Interpreting |r|
Rough strength bands; the right cutoffs depend on your field.
| |r| | Strength | r² (variance shared) |
|---|---|---|
| 0.0–0.2 | very weak / none | 0–4% |
| 0.2–0.4 | weak | 4–16% |
| 0.4–0.7 | moderate | 16–49% |
| 0.7–0.9 | strong | 49–81% |
| 0.9–1.0 | very strong | 81–100% |
What r can and can’t tell you
Correlation is not causation. A strong r means two variables move together — not that one drives the other. A lurking third variable, or pure coincidence, can produce a high correlation.
r only sees straight lines. Pearson’s r captures linear association. A clear curved pattern, like a U-shape, can give an r near 0 even though the variables are tightly related.
Outliers distort it. Because it’s built from squared deviations, a single extreme point can drag r up or down sharply. Always look at a scatterplot before trusting the number.
Significance depends on n. The tool tests r with t = r·√[(n − 2) ÷ (1 − r²)] on n − 2 degrees of freedom. With few pairs even a large r may not be significant; with many pairs even a small r can be.