Mann-Whitney U Test Calculator
Comparing Two Groups Without Assuming Normality
The Mann-Whitney U test (also called the Wilcoxon rank-sum test) compares two independent samples when the data can't be trusted to follow a normal distribution — skewed measurements, ordinal survey ratings, or small samples where a t-test's assumptions are shaky. Instead of comparing means, it ranks every observation from both groups together and checks whether one group's ranks systematically outrank the other's.
The Formula
U2 = n1n2 − U1
U = min(U1, U2)
z = (U − meanU) / σU
meanU = n1n2/2, σU tie-corrected
Where R1 is the sum of ranks assigned to Group 1 within the combined, sorted dataset (using average ranks for ties).
Worked Example
Group 1: 12, 15, 18, 20. Group 2: 10, 14, 16, 19.
| Quantity | Value |
|---|---|
| n1, n2 | 4, 4 |
| U | 6.0 |
| z | −0.5774 |
| Two-tailed p-value | 0.5637 |
Computed directly from the calculator's ranking and normal-approximation formula.
With such small samples and closely interleaved values, the test finds no statistically significant difference between the two groups — a p-value well above the usual 0.05 threshold.
Where This Calculation Matters
- Non-normal or ordinal outcomes — Likert-scale survey responses, reaction times, and income data are all frequently skewed enough that a t-test's normality assumption is questionable, making this test the safer default.
- Small samples — with few observations, it's hard to verify normality at all, and this test doesn't require it.
- Outlier-resistant comparisons — because it works on ranks rather than raw values, a single extreme outlier has far less influence than it would on a mean-based test.
How to Use This Calculator
- Enter Group 1 values as a comma-separated list.
- Enter Group 2 values as a comma-separated list.
- Select Calculate to get the U statistic, z-score, and two-tailed p-value.
Related Calculations
For paired (before/after) non-parametric comparisons, use the Wilcoxon Signed-Rank Calculator. When normality can be assumed, the parametric equivalent is the T-Test Calculator.