How it’s calculated
The Mann-Whitney U test (also called the Wilcoxon rank-sum test) compares two independent groups using ranks instead of the raw values, so it does not assume the data are normally distributed. All values are ranked together (1 = smallest); tied values share the average of the ranks they span. If the groups come from the same distribution, each group’s ranks should be mixed evenly; a large imbalance in the rank sums gives a small p-value.
The p-value comes from the standard normal distribution. Without the continuity correction, z² equals the Kruskal–Wallis H statistic for two groups, so both tests give the same p-value.
Example (Handbook of Biological Statistics, LibreTexts): FST values for 6 DNA polymorphisms (group A) and 14 proteins (group B) in the American oyster. The two values of −0.005 tie for ranks 2 and 3, so each gets 2.5. Group A’s rank sum is 60.5 against an expected 63, so U_A = 60.5 − 21 = 39.5 and U_B = 84 − 39.5 = 44.5. The tie-corrected standard deviation is 12.115, z = (39.5 − 42) ÷ 12.115 = −0.206 and the two-sided p ≈ 0.84, matching the book’s Kruskal–Wallis result (H = 0.0426, P = 0.8365). These are the default values.
A small p-value says the rank pattern would be unusual if the groups were the same; it does not measure how big the difference is. The test is often described as comparing medians, but that is only true when both groups have the same shape of distribution.
Frequently asked questions
When should I use the Mann-Whitney test instead of a t-test?
When the two groups are independent and the data are ranks, or strongly skewed with small samples. For roughly normal data the two-sample t-test is usually more powerful.
Is the Mann-Whitney U test the same as the Wilcoxon rank-sum test?
Yes. They use different statistics (U and the rank sum W) that differ by a constant, and give the same p-value.
Should I use the continuity correction?
It makes little difference except with small samples, where it gives a slightly larger p-value. Pick one approach in advance and report which you used. With very small groups an exact test is better than either.
Does a significant result mean the medians differ?
Only if both groups have distributions of the same shape. In general it shows that values in one group tend to be larger than in the other.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- Handbook of Biological Statistics (McDonald), 4.8 Kruskal–Wallis Test (includes the Mann–Whitney U test) — LibreTexts
- The Mann-Whitney U Test (Shier), with the tie-corrected standard deviation — statstutor (UK universities’ statistics support)
- Dataplot Reference Manual: Mann Whitney U Statistic — NIST
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator