Intermediate

Mann-Whitney U Test Calculator

The Mann-Whitney U test (also called the Wilcoxon rank-sum test) compares two independent groups without assuming normality. Enter the group sizes and the rank-sum of Group 1 to get the U statistic, z-score, and two-tailed p-value using the large-sample normal approximation.
Number of observations in Group 1
Number of observations in Group 2
Sum of the ranks assigned to Group 1 observations (ranks 1 to n₁+n₂)

Significance level (α)

p-value (two-tailed)
0.7416

Fail to reject H₀ — no significant difference detected at this α level.

U statistic
55
U₁ / U₂
55 / 65
z-score
-0.3297
Mean μ_U
60
Std dev σ_U
15.1658
Conclusion
Not significant
z=-0.33Standard normal distribution — shaded area shows one tail of the two-tailed p-value
Step by step
  1. 1

    U₁ statistic

    10 × 12 + 10 × (10+1) ÷ 2 − 120 = 55
  2. 2

    U₂ statistic

    10 × 12 − 55 = 65
  3. 3

    Test statistic U

    min(55, 65) = 55
  4. 4

    Mean μ_U

    10 × 12 ÷ 2 = 60
  5. 5

    Std dev σ_U

    √(10 × 12 × (10+12+1) ÷ 12) = 15.1658
  6. 6

    z-score

    (55 − 60) ÷ 15.1658 = -0.3297
    Two-tailed p-value = 2 × (1 − Φ(|z|)) via the standard normal CDF.
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

The Mann-Whitney U test ranks all observations together and computes U = min(U₁, U₂). Under the null hypothesis U follows a known distribution (approximated by a normal for n > 8). The two-tailed p-value tells you the probability of seeing a U this extreme or more by chance; p < α means the groups are significantly different.

Formula
U₁ = n₁·n₂ + n₁(n₁+1)/2 − R₁ • z = (U − n₁n₂/2) / √(n₁n₂(n₁+n₂+1)/12)
How this is calculated

The Mann-Whitney U test ranks all observations from both groups together (1 to n₁+n₂), then computes U₁ = n₁·n₂ + n₁(n₁+1)/2 − R₁, where R₁ is the sum of ranks for Group 1. U₂ = n₁·n₂ − U₁ follows automatically, and U = min(U₁, U₂) is used for the test. Conceptually, U counts the number of times a Group 1 observation outranks a Group 2 observation (or vice versa), making it a measure of stochastic dominance between the groups.

For large samples (n₁ > 8 and n₂ > 8) U is approximately normally distributed under H₀ (the two populations have equal distributions) with mean μ_U = n₁·n₂/2 and standard deviation σ_U = √(n₁·n₂(n₁+n₂+1)/12). The standardised z-score is passed through the standard normal CDF to produce the two-tailed p-value. If the data contain many ties, a tie-correction factor reduces σ_U slightly; this calculator uses the untied formula, which is conservative.

For small samples the normal approximation is less reliable; consult exact U-distribution tables instead. As with all hypothesis tests, statistical significance (small p-value) does not imply practical importance — always report a measure of effect size alongside the test result.

Frequently asked questions

Use the Mann-Whitney U test when the data are ordinal, when the normality assumption of the t-test is seriously violated (especially with small samples), or when you want a test that is robust to outliers. The t-test is more powerful when both groups are genuinely normally distributed.

Pool all n₁ + n₂ observations and rank them from 1 (smallest) to n₁ + n₂ (largest), averaging ranks for tied values. R₁ is the sum of the ranks that belong to Group 1. In software like R, wilcox.test() returns the W statistic, which equals U₁ here. In Python, scipy.stats.mannwhitneyu() returns U₁ directly.

No. The tie correction reduces σ_U and produces a slightly larger (more significant) z-score. When many values are tied the correction can matter; if ties are numerous, use statistical software that implements the full tie-corrected formula or an exact permutation test.

Also known as

mann whitney u test calculator
wilcoxon rank sum test calculator
u statistic p value
nonparametric two sample test
rank sum calculator
mann whitney significance test
independent samples u test

APA

TG we-Calculate Editorial Team. (2026). Mann-Whitney U Test Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/u-test-calculator

Chicago

TG we-Calculate Editorial Team. "Mann-Whitney U Test Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/u-test-calculator.

IEEE

TG we-Calculate Editorial Team, "Mann-Whitney U Test Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/u-test-calculator

BibTeX

@misc{wecalculate_u_test_calculator, title = {Mann-Whitney U Test Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/u-test-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?