Spearman Rank Correlation Calculator

Paste two columns or two lists to get Spearman's rho (Pearson r of mid-ranks, so ties are handled exactly), the two- or one-tailed p-value from the t approximation and, for n ≤ 10, the exact permutation p-value, plus a confidence interval and the rank table.

Use the Spearman Rank Correlation Calculator

Enter Your Data

Enter data on the left and click Calculate to see results.

Copied!

Summary

The Spearman Rank Correlation Calculator computes Spearman's rho (ρ), the nonparametric measure of a monotonic association, entirely in your browser. Paste two columns from a spreadsheet or two comma-separated lists; the tool ranks both with mid-ranks for ties, takes the Pearson correlation of the ranks, and reports the t statistic, degrees of freedom, a one- or two-tailed p-value, the exact permutation p-value for up to 10 pairs, a Fisher-z confidence interval, the d² shortcut for comparison, a rank table and a rank scatter plot.

How it works

  1. Paste two columns copied from a spreadsheet or CSV (a header row is detected and rows with a missing value are dropped), or type the X and Y lists separately.
  2. Each variable is ranked from smallest to largest; tied values share the average of the ranks they span (mid-ranks).
  3. Rho is the Pearson correlation of the two rank vectors. Without ties this equals 1 − 6Σd² ÷ (n(n² − 1)); with ties only the Pearson-on-ranks value is correct, and the tool shows both.
  4. The t approximation uses t = ρ√((n − 2) ÷ (1 − ρ²)) with n − 2 degrees of freedom. For n ≤ 10 the tool also enumerates every permutation of Y (up to 3,628,800) to give the exact p-value.
  5. The confidence interval uses the Fisher z transform with the Fieller–Hartley–Pearson standard error √(1.06 ÷ (n − 3)).
  6. Choose a two-tailed test, or a one-tailed test when you predicted the direction before seeing the data.

Use cases

  • Test whether student rankings on two exams agree.
  • Correlate Likert-scale or other ordinal survey answers.
  • Measure agreement between two judges' scores in a competition.
  • Check a monotonic but non-linear relationship, such as dose and response.
  • Analyse small samples or data with outliers where Pearson's assumptions fail.
  • Report rho, p and a confidence interval in APA style for a thesis or assignment.

Frequently Asked Questions

Last updated: 2026-10-10 · Reviewed by Nham Vu