Mann-Whitney U Test Calculator
Compare two independent groups without assuming normality, with an exact p-value for small samples.
What the Mann-Whitney U test does
The Mann-Whitney U test (also called the Wilcoxon rank-sum test) compares two independent groups without assuming that the data are normally distributed. Instead of comparing means, it ranks all the values together and checks whether the values in one group tend to be higher than in the other. It is the usual alternative to the independent t-test for ordinal data, small samples and skewed data.
When to use it
| Situation | Test |
|---|---|
| Two independent groups, roughly normal data | Independent t-test |
| Two independent groups, skewed data, outliers or a small sample | Mann-Whitney U |
| Ordinal data, such as ratings from 1 to 5 | Mann-Whitney U |
| The same people measured twice | Wilcoxon signed-rank test (paired) |
Worked example
Seven patients took treatment A and eight took treatment B, and their recovery scores were compared. Group 1 has a median of 15.5 and Group 2 has a median of 12.6. The rank sums give U = 6, and the exact two-tailed p-value is 0.0093, so Group 1 scored significantly higher. The effect size is r = 0.66 (large). In APA style: U = 6, z = 2.55, p = .009, r = 0.66.
How it is calculated
- Rank all values from both groups together, giving tied values the average of their ranks.
- U₁ = R₁ − n₁(n₁ + 1) ÷ 2, where R₁ is the rank sum of Group 1, and U₂ = n₁n₂ − U₁.
- The p-value is exact (all possible arrangements are counted) when there are no ties and each group has 30 values or fewer. Otherwise the calculator uses the normal approximation with tie and continuity corrections.
- The effect size r = |z| ÷ √N: about 0.1 is small, 0.3 medium and 0.5 large. The tool also shows the probability that a random value from Group 1 is higher than one from Group 2.
The test compares the whole distributions, so it is a test of medians only when the two groups have a similar shape. For three or more groups, use the Kruskal-Wallis test.
How to cite this page
CalcPulse. (2026). Mann-Whitney U Test Calculator. https://calcpulse.com/mann-whitney-u-test-calculator/
Frequently asked questions
What is the Mann-Whitney U test?
A non-parametric test that compares two independent groups by ranking all the values, without assuming a normal distribution.
What is the difference between Mann-Whitney U and the Wilcoxon rank-sum test?
They are the same test, with the same p-value. The statistics are reported differently (U or W).
When should I use it instead of a t-test?
When the data are ordinal, strongly skewed, have outliers, or the samples are small and not normal.
What does the U value mean?
The number of times a value in one group beats a value in the other. U close to n₁n₂ ÷ 2 means no difference.
How do I report the result?
Give U, z, the p-value and the effect size r, for example: U = 6, z = −2.6, p = .008, r = 0.67.
Last updated