Wilcoxon signed-rank test calculator

Compare two related measurements, such as before and after, without assuming the differences are normal.

W = 5p = .039 (exact)
The paired measurements differ significantly (α = .05).
W+ / W−
40 / 5
Non-zero pairs
9
Zero differences dropped
0
z
2.014
Rank-biserial r
0.778

W = 5, p = .039, r = 0.78

How it works

Compute each pair's difference, drop zeros, rank the absolute differences, then add up the ranks of the positive differences (W+) and the negative ones (W−). If there is no systematic change, W+ and W− should be similar; a small minimum W is evidence of a shift. Because it uses magnitudes as well as signs, it is more powerful than the sign test.

Assumptions

  • Pairs are independent of each other.
  • The differences are at least ordinal and roughly symmetric around their median. If they are strongly skewed, the sign test is the safer choice.

For normally distributed differences, the paired t-test gives slightly more power and a confidence interval for the mean difference.

Frequently asked questions

When do I use the Wilcoxon signed-rank test?

For paired data (the same participants measured twice, or matched pairs) when the differences are not approximately normal or the outcome is ordinal. It is the nonparametric alternative to the paired t-test.

What happens to zero differences?

Pairs with a difference of exactly zero are dropped before ranking (Wilcoxon’s original method, also R’s default), and the calculator reports how many were removed.

Is the p-value exact?

With no tied absolute differences and up to 50 non-zero pairs, yes: it is computed from the exact distribution of W. With ties it uses the normal approximation with tie and continuity corrections.

How do I report the result?

Report the median difference or medians at each time point, then the statistic, p and effect size: “W = 5, p = .039, r = .78 (matched-pairs rank-biserial).” Some journals ask for z instead of W for larger samples.