How this calculation works
Rank each variable separately in ascending order, assign tied entries the average of their occupied ranks and correlate the resulting paired ranks. Constant lists have no defined rank correlation.
ρ = Pearson correlation of the two average-rank listsA worked example
For first values 1,2,2,4, the ranks are 1,2.5,2.5,4. Second values 10,20,30,40 rank 1,2,3,4. Their rank correlation is approximately 0.948683.
Good to know
At least two paired observations and variation in each list. No significance test, p-value, causal interpretation or missing-value deletion. Equal numeric values tie; nearly equal values are not merged.
Reference: SciPy: Spearman rank correlation (opens in a new tab) ↗
Rank each variable without breaking the pairs
The tool ranks each list separately but attaches the ranks back to the original pair positions. In 1,2,2,4, the two equal values occupy ascending positions two and three, so each receives rank 2.5. The ranked list is 1,2.5,2.5,4.
Paired with 10,20,30,40, whose ranks are 1,2,3,4, the result is approximately 0.948683. Sorting the two raw lists independently before entering them would change the question and could manufacture an increasing association that was absent in the original paired data.
The percentile rank calculator evaluates one target against a reference list. Spearman correlation instead compares two paired rank patterns.
Ties require the full correlation of ranks
The implementation centers both rank lists and divides their cross-product sum by the product of their centered lengths. This directly calculates the Pearson correlation of average ranks. It does not apply the familiar no-ties squared-rank-difference shortcut to tied data.
Identical varying rank lists give +1, and exactly reversed varying ranks give −1. A constant list gives the same rank to every observation, leaving zero variation in that denominator. The calculator identifies the constant field instead of returning a misleading zero association.
A monotonic association is not a fitted straight line
A strictly increasing nonlinear transformation preserves rank order. For example, replacing positive measurements by their cubes can leave Spearman correlation unchanged even though the numerical distances grow very differently. Rank association describes order, not a slope in the original units.
The simple linear regression calculator works with original numeric distances and estimates a straight-line prediction under its own assumptions. The percentile rank calculator answers where one target lies within a reference list. This page supplies neither a regression line nor a p-value or causal claim.
A few questions, answered
Are nearly equal numbers treated as ties?
Only values equal after numeric parsing tie. No rounding or tolerance-based merging is applied.
Can the result be used as a significance test?
This page reports no p-value, null distribution or test decision.
Why is a constant list rejected?
Its ranks have zero variance, making the correlation denominator zero.