Correlation Coefficient Calculator
Free correlation coefficient calculator: paste x and y data for Pearson r (or Spearman rank correlation), R², and a plain-English interpretation, with every step shown. Download as CSV.
| Series | N | r | R² | Interpretation |
|---|---|---|---|---|
| Score | 8 | 0.9972 | 0.9944 | very strong positive |
Pearson correlation, step by step — Score
Means: x̄ = 4.5, ȳ = 70.125. For each pair, multiply the deviations:
| x | y | x−x̄ | y−ȳ | (x−x̄)(y−ȳ) |
|---|---|---|---|---|
| 1 | 52 | -3.5 | -18.125 | 63.4375 |
| 2 | 58 | -2.5 | -12.125 | 30.3125 |
| 3 | 63 | -1.5 | -7.125 | 10.6875 |
| 4 | 68 | -0.5 | -2.125 | 1.0625 |
| 5 | 72 | 0.5 | 1.875 | 0.9375 |
| 6 | 79 | 1.5 | 8.875 | 13.3125 |
| 7 | 81 | 2.5 | 10.875 | 27.1875 |
| 8 | 88 | 3.5 | 17.875 | 62.5625 |
Σ(x−x̄)(y−ȳ) = 209.5, Σ(x−x̄)² = 42, Σ(y−ȳ)² = 1050.875.
r = 209.5 / √(42 × 1050.875) = 0.9972, so r² = 0.9944.
What a correlation coefficient is
A correlation coefficient measures how strongly two variables move together, on a scale from −1 to +1. A value near +1 means that as one variable rises the other rises too; near −1 means one rises as the other falls; near 0 means little or no straight-line relationship. This calculator computes the coefficient from paired data you paste in, interprets its strength and direction, and shows every step.
Pearson vs. Spearman
Pearson’s r measures a straight-line (linear) relationship using the raw values; it is the usual "correlation coefficient". Spearman’s rank correlation (ρ) measures a monotonic relationship — whether the variables move together in the same order — by correlating the ranks of the data instead of the values. Use Pearson for roughly linear, continuous data; use Spearman for ordinal data, curved-but-consistent relationships, or when a few outliers would distort Pearson. This tool computes Spearman the accurate way, by taking Pearson’s r of the ranks (which stays correct when values are tied), rather than the tie-sensitive shortcut formula.
Worked example
Take five (x, y) pairs: (1,1), (2,3), (3,2), (4,5), (5,4). Both means are 3. Multiply each pair’s deviations and add them: (−2)(−2) + (−1)(0) + 0(−1) + 1(2) + 2(1) = 8. The sums of squared deviations are Σ(x−x̄)² = 10 and Σ(y−ȳ)² = 10. So r = 8 / √(10 × 10) = 8 / 10 = 0.8, a strong positive correlation, and r² = 0.64 — about 64% of the variation in y is associated with x.
Correlation is not causation
A high correlation does not prove that one variable causes the other. Two things can move together because a third factor drives both, because of coincidence in a small sample, or because the direction of cause runs the other way. Correlation is evidence of association, not proof of cause — treat r as a description of the data, not an explanation of it.
How to use it
- Paste your paired data — the first column is x, each other column is a y-series measured against it.
- Choose Pearson (linear, on the values) or Spearman (monotonic, on the ranks).
- Read the coefficient, R² (for Pearson), and the plain-English strength and direction; check the step-by-step working below the scatter.
- Download the coefficient table as CSV, or the scatter as PNG, SVG, or PDF.
FAQ
- How do I calculate the correlation coefficient?
- Find the mean of x and of y, multiply each pair’s deviations from their means and add them, then divide by the square root of the product of the summed squared deviations. This tool does it automatically and shows every step; toggle to Spearman to correlate the ranks instead.
- What does r = 0.8 mean?
- An r of 0.8 is a strong positive linear correlation: the two variables tend to rise together, and r² = 0.64 means about 64% of the variation in one is associated with the other. It does not by itself mean one causes the other.
- Pearson or Spearman — which should I use?
- Use Pearson for continuous, roughly linear data. Use Spearman when the data is ranked/ordinal, the relationship is monotonic but curved, or outliers would distort Pearson. Spearman correlates the ranks, so it is more robust.
- Does correlation prove causation?
- No. A strong correlation shows the variables move together, but a third variable, coincidence, or reverse causation can produce that pattern. Correlation is evidence of association, not proof of cause.