Mann-Whitney U Test Calculator
Calculate the Mann-Whitney U test to compare two independent samples without normality assumptions.
Shows U statistic, z-score, and two-tailed p-value.
Mann-Whitney U Test (Wilcoxon Rank-Sum Test)
The Mann-Whitney U test compares two independent groups to determine if one tends to have larger values than the other. It is a non-parametric alternative to the independent samples t-test, with no normality assumption needed.
When to use it:
- Two independent groups of data
- Data is not normally distributed
- Ordinal data (ranked categories)
- Comparing medians of two groups
The U statistic:
U1 = n1n2 + n1(n1+1)/2 - R1 U2 = n1*n2 - U1
Where n1, n2 are group sizes and R1 is the sum of ranks assigned to Group 1.
Normal approximation (the standard route once the groups get large):
mu_U = n1 * n2 / 2 sigma_U = sqrt( n1n2(n1+n2+1) / 12 ) z = (U - mu_U) / sigma_U
Interpretation:
| p-value | Interpretation |
|---|---|
| p < 0.001 | Very strong evidence groups differ |
| p < 0.01 | Strong evidence groups differ |
| p < 0.05 | Moderate evidence groups differ |
| p >= 0.05 | Insufficient evidence groups differ |
Null hypothesis: Both groups come from the same distribution. A significant result means one group tends to produce higher values than the other.
Effect size (rank-biserial correlation): r = 1 - (2 * U1) / (n1 * n2) Values near +1 or -1 indicate a large effect; near 0 indicates no effect. The sign carries the direction: positive means Group 1 tends to be higher, negative means Group 2 does. This is why the formula uses U1 rather than the smaller of the two U values. Feeding it min(U1, U2) throws the sign away and makes every result look positive, which hides exactly the thing you ran the test to learn.
Tie correction: When tied ranks exist, the standard deviation is adjusted: sigma_U = sqrt( n1n2/12 * (N+1 - sum(t^3-t) / (N(N-1))) ) where N = n1+n2 and t = size of each tied rank group.
Exact versus approximate p-values: The normal approximation above is a convenience for larger samples. With small groups it is noticeably off, and both groups being under about 8 is where it strays most. For small samples with no ties this calculator counts the null distribution directly instead: it works out how many of the possible rank splits give a U at least as extreme as yours, and divides. That is the exact p-value, and it is what published Mann-Whitney tables contain. The page tells you which one it used. Ties make the exact count invalid, so with ties present it falls back to the tie-corrected normal approximation and says so.
How we build and check this calculator
This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.
SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.