Mann-Whitney U Test Calculator: Compare Two Groups Without Assuming Normality
A rank-based test for two independent groups, without the normal distribution assumption.
Engineering student calculators
Free textbook calculators with every step shown, so you can check your own working. Pick one, type in your numbers and see the formulas worked out. Or switch to Ask a question for an explained answer. No account needed.
Calculated from standard textbook formulas, with every step shown. The formulas are fixed, so the working does not need checking: what matters is the numbers you type in. Use these calculators only if you are competent to choose the inputs (loads, material strength, dimensions, supports) and check your units and assumptions. For learning and checking your own working: design and sign-off are for a qualified engineer. Drafting Central does not store the numbers you type.
How this calculator works
Enter the number of values and the values for each group.
Enter the significance level.
The calculator ranks all the values, then gives U, the exact and normal p-values, the medians and the effect size.
Formulas used
- U_1 = R_1 - \frac{n_1(n_1 + 1)}{2}
- U = \min(U_1, U_2)
- z = \frac{|U - n_1n_2/2| - 0.5}{\sigma_U}
Worked example
With the default numbers in the calculator above:
- Median of each group: 14.5 and 20.5
- Sum of the ranks of group 1 (the combined values are ranked from smallest, tied values share the average rank): 38 (and 98 for group 2)
- U for each group: 2 and 62
- The test statistic U (the smaller of the two): 2
- Normal approximation: z with a correction for ties and for continuity: 3.1027 (the standard deviation of U is 9.5079)
- Two-tailed p-value by the normal approximation: 0.0019177
- Exact two-tailed p-value: the share of all 12870 ways of splitting the ranks that are as extreme as yours: 0.000777
- Chance that a value from group 1 is larger than one from group 2 (ties count half): 0.03125
- Rank-biserial correlation (effect size, from -1 to 1): -0.9375
Change the numbers in the calculator to see the full working, every step, for your own case.
Common questions
When do I use the Mann-Whitney test?
To compare two independent groups when the values are not normally distributed, the sample is small, or the data are ranks or scores.
What does it test?
Whether values in one group tend to be larger than values in the other. If the shapes are similar, it compares the medians.
Is it the same as the Wilcoxon rank-sum test?
Yes. They are two names for the same test.
Related calculators
Got a question about this? Ask an engineering question and get a plain-language answer with references.
Further reading: Any statistics text (non-parametric tests, the Mann-Whitney U test).
Need a calculator we do not have?
Embed this calculator on your own page
Copy this code into your page. The calculator runs inside the frame and links back to Drafting Central.
Need this drawn, designed or checked?
Drafting Central is a mechanical engineering and drafting business working with customers across Australia and around the world. A calculator gives you the numbers; we can turn them into drawings and designs.
Need help with a real project?
Talk to Drafting Central →