The Mann-Whitney U test (also called the Wilcoxon rank-sum test) compares two independent groups when you cannot, or should not, compare their means with a t-test. Instead of means, it works with the ranks of the scores, which makes it a good choice for ordinal data, small skewed samples and data with outliers.
This guide explains when to choose it, what it actually tests, how to read the output and how to report it.
In this guide
When should you use the Mann-Whitney U test?
Choose it over the independent samples t-test when:
- your outcome is ordinal, for example a single 5- or 7-point Likert item, a pain rating or a ranking;
- your sample is small (say, fewer than 20–30 per group) and clearly skewed;
- there are outliers you cannot justify removing;
- you are comparing things like waiting times, incomes or counts, which are often heavily right-skewed.
The design requirements are the same as for the independent t-test: two groups, and different people in each group. For two related measurements (the same people before and after), use the Wilcoxon signed-rank test. For three or more groups, use the Kruskal-Wallis test.
What does the Mann-Whitney U test actually test?
The test pools both groups, ranks all the scores from lowest to highest, and checks whether one group's ranks tend to be higher than the other's. Formally, it tests whether a randomly chosen score from group A is equally likely to be higher or lower than a randomly chosen score from group B.
It is often described as a "test of medians", but that is only true if the two distributions have the same shape (one is just shifted relative to the other). If the shapes differ, report it as a difference in rank distributions or mean ranks, not medians.
Assumptions
- Two independent groups.
- An outcome that is at least ordinal.
- Independent observations.
- For a median interpretation: similar distribution shapes in both groups.
Normality is not required.
How the U statistic is calculated
- Rank all N = n₁ + n₂ scores together. Tied scores get the average of the ranks they span.
- Add up the ranks in each group (R₁ and R₂).
- Compute U₁ = n₁n₂ + n₁(n₁ + 1)/2 − R₁, and U₂ = n₁n₂ − U₁.
- The test statistic U is the smaller of U₁ and U₂.
For larger samples, U is converted to a z-score (with a correction for ties), which gives the p-value. For small samples without many ties, an exact p-value is better. The free calculator chooses between exact and asymptotic p-values for you.
Worked example
A company asks customers to rate their support experience from 1 (very poor) to 7 (excellent). 18 customers used in-app chat and 20 used email. Because the outcome is a single rating item, the Mann-Whitney U test is appropriate.
| Group | n | Median | Mean rank |
|---|---|---|---|
| In-app chat | 18 | 5.5 | 23.50 |
| 20 | 4.5 | 15.90 |
Result: U = 108, z = 2.15, p = .032.
Interpretation: customers who used in-app chat gave significantly higher ratings than customers who used email. Their mean rank was 23.50 compared with 15.90.
Effect size r
The usual effect size is r = z / √N:
r = 2.15 / √38 = .35
Cohen's rough benchmarks for r are .10 (small), .30 (medium) and .50 (large), so this is a medium effect. Some researchers report the rank-biserial correlation instead; both describe how strongly group membership relates to the ranks.
How to report the Mann-Whitney U test in APA 7
Report the medians (or mean ranks), U, z, the exact p-value and r.
A Mann-Whitney U test showed that customers who used in-app chat rated their support experience higher (Mdn = 5.5) than customers who used email (Mdn = 4.5), U = 108, z = 2.15, p = .032, r = .35.
If the distributions have different shapes, report mean ranks instead of medians:
Ratings were higher in the chat group (mean rank = 23.50) than in the email group (mean rank = 15.90), U = 108, z = 2.15, p = .032, r = .35.
Mann-Whitney U vs t-test: which has more power?
A common worry is that nonparametric tests "lose power". When data really are normal, the Mann-Whitney U test is about 95% as efficient as the t-test, so you lose very little. When data are heavily skewed or have outliers, it can be considerably more powerful than the t-test. In other words, it is a safe choice when you are unsure.
| Independent t-test | Mann-Whitney U test | |
|---|---|---|
| Compares | Means | Rank distributions |
| Outcome | Continuous | Ordinal or continuous |
| Normality needed | Approximately (or large n) | No |
| Sensitive to outliers | Yes | Much less |
| Effect size | Cohen's d | r or rank-biserial correlation |
Common mistakes
- Calling it a test of medians when the group distributions have clearly different shapes.
- Using it for paired data. Before-and-after data from the same people need the Wilcoxon signed-rank test.
- Leaving out the effect size. A p-value alone does not tell readers how big the difference is.
- Running it on summed scale scores with large samples just because a normality test was significant. With large samples, the t-test is usually fine; look at the plots before deciding.
Frequently asked questions
Is the Mann-Whitney U test the same as the Wilcoxon rank-sum test?
Yes. They are two versions of the same test and give the same p-value. Note that the Wilcoxon signed-rank test is a different test, used for paired data.
When should I use Mann-Whitney instead of a t-test?
Use it when the outcome is ordinal (such as a single Likert item), when samples are small and skewed, or when outliers would distort the means.
Does the Mann-Whitney U test compare medians?
Only if both groups have distributions of similar shape. Otherwise it compares the overall rank distributions, and you should report mean ranks.
How do I calculate the effect size for a Mann-Whitney U test?
Divide the z statistic by the square root of the total sample size: r = z / √N. Values around .10, .30 and .50 are commonly read as small, medium and large.