The Mann-Whitney U test (also called the Wilcoxon rank-sum test) compares two independent groups without assuming normal data. It works on ranks, so it handles skewed distributions, outliers and ordinal scales such as Likert ratings. This calculator gives exact p-values for small samples without ties and a tie-corrected normal approximation otherwise. It also shows a rank table, effect size r, the rank-biserial correlation and an APA sentence.
When to use the Mann-Whitney U test
- Two independent groups (different people in each).
- A numeric or ordinal outcome that is clearly skewed, has outliers, or is a rating scale.
- Small samples where you can’t rely on normality.
If the data are roughly normal, the independent t-test is slightly more powerful. For paired data, use the Wilcoxon signed-rank test.
How it works
- Pool both groups and rank all the values from smallest to largest. Tied values share the average of their ranks.
- Add up the ranks in group 1 to get R₁.
- Convert to the U statistic: U₁ = R₁ − n₁(n₁ + 1)/2, and U₂ = n₁n₂ − U₁.
- Compare U with its distribution under H₀, exactly for small samples or with a normal approximation for larger ones.
U₁ = R₁ − n₁(n₁ + 1) ÷ 2 · z = (U₁ − n₁n₂/2) ÷ σ_U · r = |z| ÷ √N
Exact or normal approximation?
In “Automatic” mode the calculator uses the exact distribution of U when there are no ties and at least one group has 8 or fewer values. Otherwise it uses the normal approximation with tie and continuity corrections. This is the same rule SciPy uses, so your results will match Python.
Effect size
Report r = z ÷ √N (about 0.1 small, 0.3 medium, 0.5 large) or the rank-biserial correlation, which ranges from −1 to 1. The rank-biserial correlation is the difference between the proportion of pairs where group 1 is higher and the proportion where group 2 is higher.
Frequently asked questions
Does the Mann-Whitney test compare medians?
Strictly, it tests whether a value from one group tends to be larger than a value from the other. If the two distributions have the same shape, that is equivalent to a difference in medians, which is why medians are usually reported alongside it.
Why does SPSS give a different U?
Software differs on whether it reports U₁, U₂ or the smaller of the two. This calculator shows both in the rank table and reports the smaller one, as most textbooks do. The p-value is the same either way.