Skip to main content

    Method document

    Sample size to detect a Spearman correlation

    How many participants are needed to show that two measurements are monotonically associated, using Spearman’s rank correlation. Covers dropout.

    Engine version 1.0.0 · Reviewed 1 October 2026

    https://statwisely.com/methods/correlation-spearman/

    When to use it

    • Skewed or ordinal measurements, or an association expected to be monotonic but not linear.

    Not for

    • Roughly normal measurements, where Pearson’s correlation needs slightly fewer participants.

    Notation

    nn
    Number of participants
    ρs\rho_s
    Spearman correlation to detect
    z(ρs)z(\rho_s)
    Fisher’s transformation of it
    α\alpha
    Significance level: the chance of a false positive
    1−β1-\beta
    Power: the chance of detecting the effect if it is real
    qq
    Expected dropout

    Formulas

    Fisher’s z with the rank-correlation variance

    n=⌈1.06(z1−α/2+z1−βz(ρs))2+3⌉n = \left\lceil 1.06\left(\frac{z_{1-\alpha/2} + z_{1-\beta}}{z(\rho_s)}\right)^{2} + 3 \right\rceil

    A rank correlation’s Fisher-transformed value has about 1.06 times the variance of Pearson’s, so it needs about 6% more participants [2, 1].

    Dropout

    nrecruit=⌈n1−q⌉n_{\text{recruit}} = \left\lceil \frac{n}{1 - q} \right\rceil

    Applied last, to the participants actually recruited.

    Parameters

    Expected Spearman correlationρs\rho_s

    Values: Between −1 and 1, not 0

    The smallest correlation worth detecting, from comparable studies. Weak correlations need large samples.

    Significance levelα\alpha

    Values: Between 0 and 1; usually 0.05

    The false-positive rate you accept. A smaller α, for example to allow for several primary outcomes, needs a larger sample.

    Power1−β1-\beta

    Values: Between 0 and 1; usually 0.80 or 0.90

    The chance of a significant result if the assumed effect is real. Funders and ethics committees commonly expect at least 0.80.

    Expected dropoutqqOptional

    Values: 0% up to, but not including, 100%

    The share of participants expected to provide no outcome, from comparable studies. Recruiting more restores the numbers, not the comparability of the groups: if dropout is related to the outcome, the estimate can still be biased.

    Assumptions

    • Participants are independent; the approximation is good for moderate correlations and becomes conservative near ±1.
    • Dropout is unrelated to the outcome; recruiting more participants restores the numbers but cannot remove bias.

    Worked examples

    A moderate correlation

    ρₛ = 0.3: n = 1.06 × 81.9 + 3 = 89.8, rounded up to 90, against 85 for Pearson.

    Sample size: 90

    Protocol statement

    To detect a correlation of 0.3 with 80% power at a two-sided significance level of 0.05, using a test of a Spearman correlation, the required sample size is 90 participants. Calculated with StatWisely (statwisely.com) using: n ≈ 1.06[(z_(1-α/tails)+z_(1-β))/atanh(ρ)]²+3. These are planning estimates; confirm the final design with a qualified statistician.

    Open this example in the calculator

    A strong correlation

    ρₛ = 0.5: n = 31.

    Sample size: 31

    Open this example in the calculator

    Validation

    • Every worked example on this page is recomputed by the StatWisely engine whenever the software is built. If a number or formula here stopped matching the calculator, the release would be stopped until this document was corrected.
    • An independent implementation in R recomputes this test every night and before each production release, and the results are compared with the engine’s.

    How to cite

    StatWisely. Sample size to detect a Spearman correlation. Method document, engine version 1.0.0, reviewed 2026-10-01. https://statwisely.com/methods/correlation-spearman/

    Cite the original references for the formulas your design uses as well.

    References

    1. 1.Fieller EC, Hartley HO, Pearson ES. Tests for rank correlation coefficients. I. Biometrika. 1957;44(3–4):470–481.
    2. 2.Fisher RA. On the “probable error” of a coefficient of correlation deduced from a small sample. Metron. 1921;1:3–32.