How to use
- Paste the two columns into X and Y, in matching order.
- Choose Pearson (linear) or Spearman (rank).
- Read the coefficient, p-value and confidence interval, and check the scatter plot for outliers.
Options explained
- Pearson r
- Measures linear association from −1 to 1. The p-value uses t = r√(n−2)/√(1−r²); the interval uses Fisher's z.
- Spearman ρ
- Correlates the ranks — suitable for ordinal data, outliers or monotonic but curved relationships.
Worked example
Take X = 1, 2, 3, 4, 5, 6, 7, 8 and Y = 2, 1, 4, 3, 7, 8, 6, 9. With n = 8:
| Measure | Pearson | Spearman |
|---|---|---|
| Coefficient | r = 0.896 | ρ = 0.881 |
| t (6 degrees of freedom) | 4.954 | 4.560 |
| p-value | 0.0026 | 0.0039 |
| 95% CI | 0.521 to 0.981 | 0.465 to 0.978 |
The squared Pearson coefficient is r² = 0.804, so about 80% of the variance in Y is shared linearly with X in this sample.
Spearman is Pearson computed on ranks, with tied values given their average rank. Its p-value uses the same t approximation, so for very small samples without ties it can differ slightly from an exact test.
The interval needs n greater than 3. It is built on Fisher’s z: z = atanh(r), with standard error 1 ÷ √(n − 3), then transformed back with tanh.
Frequently asked questions
What counts as a strong correlation?
A rough guide is |r| ≥ 0.7 strong, 0.4–0.7 moderate and 0.1–0.4 weak, but fields differ.
Does a significant correlation prove causation?
No. A third factor may drive both, or the direction may be reversed.
Is my data uploaded?
No. Calculations run in your browser.
Privacy
This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.