Skip to main content

    Method document

    Sample size for a Mann–Whitney test

    How many participants are needed in each of two independent groups for a rank-based comparison, planned on the probability that a value from one group exceeds a value from the other. Covers unequal groups, one- or two-sided tests and dropout.

    Engine version 1.0.0 · Reviewed 2 October 2026

    https://statwisely.com/methods/nonparametric-mann-whitney/

    When to use it

    • Two independent groups with a skewed or ordinal outcome, where a t-test’s normality cannot be assumed.

    Not for

    • Roughly normal outcomes, where the t-test needs about 5% fewer participants.

    Notation

    NN
    Total participants
    c1, c2c_1,\ c_2
    Shares of participants in groups 1 and 2
    pp
    P(X > Y): chance a treated value exceeds a control value
    Φ\Phi
    Standard normal distribution function
    α\alpha
    Significance level: the chance of a false positive
    1−β1-\beta
    Power: the chance of detecting the effect if it is real
    τ\tau
    Number of tails: 2 for a two-sided test, 1 for one-sided
    qq
    Expected dropout

    Formulas

    Noether’s formula

    N=(z1−α/τ+z1−β)212 c1c2 (p−12)2,ni=⌈ciN⌉N = \frac{(z_{1-\alpha/\tau} + z_{1-\beta})^{2}}{12\,c_1 c_2\,(p - \tfrac{1}{2})^{2}}, \qquad n_i = \lceil c_i N \rceil

    The Mann–Whitney statistic estimates p, which is ½ when the groups do not differ [1].

    p from a difference and SD

    p=Φ ⁣(Δσ2)p = \Phi\!\left(\frac{\Delta}{\sigma\sqrt{2}}\right)

    For normal data with a common SD.

    Dropout

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

    Applied last, to the participants actually recruited.

    Parameters

    P(X > Y)pp

    Values: Between 0 and 1, not 0.5

    How often a randomly chosen treated participant does better than a randomly chosen control. 0.5 is no effect; 0.64 corresponds to a medium standardised effect.

    Difference, instead of pΔ\DeltaOptional

    Values: Not zero

    With the SD, p is derived assuming normal data, so the parametric test’s cost can be shown alongside.

    Standard deviationσ\sigmaOptional

    Values: Above 0

    Given with the difference.

    Allocation ratioc2/c1c_2 / c_1Optional

    Values: Above 0; 1 for equal groups

    The planned size of group 2 divided by group 1.

    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.

    One- or two-sidedτ\tau

    Values: 2 (two-sided) or 1 (one-sided)

    Two-sided is the default. A one-sided test is justified only when an effect in the other direction would be treated exactly as no effect, and should be stated in advance.

    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 outcome is continuous, so ties are rare. Many ties make these approximations optimistic.
    • Noether’s formulas are large-sample approximations and slightly conservative: they ask for a few percent more than a simulated trial needs [1].
    • Dropout is unrelated to the outcome; recruiting more participants restores the numbers but cannot remove bias.

    Worked examples

    A probability of 0.65

    p = 0.65, α = 0.05 two-sided, 80% power: N = 7.849 / (12 × 0.25 × 0.15²) = 116.3, so 59 per group.

    Group 1: 59 · Group 2: 59 · Total: 118

    Protocol statement

    To detect a probability of 0.65 that a treated value exceeds a control value with 80% power at a two-sided significance level of 0.05, using a Mann–Whitney test, the required sample size is 59 per group (118 in total). Calculated with StatWisely (statwisely.com) using: n = [z_(1-α/2)+z_(1-β)]²/[12c₁c₂(p-½)²], p=P(X>Y). These are planning estimates; confirm the final design with a qualified statistician.

    Open this example in the calculator

    From a standardised difference of 0.5

    Difference 0.5, SD 1: p = Φ(0.5 / √2) = 0.638, so 69 per group, against 64 for a t-test.

    Group 1: 69 · Group 2: 69 · Total: 138

    Open this example in the calculator

    Twice as many in group 2

    With a 1 : 2 allocation: 44 and 88.

    Group 1: 44 · Group 2: 88 · Total: 132

    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 for a Mann–Whitney test. Method document, engine version 1.0.0, reviewed 2026-10-02. https://statwisely.com/methods/nonparametric-mann-whitney/

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

    References

    1. 1.Noether GE. Sample size determination for some common nonparametric tests. Journal of the American Statistical Association. 1987;82(398):645–647.