Two tests on one page: rank-sum — Mann-Whitney U — for independent samples, and signed-rank for pairs. Size the study, then get U or W with an exact p-value at small n and an effect size that says what the test genuinely estimates, which is not what most calculators claim.
Rank-sum compares two independent groups — the rank equivalent of a two-sample t-test. Signed-rank compares two measurements of the same subjects, so it needs the columns matched pair by pair. Using rank-sum on paired data throws away the pairing and usually the result with it.
The shift you want to detect, in standard deviations, which is only a convenient way in: it is converted to the probability that a value from one side exceeds a value from the other, and that probability is the only thing Noether's formula depends on.
The shift in SD units. Turned into P(A > B) below.
The false-positive rate you agree to run. At α = 0.05 a comparison of two identical things still comes out significant one time in twenty, so lower it when acting on a wrong result is expensive, and split it across comparisons if you are going to run several. The 0.05 is a convention, not a property of your data.
The chance the test finds the effect if the effect is really there. At 0.80 you miss a real one in one study out of five; 0.90 is the usual choice when a miss is the expensive outcome, and costs roughly a third more data. Power is a property of the design — it cannot be recovered after the data is in.
Two-sided asks whether the two differ at all. One-sided asks only whether one beats the other: more sensitive for the same sample, but blind to the opposite result even when it is large. Choose it before the data, for a reason you could have written down in advance — switching afterwards halves the p-value you were about to report.
Required sample size for a rank test
Per group (Noether)
130
Per group (efficiency cross-check)The t-test's own sample ÷ 0.955. Plan on the larger.
129
Total observations2n either way — two groups, or two per pair.
260
Relative effect, P(A > B)The only quantity Noether's formula depends on.
0.6005
Noether, before rounding
129.60
Equivalent t-test sizeWhat the parametric test would need on normal data.
123
Noether's formula asks for 130 per group; dividing the equivalent t-test's own sample by the 0.955 relative efficiency asks for 129. The two routes agree to within a few per cent, which is the reassurance worth having: Noether's formula is derived for small shifts, and agreement means this shift is still in that range. The effect you entered means a randomly chosen value from the first group beats one from the second 60.0% of the time — that probability, not a difference in means, is what this test is powered to find.
Noether's formula needs only the probability that one observation exceeds another. Turning your effect size into that probability assumed a normal shift — if that assumption is why you were reaching for a rank test, enter the probability you actually believe instead.
Drag the dashed line — or focus it and use the arrow keys — to change effect size (cohen's d).
Show these numbers as a table
Required per group against effect size (cohen's d)
Effect size (Cohen's d)
Required per group
0.05
6,579
0.17
586
0.29
204
0.40
104
0.52
64
0.64
43
0.76
32
0.88
25
0.99
20
1.11
17
Rank-sum for two independent groups, signed-rank for two measurements of the same subjects. The choice has to match how the data was collected, not which p-value looks better — and signed-rank reads the two columns as pairs, line by line.
Signed-rank needs the two columns aligned pair by pair.
The exact distribution enumerates every arrangement of the ranks and is right for small samples — but only when there are no ties, since tied values change the distribution it enumerates. “Exact where it is valid” switches to the normal approximation when ties appear or the sample grows, which is what R does.
Ties make the exact distribution the wrong one.
Two-sided asks whether the two differ at all. One-sided asks only whether one beats the other: more sensitive for the same sample, but blind to the opposite result even when it is large. Choose it before the data, for a reason you could have written down in advance — switching afterwards halves the p-value you were about to report.
One value per line, pasted straight from a spreadsheet column. A text header on the first line is skipped, and a comma is never read as a decimal point — reading “1,5” as 15 would silently change the data. Nothing pasted here is sent anywhere or put in the shareable link.
One value per line. A header row is skipped.
The other sample. For rank-sum it can be any length — the two groups need not match. For signed-rank each line must be the same subject as the line above it in the first column, and pairs with a missing value have to be dropped from both.
Any length for rank-sum; matched line by line for signed-rank.
Wilcoxon rank-sum (Mann–Whitney U) result
p-value
0.1049
p came from
Exact distribution
U₁
16.0000
U₂
48.0000
Rank-biserial correlation−1 to 1. The effect size a rank test supports.
-0.5000
z
-1.6278
n, first group
8
n, second group
8
Expected under the null
32.0000
Standard error
9.522
If the two samples came from the same distribution, a separation at least this one-sided would turn up with probability 0.1049. A value drawn at random from the first group exceeds one drawn from the second group about 25.0% of the time; complete overlap would be 50%. Note what that is and is not: this test compares whole distributions, not medians. It shows values on one side tending to be larger, which is only the same as a difference in medians when the two distributions have the same shape — usually the assumption a rank test was chosen to avoid. A group that is slightly higher and noticeably more spread can produce this result with the medians sitting on top of each other. It also gives no answer in your original units; a Hodges–Lehmann shift estimate does that.
No median line, deliberately: this test compares whole distributions, and medians only follow when the two have the same shape.
Show these numbers as a table
The two samples on one axis
Sample
Values
Range
First group
8
9.00 to 27.00
Second group
8
13.00 to 31.00
When to use it
Reach for a rank test in two situations. The first is an ordinal outcome — a 1-to-5 rating, an NPS bucket, a severity grade — where the numbers label an ordering and their arithmetic mean is not a quantity that exists. The second is a continuous outcome badly enough behaved, at a sample small enough, that the t-test's reliance on the Central Limit Theorem is a hope rather than a fact. Use rank-sum when the samples are independent and signed-rank when they are pairs, as you would choose between the two-sample and the paired t-test.
Be precise about what the rank-sum test tests, because the standard description of it is wrong. Its null is that a randomly chosen observation from one group is equally likely to be larger or smaller than one from the other — P(X > Y) = 0.5, stochastic equality. That becomes a statement about medians only under the extra assumption that the two distributions have the same shape and differ by a shift. Without it the test can return a decisive p-value with the medians identical, because a difference in spread or skew is enough to make one group stochastically larger. Mann and Whitney's 1947 title says "stochastically larger", which is exactly what "compares medians" throws away.
Use something else when the estimand matters more than the robustness. If your decision depends on total revenue, ordering is not enough: a rank test can say treatment users tend to spend more without saying whether the business makes any money. There, a t-test on a winsorised outcome or a bootstrap interval is better — see our note on outliers. Three or more groups want Kruskal–Wallis rather than one-way ANOVA; binary outcomes want a proportions test; paired binary outcomes want McNemar's; Spearman's rho lives on the correlation page.
Assumptions
"Non-parametric" means no assumed distributional family. It does not mean assumption-free, and the assumptions that remain are the ones that bite:
Independence — between the two samples for rank-sum, across pairs for signed-rank. Ranking does nothing about clustering, repeated measures from the same user, or a unit that appears in both arms.
For the shift interpretation only: the two distributions have the same shape. Report "the treatment group is about 12 seconds slower" and you are assuming it. Report "a treatment user is slower than a control user 62% of the time" and you are not. Say which claim you are making.
For signed-rank: the paired differences are symmetric about their centre. Rarely stated and often false, since differences from a skewed outcome tend to be skewed too. Under asymmetry the test is still valid, but as a test of the pseudo-median — the Hodges–Lehmann centre — not the median of the differences.
Ties are handled but not free. The exact null distribution assumes none; with ties the calculator switches to the tie-corrected normal approximation. On a five-point scale almost everything is tied, and an ordinal model will tell you more than any p-value.
The choice of test was not made by looking at the data. Running a normality test and then picking between the t-test and this one is a two-step procedure with a worse combined error rate than either used unconditionally, because the choice is itself an inference nothing downstream accounts for. Decide from the metric's known shape before collection, like the rest of the analysis plan.
How the calculation works
Both tests replace the observations with their ranks and compare the rank total against what random allocation would produce. Up to n = 50 the calculator enumerates the exact null distribution — which matters precisely at the sample sizes these tests are used for — and beyond that uses the tie-corrected normal approximation, since enumeration grows combinatorially and the approximation is by then very good. Sample size uses Noether's formula, which asks for the effect on the scale the test works on, cross-checked against the [t-test's answer](/calculators/two-sample-t-test) divided by 0.955.
Rank-sum statistic
W = Σ ranks in group 1, U = W − n₁(n₁ + 1)/2
U counts how many of the n₁n₂ cross-group pairs have the group-1 observation larger. U and W are one test seen through a constant shift.
Normal approximation, tie-corrected
z = (U − n₁n₂/2) / √( (n₁n₂/12)·[ (N + 1) − Σ(tⱼ³ − tⱼ)/(N(N − 1)) ] )
The tⱼ are the tied-group sizes. Without the correction the variance is overstated and the test turns conservative — badly so on coarse ordinal scales.
Signed-rank statistic
W⁺ = Σ Rᵢ over pairs with dᵢ > 0, E[W⁺] = n(n+1)/4
Zero differences are dropped and n reduced accordingly — conventional, and one reason the test loses power when many pairs tie exactly.
Effect size
p̂ = U / (n₁n₂) = P(X > Y), r = z/√N
The probability of superiority is directly readable and is the parameter the test is about. The correlation-style r journals ask for is a function of the p-value and n, so it adds less than it appears to.
Sample size (Noether)
N = (z₁₋α/₂ + z₁₋β)² / [ 12·c(1 − c)·(p − 0.5)² ], c = n₁/N
With an even split this is (z₁₋α/₂ + z₁₋β)² / [3(p − 0.5)²]. Cost rises steeply as p approaches 0.5: halving the distance from 0.5 quadruples N.
Asymptotic relative efficiency
ARE = 3/π ≈ 0.955 (normal data)
Under 5% more sample, when the t-test's assumptions hold perfectly. Across continuous distributions the ARE never falls below 0.864, and for heavy-tailed ones it exceeds 1 — about 1.5 for the double exponential.
Worked example
You are comparing time-to-first-action between two onboarding flows. The distribution is heavily right-skewed — most users finish inside a minute, a tail wander off and come back — so you would rather not stake the analysis on means. You state the smallest worthwhile effect on the test's own scale: a new-flow user beats an old-flow user 60% of the time.
Test
Rank-sum (Mann-Whitney)
Significance level (α)
0.05, two-sided
Power (1 − β)
0.80
Effect size (Cohen's d)
0.36
Implied P(X > Y)
0.60, on normal data
Tails
Two
About 131 per arm, 262 in total. The cross-check agrees: on normal data P(X > Y) = 0.60 is Cohen's d ≈ 0.36, which the t-test sizes at 124 per arm, and 124 ÷ 0.955 is about 130.
The two routes landing within a couple of percent of each other is the point of running both: the ARE adjustment is doing its job and you have not specified a much larger effect than you meant to. And 0.60 is smaller than it sounds — complete overlap is 0.50, so this is a fifth of the way from no difference to the new flow always winning. What the test will not give you is a duration. If the roadmap needs "14 seconds faster on average", that has to come from a Hodges–Lehmann shift estimate or a mean with a bootstrap interval.
Interpreting the output
Lead with the effect size, because a rank statistic is unreadable on its own. U = 41,208 means nothing to anybody; "a randomly chosen treatment user scores higher than a control user 61% of the time" is immediately usable and is a direct statement about the quantity the test is built on. Where the equal-shape assumption is defensible, add the Hodges–Lehmann estimate — the median of all cross-group differences — with its interval, which puts the result back in original units.
Then be careful about what significance licenses. A small p-value says the two samples are unlikely to have come from the same distribution. It does not say the medians differ, or by how much: if the treatment group is both slightly better and noticeably more variable, the test can be significant with the medians sitting on top of each other. Plot the two distributions before writing the conclusion — a habit worth keeping whether or not the data is well behaved.
Watch the boundary between the exact test and the approximation. Below 50 per group the p-value is exact and the discreteness is real — at very small samples no arrangement of the ranks may produce a p below 0.05, which is a property of the design rather than a finding. Above it the tie-corrected approximation is accurate, but heavy tying degrades the whole approach.
A non-significant rank test is not evidence the two distributions match, and the remedy is awkward: equivalence testing on ranks is not standard practice. The pragmatic route is to define the margin on a scale you can defend — a difference in means, or a bound on P(X > Y) — and run an equivalence test or a non-inferiority test, stating the change of estimand openly.
Frequently asked questions
What is the difference between Mann-Whitney U and the Wilcoxon test?
Mann-Whitney U and the Wilcoxon rank-sum test are the same test, developed independently and reported through statistics that differ by a constant, so they always give identical p-values. The genuinely different test is the Wilcoxon signed-rank test, which is for paired data. The naming collision causes real confusion: if someone says "the Wilcoxon test" without qualification, ask whether their data is paired.
Does the Wilcoxon rank-sum test compare medians?
Only if you are willing to assume the two distributions have the same shape and differ by a shift. Its actual null hypothesis is that a randomly drawn observation from one group is equally likely to exceed or fall below one from the other. When the shapes differ — different spread, different skew — the test can reject decisively with the two sample medians almost identical, because one distribution is stochastically larger without being centred higher. Describing it as a test of medians is the single most common error made about it, and it appears in most online calculators.
When does the calculator use the exact p-value?
For samples up to 50 with no ties, the null distribution is enumerated exactly. Beyond that, or when ties are present, it uses the normal approximation with a tie correction applied to the variance. The exact version matters most at small n, where the approximation can be noticeably off and where the discreteness of the rank distribution means only certain p-values are attainable at all. With ties, the exact conditional distribution no longer applies, which is why the approximation takes over regardless of sample size.
Should I run a normality test and then decide which test to use?
No. Choosing your test based on a normality test is a two-stage procedure, and its overall error rate is worse than committing to either test in advance. It also does the wrong thing at both ends: normality tests have almost no power at small samples, where non-normality actually matters, and reject trivial departures at large samples, where the Central Limit Theorem has already made them irrelevant. Decide from what you know about the metric's shape and the sample size you expect, before you collect anything.
How much power do I lose by using ranks instead of means?
Less than most people expect. When the t-test's assumptions hold perfectly, the rank-sum test needs about 4.7% more sample for the same power — an asymptotic relative efficiency of 3/pi, roughly 0.955. Across any continuous distribution the efficiency never drops below 0.864, and for heavy-tailed data it goes above 1, meaning the rank test wins. The real cost of ranking is not power, it is that the result is a statement about ordering rather than about magnitude.
Can I use this on a 1-5 satisfaction scale?
Yes, and it is a better fit than a t-test, because the mean of an ordinal scale assumes the gap from 1 to 2 equals the gap from 4 to 5. Two caveats. Heavy tying is unavoidable on a five-point scale, so the analysis will use the tie-corrected normal approximation rather than the exact distribution. And when the categories themselves are informative — a shift from 4s to 5s is a different story from a shift from 1s to 2s — an ordinal regression model tells you considerably more than any single p-value.
Skewed metrics and small samples are where test choice actually changes the decision — we make that call before the data arrives. A/B Testing
References
Mann, H. B., & Whitney, D. R. (1947). On a test of whether one of two random variables is stochastically larger than the other. The Annals of Mathematical Statistics, 18(1), 50-60.
Noether, G. E. (1987). Sample size determination for some common nonparametric tests. Journal of the American Statistical Association, 82(398), 645-647.
Divine, G. W., Norton, H. J., Baron, A. E., & Juarez-Colunga, E. (2018). The Wilcoxon-Mann-Whitney procedure fails as a test of medians. The American Statistician, 72(3), 278-286.