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.
Details
- p (t approximation)
- p (exact permutation)
- 95% CI for ρ
- 1 − 6Σd²/(n(n²−1))
- Tied values (X / Y)
- Σd²
Rank Scatter Plot
Ranked X vs Ranked YRank Table
| # | X | Rank X | Y | Rank Y | d² |
|---|
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
- 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.
- Each variable is ranked from smallest to largest; tied values share the average of the ranks they span (mid-ranks).
- 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.
- 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.
- The confidence interval uses the Fisher z transform with the Fieller–Hartley–Pearson standard error √(1.06 ÷ (n − 3)).
- 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.