Spearman Correlation Calculator
Correlation of ranks rather than values — the measure that catches any consistent trend, not just a straight-line one, and shrugs off outliers.
Replace each value by its rank, then compute the ordinary Pearson correlation on those ranks.
How the spearman correlation calculator works
Replace each value by its rank, then compute the ordinary Pearson correlation on those ranks. Because only order matters, any monotonic relationship — however curved — registers as a perfect ±1.
That also makes it robust: one wildly wrong value changes only its rank, not the whole calculation.
Formula: ρ = Pearson correlation of the ranks
Worked examples
| Inputs | Spearman's ρ | Note |
|---|---|---|
| A perfect curve | 1 | ρ = 1 even though the relationship is quadratic |
| Perfectly reversed | -1 | ρ = −1 |
| With an outlier | 1 | ρ = 1 — the rank is unchanged |
FAQFrequently asked questions
How is Spearman different from Pearson?
Pearson measures how close the points are to a straight line; Spearman measures whether they consistently move in the same direction, however curved the path.
When should I use it?
For ordinal data, skewed distributions, obvious outliers, or any relationship you expect to be monotonic but not linear.
What does ρ = 1 mean?
A perfectly monotonic relationship — every increase in X comes with an increase in Y. It does not mean the relationship is a straight line.
How does it handle ties?
Tied values share the average of their ranks, which this calculator does automatically.
Is Kendall's tau better?
It has a cleaner interpretation as a probability of concordance and handles ties better, but ρ is more widely reported and easier to compute.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- Australian Curriculum (ACARA) — Mathematics — the terms and methods taught in Australian schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.