Run the Mann-Whitney U (Wilcoxon rank-sum) test on two independent groups, the Wilcoxon signed-rank test on paired data, and the Brunner-Munzel test under unequal variances. Exact and asymptotic p-values, ties-corrected z, rank-biserial r, Cliff's delta, CLES, and Hodges-Lehmann median with 95% CI. Enter the two groups by hand or import them straight from a comma-separated values file or an Excel spreadsheet. Reproducible R, Python, and APA output.
Upload a spreadsheet with two value columns (one per group) or a long-format group column plus a value column. The two samples and their labels populate the boxes above.
Drag & drop a file or
CSV, TSV, Excel (.xlsx/.xls) - max 500 rows
Use Mann-Whitney U when comparing two independent groups on a continuous or ordinal outcome that is not normally distributed. The exact p-value is reported when there are no ties and total N ≤ 30; otherwise the calculator falls back to the tied-data-corrected normal approximation with continuity correction (R's default). For paired data, use the Wilcoxon signed-rank tab.
Medium effect (|r| ≈ .3–.5).
Frank Wilcoxon (1945) introduced two rank-based procedures in a single short paper: one for paired observations (now the Wilcoxon signed-rank test) and one for two independent samples of equal size (the Wilcoxon rank-sum test). Two years later, Mann and Whitney (1947) generalised the rank-sum to unequal sample sizes and reformulated the statistic as a count of pairwise wins, which they called U. The two statistics are algebraically equivalent (U = W − n(n + 1) / 2), but historical accident left us with two names for the same test. R reports W; SPSS, SciPy, and the textbooks of the biostatistical tradition report U.
The Mann-Whitney U is a non-parametric procedure. It does not assume normality of the underlying distributions, only that observations are independent and that the measurement scale is at least ordinal. Under the more restrictive location-shift model (the two distributions have the same shape, differing only by an additive constant), the test addresses the location of the second distribution relative to the first. Without that assumption, the null hypothesis is the more general statement P(X > Y) = 0.5. The choice matters for interpretation: a significant Mann-Whitney with grossly heteroscedastic groups may reflect a spread difference rather than a location shift, in which case the Brunner-Munzel (2000) test, which tests P(X > Y) = 0.5 directly under heteroscedasticity, is preferable.
For tied observations the average-rank correction is essential. Without it, the asymptotic z-statistic is biased toward zero, and the p-value becomes anti-conservative for heavily tied ordinal data (Likert scales, ordinal grades). The calculator applies the ties correction Var(U) = n₁ n₂ (n + 1) / 12 × (1 − Σ(tⱼ³ − tⱼ) / (n³ − n)) automatically and reports both the raw and continuity-corrected z. For small samples (combined N ≤ 30, with n₁ × n₂ ≤ 200), the calculator builds the exact null distribution of U by convolution and returns the exact p-value, the gold standard for sparse data, matching R's exactRankTests::wilcox.exact() and Python's scipy.stats.mannwhitneyu(method = "exact").
Effect sizes for rank-based tests sit on multiple scales. The rank-biserial correlation r = 1 − 2U / (n₁ n₂) is the standardised pair-wins quantity recommended by APA. Cliff's delta (1993) is the same value expressed as P(X > Y) − P(X < Y) and is conventional in clinical epidemiology and ordinal data analysis. The common-language effect size (CLES) of McGraw and Wong (1992) is P(X > Y) + 0.5 P(X = Y), the probability that a randomly chosen value from group A exceeds a randomly chosen value from group B. All three are derived from the same U and are reported together so you can pick the convention your reviewer expects.
The Hodges-Lehmann (1963) median is the recommended companion to the U-test's p-value. For two independent samples it is the median of all pairwise differences xᵢ − yⱼ; for paired data it is the median of the Walsh averages (xᵢ + xⱼ) / 2. Under the location-shift model it estimates the median shift, and its 95% confidence interval, obtained by inverting the Mann-Whitney U (or Wilcoxon signed-rank) test, has nominal coverage even under non-normality. Most online U-test calculators omit it; the calculator computes the point estimate and the CI via the z-quantile index lookup on the sorted outer-product differences (Walsh averages for the paired case).
The Mann-Whitney U feeds into the broader two-group testing surface. For approximately normal data with similar variances, an independent-samples t-test (available in the two-sample t-test calculator ) is slightly more powerful. For ≥ 3 groups the non-parametric extension is the Kruskal-Wallis test; the parametric counterpart is the ANOVA calculator. For 2 × 2 categorical comparisons see the Fisher's exact test calculator. And for a publication-ready APA write-up of any non-parametric analysis with the full Hodges-Lehmann CI by a PhD statistician, the statistical analysis service covers everything end-to-end.
Mann-Whitney U (default) for two independent groups; Wilcoxon signed-rank for paired data (before/after, matched pairs); Brunner-Munzel when the two distributions have different shapes or variances.
Enter each group on its own line, or paste pairs as 'x, y' rows for paired tests. Whitespace, commas, semicolons, and tabs are all accepted as separators.
Exact p (when small) and asymptotic z-based p with and without continuity correction are reported side-by-side. Pick the convention your editor expects.
Rank-biserial r, Cliff's delta, CLES, and the Hodges-Lehmann median difference with 95% CI all summarise the size of the shift in interpretable units.
Verify the average-rank tie correction and that group assignment matches your input. The expected mean rank under the null is (N + 1) / 2 in each group.
Reproducible snippets paste straight into RStudio (wilcox.test, lawstat::brunner.munzel.test, exactRankTests::wilcox.exact) or Jupyter (scipy.stats.mannwhitneyu, wilcoxon, brunnermunzel).
Next step
A PhD statistician adds exact rank-sum and signed-rank tests, Hodges-Lehmann shift estimation with bootstrap CIs, Brunner-Munzel under heteroscedasticity, ordinal-logistic alternatives, and a publication-ready APA results section.
Our promise: Free re-run and re-write if reviewers question the analysis or reporting.
Timeline
Most projects deliver in under 2 weeks. We confirm an exact date in your quote.
If reviewers push back
If reviewers question the analysis, assumptions, or reporting, we re-run and re-write free.
Confidentiality
NDA available on request before any project discussion. Your data, study design, and manuscript stay private either way.
Want a PhD methodologist to handle the whole project?
Get a complete non-parametric workup with exact and asymptotic rank-sum tests, ties-corrected variance, Hodges-Lehmann shift estimation with bootstrap CIs, Brunner-Munzel under heteroscedasticity, and APA-formatted reporting by a PhD statistician. Free re-run and re-write if reviewers question the analysis or reporting. Pay only after you approve your quote.
U₁ = Σ R(xᵢ) − n₁(n₁ + 1) / 2 U₂ = n₁ n₂ − U₁
Rank the combined sample 1..N (average rank for ties). U₁ is the rank sum of group 1 minus its minimum possible value. R reports W = Σ R(xᵢ); SPSS / SciPy report U = min(U₁, U₂). The two are equivalent.
z = (U − n₁ n₂ / 2) / √(Var(U)) Var(U) = n₁ n₂ (n + 1) / 12 × T
T = 1 − Σ(tⱼ³ − tⱼ) / (n³ − n) is the ties correction factor where tⱼ is the size of the j-th tied group. Continuity correction subtracts ½ from |U − μ_U| before dividing by σ_U.
P(U = u) = #{tables with U-stat = u} / C(N, n₁)
Built by convolution: U is a sum of n₁ ranks drawn without replacement from {1, ..., N}. Practical for N ≤ 30 and n₁ × n₂ ≤ 200. Gold standard for sparse data.
r = 1 − 2U / (n₁ n₂) equivalent to Cliff's δ
Standardised pair-wins quantity, ranges −1 to +1. Cliff's δ = P(X > Y) − P(X < Y); CLES = P(X > Y) + 0.5 P(X = Y) is the related probability.
HL = median {xᵢ − yⱼ : i = 1..n₁, j = 1..n₂}
Median of pairwise differences. 95% CI obtained by inverting the U-test: index K = ⌈n₁ n₂ / 2 − z₀.₉₇₅ √Var(U)⌉ on sorted differences. Robust to outliers and ties.
W₊ = Σ R(|dᵢ|) over dᵢ > 0
For paired data: compute differences dᵢ = xᵢ − yᵢ, drop zeros, rank |dᵢ|, sum the positive ranks. Companion effect size is the Hodges-Lehmann pseudo-median = median of Walsh averages (xᵢ + xⱼ) / 2 over i ≤ j.
The Mann-Whitney U test (also called the Wilcoxon rank-sum test) is a non-parametric procedure for comparing two independent samples. It tests the null hypothesis that the probability a randomly chosen value from group A exceeds a randomly chosen value from group B is one half. Mathematically the U statistic counts, for every pair (xᵢ, yⱼ), how often xᵢ > yⱼ (with ties contributing one half). The procedure was developed by Frank Wilcoxon (1945) for equal sample sizes and extended to unequal samples by Mann and Whitney (1947).
Use the Mann-Whitney U test when (1) the outcome is ordinal rather than truly continuous, (2) the distributions in the two groups are skewed, heavy-tailed, or contaminated by outliers, or (3) the sample is small (n < 30 per group) and you cannot defend a normality assumption. For approximately normal data with similar variances, the t-test is slightly more powerful, but the Mann-Whitney U is the standard reference for non-parametric inference and is recommended by EQUATOR for skewed continuous and ordinal outcomes.
W is the sum of ranks assigned to one of the two groups when both samples are combined and ranked from smallest to largest. U is derived from W by subtracting the minimum possible rank sum: U₁ = W₁ − n₁(n₁ + 1)/2. The two statistics are exactly equivalent; R's wilcox.test() reports W, while SPSS and SciPy report U. The calculator reports both, plus U₂ = n₁ n₂ − U₁, so you can match whichever convention your reviewer expects.
Tied observations receive the average of the ranks they would have occupied if they were unique. The mean of U under the null is unaffected by ties, but the variance shrinks: Var(U) = n₁ n₂ (n + 1) / 12 × (1 − Σ(tⱼ³ − tⱼ) / (n³ − n)), where tⱼ is the size of the j-th tied group and n = n₁ + n₂. The calculator applies this ties-corrected variance to the asymptotic z-statistic. Without the correction, the z is biased toward zero and the p-value is too large. Most basic online calculators omit the correction entirely.
For combined sample sizes up to N = 30 (and n₁ × n₂ ≤ 200), the calculator builds the exact null distribution of U by convolution and returns the exact two-sided p-value. For larger samples, the asymptotic normal approximation z = (U − μ_U) / σ_U is reported, with and without a continuity correction of ±0.5. The continuity-corrected p is the closest match to R's wilcox.test() default for large samples. Both are returned so you can pick the convention your editor expects.
The rank-biserial correlation r is a standardised effect size for the Mann-Whitney U: r = 1 − 2U / (n₁ n₂) for one direction, or equivalently r = (f − u) / n₁ n₂ where f is the number of favourable pairs and u the number of unfavourable. It ranges from −1 to +1. Cliff's delta (1993) is the same quantity expressed as P(X > Y) − P(X < Y) and also ranges from −1 to +1. They are algebraically identical for two-group comparisons; APA traditionally calls the value r, while clinical epidemiology calls it δ. The common-language effect size (CLES) is the related probability P(X > Y) + 0.5 P(X = Y).
The Hodges-Lehmann (1963) estimator is the median of all pairwise differences xᵢ − yⱼ across the two samples. For symmetric distributions, it estimates the location shift between the two populations. It is robust to outliers and ties, and its associated 95% confidence interval (obtained by inverting the Mann-Whitney U test) is the recommended companion effect estimate for the Wilcoxon rank-sum test. Most calculators do not provide it; this tool computes both the point estimate and a CI via the standard z-quantile index lookup on the outer-product differences.
Use the Wilcoxon signed-rank test (Wilcoxon 1945) when your observations are paired: before/after the same subject, matched cases and controls, twin studies, or repeated measurements. It ranks the absolute non-zero differences, sums the ranks of positive and negative differences separately, and refers the smaller (or W = sum of positive) to its exact or asymptotic null. The companion effect size is the Hodges-Lehmann pseudo-median (median of all Walsh averages (xᵢ + xⱼ) / 2). The Mann-Whitney U is for two independent groups; the signed-rank is for matched pairs.
The Brunner-Munzel (2000) test relaxes the Mann-Whitney U's implicit equal-shape assumption. The Mann-Whitney is strictly a test of P(X > Y) = 0.5 only when the two distributions have the same shape (the location-shift model); under unequal variances or heteroscedastic shapes it can reject for spread differences rather than location. Brunner-Munzel tests P(X > Y) = 0.5 directly under heteroscedasticity, using a Welch-type Satterthwaite approximation. It is the modern recommendation when the equal-shape assumption is implausible. Available in R as lawstat::brunner.munzel.test() or Python's scipy.stats.brunnermunzel.
Report the group sizes, the U statistic (or W, matching the software), the z (when reporting the asymptotic version), the exact or asymptotic p, and an effect size with its confidence interval. APA example: 'A Mann-Whitney U test on pain scores at week 4 showed a significant difference between the intervention (Mdn = 3.0, n = 28) and control (Mdn = 4.5, n = 27) groups, U = 235.5, z = −2.41, p = .016, r = .33. The Hodges-Lehmann median difference was −1.5 (95% CI: −2.5 to −0.5).' If exact, replace z with 'exact p =' and drop the continuity-correction parenthetical.
For approximately normal two-group continuous data, the two-sample t-test calculator (Student and Welch) is the parametric counterpart. For three or more groups the parametric extension is the ANOVA calculator (one-way, two-way, and repeated-measures). For 2 × 2 categorical comparisons use the Fisher's exact test calculator. For standardised effect sizes (Cohen's d, Hedges' g) from group means and standard deviations, see the effect size calculator. For sample-size planning under a target effect see the sample size calculator and power analysis calculator.
Reviewed by
Dr. Sarah Mitchell holds a PhD in Biostatistics from Johns Hopkins Bloomberg School of Public Health and has over 15 years of experience in systematic review methodology and meta-analysis. She has authored or co-authored 40+ peer-reviewed publications in journals including the Journal of Clinical Epidemiology, BMC Medical Research Methodology, and Research Synthesis Methods. A former Cochrane Review Group statistician and current editorial board member of Systematic Reviews, Dr. Mitchell has supervised 200+ evidence synthesis projects across clinical medicine, public health, and social sciences. She reviews all Research Gold tools to ensure statistical accuracy and compliance with Cochrane Handbook and PRISMA 2020 standards.
From data cleaning and assumption checks to the full analysis and a publication-ready results section, we handle the numbers so you can focus on the science.
Our promise: Free re-run and re-write if reviewers question the analysis or reporting.
Your project is led by a named PhD methodologist with real credentials and published work.
4.9 / 5 across 1,194+ delivered projects