Spearman Rank Correlation (rho)

The nonparametric companion to Pearson r that the correlation/regression family was missing.

Run the calculator

Example

You enter

You get

Details, formula, and sources

Spearman's rho is Pearson's r computed on the RANKS of the two series (ties take the average rank), so it measures any monotonic relationship - not just a straight line - and shrugs off outliers and non-normal data. The right tool for ordinal ratings or a curved but steadily-rising trend. Paste an X series and a Y series (commas, spaces, or new lines); rho runs -1 (perfectly decreasing) to +1 (perfectly increasing). The two-sided p-value tests rho = 0 with t = rho sqrt((n-2)/(1-rho^2)) on n-2 df, the same approximation scipy.stats.spearmanr uses (approximate for very small n). Verified against scipy.stats.spearmanr. A statistics aid; the study design governs.

Spearman rho = Pearson r on the ranks of x and y (ties take the average rank). Two-sided test for rho = 0: t = rho * sqrt(n - 2) / sqrt(1 - rho^2) on n - 2 df; p = 2 * (1 - tcdf(|t|, n - 2)).

OpenIntro Statistics 4th ed. (nonparametric association / rank correlation) by name; the Student-t CDF via the regularized incomplete beta function per Numerical Recipes in C 2nd ed. §6.4. Verified against scipy.stats.spearmanr.

OpenIntro Statistics free at openintro.org; Numerical Recipes chapters free at numerical.recipes.

Estimate only. Readability formulas and similar metrics are derived from a representative population and have known edge-case noise. The classroom teacher governs final text selection, grade placement, and assessment decisions.

Field names used by the API: x_values, y_values, rho, p_value

Related tools