The Mann-Whitney U test (also called the Wilcoxon rank-sum test) compares two independent groups when the data are ordinal or not normally distributed, for example urban and rural students’ answers on a 5-point Likert item. It is the non-parametric alternative to the independent samples t test. Paste the two groups to get SPSS-style rank and test statistics tables, the effect size r and a ready APA 7 sentence.
How to use this calculator
- Put each group in its own column (group sizes can differ).
- Copy both columns, with group names in the first row if you like, and paste them.
- Click Calculate.
- Report the medians of both groups, U, z, p and the effect size r.
Formula
Rank all N = n₁ + n₂ values together (ties get the average rank) U₁ = R₁ − n₁(n₁ + 1)/2, U₂ = n₁n₂ − U₁, U = min(U₁, U₂) z = (U₁ − n₁n₂/2) / √[(n₁n₂/12)((N + 1) − Σ(t³ − t)/(N(N − 1)))] Effect size r = |z| / √N
Step-by-step example
- Likert item scores: Urban (n = 8) and Rural (n = 10) students (click Load example).
- Sum of ranks: Urban R₁ = 109.5, Rural R₂ = 61.5.
- U₁ = 109.5 − 8 × 9 / 2 = 73.5; U = min(73.5, 6.5) = 6.5.
- z = 3.05, p = .002, r = .72 (a large effect).
How to interpret the results
If p is below .05, the two groups differ in their distributions; when the two distributions have a similar shape, this can be read as a difference in medians. Report medians rather than means. The effect size r = |z|/√N is about .10 for a small, .30 for a medium and .50 for a large effect.
How to report it in APA 7 style
A Mann-Whitney U test indicated that urban students (Mdn = 4.00, n = 8) scored significantly higher than rural students (Mdn = 2.00, n = 10), U = 6.5, z = 3.05, p = .002, r = .72.
Statistical symbols (t, F, p, r, M, SD, N, d) should be italicised in your thesis.
Assumptions
- The dependent variable is ordinal or continuous.
- The two groups are independent (different participants).
- Observations are independent within each group.
- To interpret the result as a difference in medians, the two distributions should have a similar shape.
How to do it in SPSS, R or Excel
SPSS: Analyze → Nonparametric Tests → Legacy Dialogs → 2 Independent Samples → Mann-Whitney U. R: wilcox.test(y ~ group, correct = FALSE, exact = FALSE). Python: scipy.stats.mannwhitneyu(..., method='asymptotic', use_continuity=False), which ScholarCalc’s results were validated against.
Roman Urdu mein khulasa
Mann-Whitney U test do alag groups ko compare karta hai jab data normal na ho ya ordinal ho, jaise aik Likert item (1–5). Ye independent t test ka non-parametric mutabadil hai. Ye means ke bajaye ranks compare karta hai, is liye thesis mein medians report karein. p 0.05 se kam ho to farq significant hai, aur effect size r farq ki taqat batata hai.
Frequently asked questions
When should I use Mann-Whitney U instead of an independent t test?
Use it when the outcome is ordinal (such as a single Likert item), when the data are clearly skewed with small samples, or when there are extreme outliers.
Is the Mann-Whitney U test the same as the Wilcoxon rank-sum test?
Yes. They are equivalent tests; SPSS reports both U and Wilcoxon W in the same table.
Does the test compare medians?
It compares whole distributions (whether values in one group tend to be larger). It can be read as a comparison of medians only when both groups’ distributions have a similar shape.
How are ties handled?
Tied values receive the average of their ranks, and the z statistic includes a tie correction, as in SPSS’s asymptotic significance.
What effect size should I report?
Report r = |z| / √N. Values of about .10, .30 and .50 are commonly read as small, medium and large.
How do I report the Mann-Whitney U test in APA?
Give both medians and group sizes, then U, z, p and r, for example: U = 6.5, z = 3.05, p = .002, r = .72.
Related calculators
- Independent Samples t Test Calculator
- Kruskal-Wallis Test Calculator with Dunn Post Hoc
- Wilcoxon Signed-Rank Test Calculator
- Not sure which test to use? Try the test chooser
Cite this calculator
If ScholarCalc helped your analysis, you can cite it in APA 7 format:
ScholarCalc. (2026). Mann-Whitney U Test Calculator [Web application]. https://scholarcalc.com/mann-whitney-u-test-calculator/
Written and maintained by the ScholarCalc team. Last reviewed: November 2026.
Accuracy: results are computed in your browser and were validated against Python scipy, statsmodels and pingouin on test datasets. See Methodology and accuracy.