Wilcoxon Signed-Rank Test Calculator

Run the Wilcoxon signed-rank test on paired before/after data or on one sample against a hypothesized median, with Wilcox zero handling, tie correction, and exact or asymptotic p-values.

Hypotheses

H0: The distribution of differences is symmetric about zero (or about the stated median in one-sample mode). Ha is a shift according to the alternative. This is not a test of means unless symmetry holds.

W+ = Σ ranks of positive differences

T = min(W+, W−) for two-sided tests

Worked example (matches Load example)

One-sample values −3, 5, −1, 4 vs median 0: W+ = 7, W− = 3, T = 3, n = 4, exact two-sided p = 0.625 (no zeros, no ties).

Related tools

Sign test (direction only), Mann-Whitney U (independent groups), paired t-test (planned, parametric).

Related guides and calculators

For paired data that are close to normal the paired t-test has more power, and the sign test makes fewer assumptions than the Wilcoxon test. For two independent groups use the Mann-Whitney U test. Read parametric vs nonparametric tests.

Frequently Asked Questions

How are zero differences handled?

Zeros are dropped before ranking (Wilcoxon "wilcox" zero method), and the count removed is shown in the results.

When is the exact p-value available?

Exact signed-rank enumeration is used when, after Wilcox zero removal, n ≤ 50 and there are no tied absolute ranks (matching scipy.stats.wilcoxon method="auto"; this page caps n at 50 for browser speed).

What symmetry assumption is required?

The test assumes the distribution of differences (or deviations from the median) is symmetric about zero under H0; skewed differences can make interpretation harder.

What is effect size r?

This page reports r = z / √n using the continuity-corrected z and n after zero removal.

How does this compare to the sign test?

The sign test uses only direction of differences; Wilcoxon uses magnitudes via ranks and is more powerful when symmetry holds.

When should I use a paired t-test instead?

When the paired differences are roughly normal, the paired t-test compares their mean and has slightly more power. The Wilcoxon signed-rank test is the safer choice when the differences are skewed or contain outliers.

R and Python commands?

R: wilcox.test(x, y, paired = TRUE, exact = TRUE, correct = TRUE, zero.method = "Wilcoxon"). Python: scipy.stats.wilcoxon(d, zero_method="wilcox", correction=True).

Embed This Calculator

Add this free calculator to your course page or LMS.

Adjust the height value to fit your page.