Mann-Whitney U Test Calculator | Non-Parametric Two-Sample Test
Perform the Mann-Whitney U test (Wilcoxon rank-sum test) on two independent samples. Computes U statistic, z-score approximation with continuity correction, exact p-value for small samples, and effect size r = z/√n.
What Is the Mann-Whitney U Test Calculator | Non-Parametric Two-Sample Test?
The Mann-Whitney U test (also called the Wilcoxon rank-sum test) is a non-parametric alternative to the independent-samples t-test. It tests whether one group tends to have larger values than the other without assuming normality. It is based entirely on ranks, making it robust to outliers and skewed distributions.
The U statistic counts the number of times an observation from group 1 exceeds an observation from group 2 across all n₁×n₂ pairs. For large samples (n > 8), a z-approximation with continuity correction and tie adjustment is used. Effect size r = |z|/√N mirrors Cohen's d on the rank scale.
Formula
Rank all N = n₁+n₂ values together (average ranks for ties)
U₁ = R₁ − n₁(n₁+1)/2 | U₂ = n₁n₂ − U₁ | U = min(U₁, U₂)
z = (U − n₁n₂/2 + 0.5) / √Var(U) | Var with tie correction: n₁n₂/12 · [(N+1) − Σ(t³−t)/(N(N−1))]
Effect size: r = |z| / √N
How to Use
- 1
Enter values for Group 1 in the left textarea (comma or newline separated).
- 2
Enter values for Group 2 in the right textarea.
- 3
Each group needs at least 2 values; more than 8 values per group activates the z-approximation.
- 4
Click Run U Test to compute all statistics.
- 5
Read U, U₁, U₂, z-score, and p-value from the result cards.
- 6
Check the effect size r: values above 0.3 indicate a medium effect.
- 7
Read the interpretation summary for a plain-language conclusion.
Example Calculation
Example 1 — Treatment vs control (n=8 each): Group 1: 12, 18, 23, 15, 27, 19, 14, 22. Group 2: 25, 31, 28, 35, 22, 29, 33, 30. After ranking all 16 values, R₁ = 42, U₁ = 42 − 36 = 6. U₂ = 64 − 6 = 58. U = 6. z ≈ −3.05, p ≈ 0.002. Group 2 has significantly higher values.
Example 2 — Tied values: Group 1: 5, 7, 7, 9. Group 2: 6, 7, 8, 10. Three values of 7 create ties. Average rank = (3+4+5)/3 = 4. Tie correction reduces the variance slightly, giving a more conservative (larger) p-value than the non-corrected formula.
Understanding Mann-Whitney U Test | Non-Parametric Two-Sample Test
Mann-Whitney vs T-Test Comparison
| Property | Mann-Whitney U | Independent t-test |
|---|---|---|
| Distribution assumption | None (non-parametric) | Normal (parametric) |
| Scale of measurement | Ordinal or continuous | Continuous (interval/ratio) |
| Sensitive to outliers | Resistant | Sensitive |
| What it tests | Stochastic dominance / median shift | Difference in means |
| Relative efficiency | ~95% of t-test power (large n) | 100% under normality |
| Handles ties | Yes (with correction) | N/A |
Effect Size r Reference
| r value | Cohen classification | Practical meaning |
|---|---|---|
| < 0.10 | Negligible | Trivial, likely no practical importance |
| 0.10 – 0.30 | Small | Detectable but modest group difference |
| 0.30 – 0.50 | Medium | Noticeable and practically meaningful |
| > 0.50 | Large | Substantial, easily observed difference |
Reporting Guidelines
- ▸Report both U statistic and sample sizes: "U(n₁=10, n₂=12) = 34, p = 0.023."
- ▸Always report effect size r alongside p-value for meaningful interpretation.
- ▸Note whether exact or approximate p-values were used, especially for small samples.
- ▸A significant p-value does not confirm a meaningful difference — small p with negligible r is common in large samples.
- ▸For reporting confidence intervals, use the Hodges-Lehmann estimator (median of all pairwise differences).
- ▸When both groups are approximately normal with similar variance, prefer the t-test for higher statistical power.
Frequently Asked Questions
When should I use Mann-Whitney instead of a t-test?
What does the U statistic actually mean?
Is the Mann-Whitney test the same as testing medians?
What is effect size r in this context?
How does the tie correction work?
You Might Also Like
Explore 360+ Free Calculators
From math and science to finance and everyday life — all free, no account needed.