Mann–Whitney U Test Calculator (Wilcoxon Rank-Sum)
Compare two independent groups without assuming normality using the Mann–Whitney U test, with exact or normal p-values, rank sums and effect size.
Statistical results depend on the assumptions stated in the formula. Check that your data meet them before drawing conclusions.
What is the Mann–Whitney U test?
The Mann–Whitney U test is a nonparametric test for whether two independent groups come from the same distribution. Instead of the raw values it uses their ranks, so it does not assume normality and is robust to outliers. It is also called the Wilcoxon rank-sum test.
How to use this calculator
Paste the values for each group. The calculator ranks all values together, averaging tied ranks, adds the ranks of each group, and computes U. With no ties and up to 30 values per group it uses the exact distribution of U; otherwise it uses the normal approximation with continuity and tie corrections.
Formula
Rank all N = n₁ + n₂ values. R₁ = sum of group 1 ranks. U₁ = R₁ − n₁(n₁ + 1)/2, U₂ = n₁n₂ − U₁, U = min(U₁, U₂). Under H₀, mean of U = n₁n₂/2 and σ = √{n₁n₂/12 × [(N + 1) − Σ(t³ − t)/(N(N − 1))]}, where t is the size of each group of tied values. z = (U₁ − n₁n₂/2 ∓ 0.5)/σ.
Terms in the formula
- n₁, n₂
- Sizes of groups 1 and 2.
- R₁
- Sum of the ranks of group 1.
- U₁, U₂
- Counts of cross-group pairs in which each group's value is larger.
- t
- Number of values in each group of ties.
- z
- Standardised U for the normal approximation.
Understanding your result
A p-value below your significance level means values in one group tend to be higher than in the other. U₁ near n₁n₂/2 means the groups overlap heavily; U₁ near 0 or n₁n₂ means almost complete separation. Report U, the p-value and an effect size, and remember that a non-significant result does not prove the groups are identical.
Calculator credits
Calculator developmentJulia Edwards
Editorial supervisionSamad Aslam Khan
Expert reviewSaeedM.Phil Statistics, Data Scientist
Published byThe Calculatorz
Last updated
Read how we research, test, review and correct our calculators in our editorial policy.
Frequently asked questions
When should I use the Mann–Whitney U test?
To compare two independent groups when the data are ordinal, skewed or have outliers, so a two-sample t-test's normality assumption is doubtful.
Is Mann–Whitney the same as the Wilcoxon rank-sum test?
Yes. They are equivalent tests that give the same p-value; Mann and Whitney expressed Wilcoxon's rank sum as the U statistic.
Does the Mann–Whitney test compare medians?
Only when both groups have distributions of the same shape. In general it tests whether values in one group tend to be larger than in the other (stochastic dominance).
What is the exact p-value?
With small samples and no ties, the calculator computes the exact probability of each U value under the null hypothesis, which is more accurate than the normal approximation.
How are ties handled?
Tied values receive the average of the ranks they span, and the standard deviation of U is reduced with the standard tie correction.
What does the effect size r mean?
r = |z| ÷ √N. Roughly, 0.1 is small, 0.3 medium and 0.5 large. The probability of superiority, U₁ ÷ (n₁n₂), is often easier to explain.
References & methodology sources
These sources support the calculator’s formula, definitions, thresholds, units or result interpretation.
- Mann, H. B., & Whitney, D. R. (1947). On a test of whether one of two random variables is stochastically larger than the other. The Annals of Mathematical Statistics, 18(1), 50–60. View source
- Wilcoxon, F. (1945). Individual comparisons by ranking methods. Biometrics Bulletin, 1(6), 80–83. View source
- Fay, M. P., & Proschan, M. A. (2010). Wilcoxon–Mann–Whitney or t-test? On assumptions for hypothesis tests and multiple interpretations of decision rules. Statistics Surveys, 4, 1–39. View source
- Croarkin, C., & Tobias, P. (Eds.). (2012). NIST/SEMATECH e-handbook of statistical methods. National Institute of Standards and Technology. View source