Correlation Coefficient Calculator
Calculate the Pearson correlation coefficient (r) and coefficient of determination (r²) from two data sets. Paste comma-separated or line-separated values — get r, r², interpretation, and step-by-step working.
Data Input
Separate values with commas, spaces, or newlines. X and Y must have the same number of values (minimum 2).
Results
r (Pearson)
—
r²
—
n (pairs)
—
Direction
—
x̄ (mean X)
—
ȳ (mean Y)
—
σx (std X)
—
σy (std Y)
—
Step-by-Step Working
Data Table
| # | x | y | x − x̄ | y − ȳ | (x−x̄)(y−ȳ) | (x−x̄)² | (y−ȳ)² |
|---|
Correlation Strength Guide
| |r| Range | Strength | Interpretation |
|---|---|---|
| 0.00 – 0.09 | Negligible | Virtually no linear relationship |
| 0.10 – 0.19 | Very weak | Minimal linear trend |
| 0.20 – 0.39 | Weak | Low degree of linear association |
| 0.40 – 0.59 | Moderate | Noticeable but imperfect relationship |
| 0.60 – 0.79 | Strong | Clear linear trend, useful for prediction |
| 0.80 – 0.99 | Very strong | Tight linear relationship |
| 1.00 | Perfect | All points lie exactly on a line |
Frequently Asked Questions
The Pearson r measures the linear relationship between two variables, ranging from −1 (perfect negative) to +1 (perfect positive). A value near 0 means no linear relationship. Formula: r = [n∑xy − ∑x∑y] / √[(n∑x² − (∑x)²)(n∑y² − (∑y)²)].
r² (the coefficient of determination) is simply r squared. While r measures linear association direction and strength, r² tells you what proportion of the variance in Y can be explained by X. r = 0.9 → r² = 0.81 → 81% of Y's variation is explained. r² is always between 0 and 1 and has no directional sign.
No. Correlation only shows that two variables tend to move together linearly. It does not mean one causes the other. A third confounding variable could drive both; the correlation could be coincidental (spurious); or the causal direction could be reversed. Causation requires controlled experiments or strong theoretical grounding.
Use Spearman's rank correlation when: (1) your data is ordinal rather than continuous; (2) the relationship is monotonic but not necessarily linear; (3) you have significant outliers that would distort Pearson r. Spearman works on the ranked values of the data, making it more robust to outliers.