Spearman Rank Correlation Calculator
Calculate monotonic rank association for paired observations, including tied ranks.
YOUR CALCULATION
Result
—
Calculation steps
Work through one step at a time or reveal the complete calculation. The steps use your current inputs.
How to calculate
Replace each variable with average ranks and calculate the Pearson correlation of those ranks.
ρ = Σ(Rx−mean rank)(Ry−mean rank) / √[Σ(Rx−mean rank)² Σ(Ry−mean rank)²]
Worked example
X=10,20,20,40 and Y=1,2,3,4 give X ranks 1,2.5,2.5,4 and ρ≈0.948683298. Increasing lists without ties give ρ=1.
Assumptions and input details
Enter 2–200 paired observations per variable, magnitude at most 1e12, in matching order. Equal values receive average occupied ranks; constant variables have undefined correlation and are rejected. This is descriptive monotonic association, not Pearson correlation of original values, a p-value, a confidence interval or evidence of causation.
References: NIST: rank correlation with ties
Using this calculator
Can I enter my own problem?
Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.
Are the results exact?
Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.
Is my input uploaded?
The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.
Fit y=a+bx to 2–100 entered coordinate pairs. Inspect the regression equation, correlation, R², predictions, residuals and a scatter plot.
Enter a list of numbers to calculate mean, median, modes, quartiles, population and sample standard deviation, with a frequency histogram.
Compare two independent samples using pooled ranks, U statistics and observed pairwise superiority.
Reserved advertising space.