Mann Whitney U Calculator
Run the Mann-Whitney U test to compare two independent groups by rank, without assuming the data are normally distributed.
Mann Whitney U Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser — no data is sent to any server.
Formula: U₁ = n₁n₂ + n₁(n₁+1)/2 - R₁
Worked example — U = 10, R1 = 30, R2 = 25 | 10 is well above the critical value 2, so the groups do not differ
Formula
U₁ = n₁n₂ + n₁(n₁+1)/2 - R₁
Non-parametric test comparing two independent groups without assuming normality.
Worked Examples
Example 1: Two interleaved samples
Problem:Group 1: 3, 4, 6, 8, 9 | Group 2: 1, 2, 5, 7, 10
Solution:Pool the 10 values and rank them 1 to 10 (no ties here): 1=1, 2=2, 3=3, 4=4, 5=5, 6=6, 7=7, 8=8, 9=9, 10=10. R1 = 3 + 4 + 6 + 8 + 9 = 30 and R2 = 1 + 2 + 5 + 7 + 10 = 25 (they sum to 55 = 10 x 11 / 2). U1 = n1 x n2 + n1(n1+1)/2 - R1 = 25 + 15 - 30 = 10. U2 = 25 + 15 - 25 = 15. Check: U1 + U2 = 25 = n1 x n2. U = min(10, 15) = 10. For n1 = n2 = 5 the two-tailed 5 percent critical value is 2.
Result:U = 10, R1 = 30, R2 = 25 | 10 is well above the critical value 2, so the groups do not differ
Example 2: Two clearly separated samples
Problem:Group 1: 1, 2, 3, 4 | Group 2: 7, 8, 9, 10
Solution:Pooled ranks: 1=1, 2=2, 3=3, 4=4, 7=5, 8=6, 9=7, 10=8. R1 = 1 + 2 + 3 + 4 = 10 and R2 = 5 + 6 + 7 + 8 = 26 (total 36 = 8 x 9 / 2). U1 = 16 + 10 - 10 = 16 and U2 = 16 + 10 - 26 = 0. U = 0, the smallest value possible, meaning every Group 1 value is below every Group 2 value. For n1 = n2 = 4 the two-tailed 5 percent critical value is 0, so U = 0 reaches significance.
Result:U = 0 (complete separation) | Significant at alpha = 0.05 for n1 = n2 = 4
Frequently Asked Questions
What does the Mann-Whitney U test measure?
The Mann-Whitney U test evaluates whether two independent groups come from the same distribution, specifically testing whether observations from one group tend to have larger or smaller values than observations from the other group. U represents the number of times a value from one group outranks a value from the other group across all possible pairings.
How do you interpret the U statistic and determine significance?
Compare the smaller of U₁ and U₂ against a critical value table for your sample sizes at your chosen α (e.g., 0.05). For larger samples (n > 20), U can be converted to a Z-score using the normal approximation: Z = (U − n₁n₂/2) / √(n₁n₂(n₁+n₂+1)/12). A p-value below α means you reject the null hypothesis that the two group distributions are identical.
When should I use Mann-Whitney U instead of an independent samples t-test?
Use Mann-Whitney U when data is ordinal, when distributions are heavily skewed or non-normal (particularly with small samples), or when significant outliers are present. The independent t-test is preferred when normality holds because it has more statistical power. Mann-Whitney is also appropriate when comparing groups with very different shapes even if sample sizes are large.
What are the assumptions of the Mann-Whitney U test?
The two groups must be independent; observations within each group must be independent of each other; the measurement scale must be at least ordinal; and both distributions should have the same shape (though not necessarily normal) to interpret the test as comparing medians. It does not require normal distributions or equal variances, making it robust in a wide range of situations.
How are U₁, U₂ and the rank sums related to each other?
Once every observation from both samples is pooled and ranked, the two rank sums are fixed and so are the two U values. The pair always satisfies U₁ + U₂ = n₁n₂, the total number of cross-group pairings, so the two statistics carry exactly the same information. Taking the minimum is only a convention that lets one critical-value table serve both directions of the comparison.
How does the test handle tied observations between the two groups?
Tied values receive mid-ranks, the average of the ranks that the tied block occupies: three values sharing ranks 4, 5 and 6 each become rank 5. That keeps the total rank sum intact and leaves U well defined, but ties shrink the true variance of U, so a tie-correction term based on the size of each tied block should be subtracted before the normal approximation is used.
Which effect size should I report alongside a significant U statistic?
Report the common-language effect size: the number of cross-group pairings in which a group 1 value outranks a group 2 value, divided by n₁n₂. That proportion, also called the probability of superiority, is directly interpretable, with 0.5 meaning neither group tends to sit higher. The rank-biserial correlation rescales the same quantity to the range −1 to +1. A p-value alone says nothing about how far apart the groups are.
Does a significant result prove that the two medians differ?
Only if you are willing to assume the two distributions share the same shape and spread and differ at most by a location shift. Under that assumption it is a test of medians. Without it, significance means only that values in one group tend to rank higher, which can also happen when the medians coincide but the spreads or the skew differ. Plot both distributions before wording the conclusion.
Why is the Mann-Whitney U test also called the Wilcoxon rank-sum test?
They are the same test expressed two ways. Wilcoxon worked directly with the rank sum of one sample, while Mann and Whitney counted pairwise wins; because U is a fixed linear transformation of the rank sum, the two always produce identical p-values. Do not confuse the rank-sum test, which compares two independent samples, with the Wilcoxon signed-rank test, which is for paired data.
When should I use exact p-values instead of the normal approximation?
With small groups, roughly under twenty observations each, the permutation distribution of U is visibly lumpy and the smooth normal curve can misstate the p-value, particularly near the decision threshold. Use exact critical-value tables or a permutation routine there. For larger samples the approximation is dependable, and applying a continuity correction of 0.5 to the numerator of Z improves it further.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator · Editorial policy
Related Calculators
🧮Annulus Area Calculator
Calculate annulus area with inputs, formulas, and instant results.
🧮Area Calculator
Calculate area with inputs, formulas, and instant results.
🧮Area of a Rectangle Calculator
Calculate the area, perimeter, and diagonal of a rectangle. Find missing sides from known area. Convert between metric and imperial area units.
🧮Area of Crescent Calculator
Calculate area of crescent with inputs, formulas, and instant results.
🧮Center of Mass Calculator
Calculate center of mass with inputs, formulas, and instant results.
🧮Centroid Calculator
Calculate centroid with inputs, formulas, and instant results.
🧮Chord Length Calculator
Calculate chord length with inputs, formulas, and instant results.
🧮Conic Sections Calculator
Calculate conic sections with inputs, formulas, and instant results.