Correlation Calculator
Reviewed by CalcMulti Editorial Team·Last updated: ·← Statistics Hub
The Pearson correlation coefficient (r) measures the strength and direction of the linear relationship between two variables. It ranges from −1 (perfect negative) to +1 (perfect positive), with 0 indicating no linear relationship.
This calculator computes r, the coefficient of determination (R²), and interprets the strength of the relationship. Enter paired X and Y values to get started.
Formula
r = Σ(x − x̄)(y − ȳ) / √[Σ(x − x̄)² × Σ(y − ȳ)²]
- x, y
- individual paired data values
- x̄, ȳ
- means of X and Y datasets
- r
- Pearson correlation coefficient (−1 to +1)
- R²
- coefficient of determination — % of variance explained
Enter paired X and Y values (comma, space, or newline separated). Must have the same count.
Correlation Strength Reference
| |r| range | Strength | R² range | Example |
|---|---|---|---|
| 0.9 – 1.0 | Nearly perfect | 81–100% | Same measurement twice |
| 0.7 – 0.9 | Very strong | 49–81% | Height vs weight |
| 0.5 – 0.7 | Strong | 25–49% | Study time vs exam score |
| 0.3 – 0.5 | Moderate | 9–25% | Exercise vs resting HR |
| 0.1 – 0.3 | Weak | 1–9% | Shoe size vs intelligence |
| 0.0 – 0.1 | Negligible | < 1% | Hair colour vs salary |
Common Mistakes
Confusing correlation with causation
r = 0.9 between X and Y does not mean X causes Y. Both may be caused by a third variable, or the relationship may be coincidental. Always consider confounders.
Using Pearson r on non-linear data
Pearson r only measures linear association. A curved relationship (e.g., quadratic) can have r ≈ 0 even when X perfectly predicts Y. Always plot first.
Ignoring outliers
A single extreme outlier can change r from 0.1 to 0.8. Always check a scatter plot. Consider Spearman r for outlier-resistant correlation.
Pearson r vs Spearman ρ vs Kendall τ — Which Correlation to Use?
| Condition | Pearson r | Spearman ρ | Kendall τ |
|---|---|---|---|
| Continuous, linear, normally distributed | ✓ Preferred | OK | OK |
| Ranked or ordinal data (Likert, ratings) | — | ✓ | ✓ |
| Monotonic but non-linear relationship | — | ✓ | ✓ |
| Outliers present | Sensitive | ✓ Robust | ✓ Robust |
| Small sample (n < 20) | Unreliable | Better | ✓ Preferred |
| Causal modelling / regression input | ✓ | — | — |
Case Study: Ad Spend vs Conversions — When One Outlier Changes Everything
A marketing analyst was tracking weekly ad spend (X) against conversions (Y) across 12 weeks. Pearson r came out to 0.91 — a very strong positive correlation, R² = 0.83, suggesting ad spend explained 83% of the variance in conversions.
But a scatter plot revealed the issue: Week 4 had a platform billing error that tripled reported ad spend while generating normal conversions. Removing just that one data point dropped r to 0.73 (R² = 0.53). The Spearman rank correlation for the full dataset was 0.88 — far more robust, because rank-based methods are not distorted by single extreme values.
The analyst reported Spearman ρ = 0.88, corrected the data error, and noted that the relationship was strong but not as tight as the initial r suggested. Always plot your data before trusting a single correlation coefficient — a number without a scatter plot is incomplete analysis.
Related Calculators
Predict Y from X using the regression line
T-Test CalculatorTest if means differ significantly
Mean CalculatorCompute means used in correlation formula
Standard Error CalculatorSE of the correlation coefficient
Variance CalculatorVariance used in correlation calculation
Statistics HubAll statistics calculators
Disclaimer
Pearson correlation measures linear association only. A correlation coefficient does not establish causation. Always inspect your data visually before interpreting correlation results.