This correlation coefficient calculator computes Pearson’s r between two paired datasets — with R², the significance test for r, and a plain-language strength reading.
r: the Linear Association Between −1 and +1
The fitted line through the same data (slope, intercept, predictions) is the Linear Regression Calculator. Part of our Statistics Calculators collection.
Worked Example (Verified)
- X = 1..5, Y = 2, 4, 5, 4, 5 (defaults, the textbook dataset): r = 0.7746, R² = 0.6000 — t = 2.121 (df 3), p = 0.124: a strong-looking r that n = 5 cannot certify; the same r at n = 30 would give p < 0.0001
- Strength folklore bands: |r| < 0.3 weak, 0.3–0.5 moderate, 0.5–0.7 moderate-strong, > 0.7 strong — fields differ (physics demands 0.99, psychology celebrates 0.3 with real effects)
- r is unit-free and symmetric: r(X,Y) = r(Y,X), and rescaling either variable (cm → inches) leaves r untouched
Correlation Pitfalls — the Holy Trinity
- Outliers: one leverage point can create or kill r; always scatter-plot.
- Curvature: r sees only straight lines; a parabola can hide inside r = 0.
- Range restriction: studying only admitted students shrinks the SAT–GPA correlation and manufactures false conclusions.
- Plus the confounder choir behind every spurious pair (ice cream ↔ drowning, via summer).
Related Tools
- Linear Regression Calculator — slope, intercept & predictions
- Relative Risk Calculator — association in 2×2 tables
- Statistics Calculators — the full collection
Frequently Asked Questions
How do you calculate Pearson’s correlation coefficient?
r = Σ(x−x̄)(y−ȳ) / √[Σ(x−x̄)² · Σ(y−ȳ)²]. For X = 1..5 and Y = 2, 4, 5, 4, 5: r = 6/√(10×6) = 0.7746. This calculator also returns R² and the t-test of H₀: ρ = 0.
What does R² mean?
The share of Y’s variance linearly explained by X: R² = 0.60 means 60% of the spread in Y aligns with X along a line; the other 40% lives in scatter. It’s r squared — and in simple regression it exactly equals the regression’s R².
When is a correlation statistically significant?
The test t = r√((n−2)/(1−r²)) with df = n−2. Big r with tiny n often isn’t (the defaults: r = 0.77 yet p = 0.124 at n = 5); trivial r with huge n often is (r = 0.05, n = 10,000, p < 0.001). Significance ≠ importance — read both r and p together.
Pearson vs Spearman — which should I use?
Pearson measures linear association on the raw values and assumes roughly interval data without wild outliers. Spearman correlates the ranks, capturing any monotone relationship and shrugging off outliers — safer for skewed or ordinal data. If they disagree sharply, your data are telling you something (usually: curve or outliers).
Does a zero correlation mean no relationship?
No — it means no linear relationship. A perfect symmetric U (Y = X² on −3..3) gives r ≈ 0 with a completely deterministic link. Plot first; r summarizes the plot, never replaces it.
Is this correlation coefficient calculator free?
Yes — free, instant, no sign-up.