Home › Statistics & Probability Calculators › Mann-Whitney U Test Calculator
Mann-Whitney U Test Calculator
The Mann-Whitney U test (also called the Wilcoxon rank-sum test) compares two independent groups without assuming normality. It ranks all the values together and asks whether one group tends to have higher ranks than the other, which makes it the standard choice for small samples, skewed data, ordinal scales such as Likert ratings, or data with outliers.
Enter the two samples and the calculator produces the joint ranking with average ranks for ties, the rank sums, U₁ and U₂, and the p-value. For small samples without ties it uses the exact distribution of U; otherwise it uses the normal approximation with tie correction and continuity correction, the same conventions as SciPy and R. The rank-biserial correlation is given as an effect size, and the group medians are shown for context.
The null hypothesis is that the two samples come from the same distribution. If the two distributions have the same shape, rejecting it means the medians differ. For paired data use the Wilcoxon signed-rank test; for normal data with larger samples the t-test has more power.
Separate values with commas, spaces or new lines.
Separate values with commas, spaces or new lines.
Result and step-by-step solution
- State the hypothesesH₀: the two samples come from the same distribution. H₁: the two distributions differ (one group tends to have larger values).
- Rank all 15 values together (ties get the average rank)
Sample Value Rank 1 12 7.5 1 15 12 1 11 5.5 1 18 14 1 14 10.5 1 20 15 1 16 13 2 9 3 2 13 9 2 10 4 2 8 2 2 12 7.5 2 11 5.5 2 7 1 2 14 10.5 - Rank sumsR₁ = 77.5, R₂ = 42.5 (check: R₁ + R₂ = N(N + 1)/2 = 120)
- U statisticsU₁ = R₁ − n₁(n₁ + 1)/2 = 77.5 − 28 = 49.5; U₂ = n₁n₂ − U₁ = 6.5. The reported U is the smaller one, 6.5.
- p-valueNormal approximation: μU = n₁n₂/2 = 28; σU = √[n₁n₂/12 × ((N + 1) − Σ(t³ − t)/(N(N − 1)))] = 8.6178 (tie correction Σ(t³ − t) = 18). z = (U − μU − 0.5) ÷ σU = (49.5 − 28 − 0.5) ÷ 8.6178 = 2.4368; p = 0.0148 (two-tailed, using the larger U).
- Decisionp = 0.0148 < α = 0.05
| Medians | 15 vs 10.5 |
|---|---|
| Rank-biserial correlation (effect size) | 0.768 |
Frequently asked questions
- Is the Mann-Whitney U test the same as the Wilcoxon rank-sum test?
- Yes. They are two formulations of the same test; U and the rank sum W differ by a constant and give identical p-values.
- Which U statistic should I report?
- Convention is the smaller of U₁ and U₂, which is what the headline shows. The p-value is the same either way for a two-tailed test.
- How are ties handled?
- Tied values receive the average of the ranks they would have occupied, and the normal approximation’s standard deviation is reduced by the tie correction term.
- When is the exact p-value used?
- Automatically when both samples have 8 or fewer values and there are no ties. You can force the exact or normal method with the drop-down.
Last reviewed: September 25, 2026. Calculations run in your browser and were validated against SciPy.
