Interactive module guide

Wilcoxon Signed-Rank Test Calculator — Paired

This Wilcoxon signed rank test calculator evaluates paired differences through signed ranks, the standard rank-based alternative to the paired t test.

Open calculator

Free · No sign-up · Calculations stay in your browser

The Wilcoxon signed-rank test evaluates paired data by ranking the absolute differences and asking whether the positive-difference ranks outweigh the negative ones.

It is the standard rank-based alternative to the paired t test: it uses the sizes of the differences, not just their directions, but does not require them to be normally distributed—only symmetric around zero under the null hypothesis.

This calculator drops zero differences, applies midranks with a tie-corrected normal approximation (the scipy approx convention without continuity correction), and reports W⁺, W⁻, a z statistic, and a matched-pairs rank-biserial effect size.

Use the Wilcoxon signed rank test calculator for paired differences that are roughly symmetric but non-normal; zero differences are dropped before ranking.

When to use this Wilcoxon signed rank test calculator

Use it when

  • Use it for before-and-after or matched-pair comparisons when the paired differences are non-normal, contain outliers, or come from bounded scales where the paired t test’s assumptions are strained.
  • Use it when difference magnitudes are meaningful but their distribution is unknown: it uses more information than the sign test (which keeps only directions) while assuming less than the t test (which needs approximate normality of the mean difference).
  • Use it as a sensitivity check on a paired t test conclusion; agreement between the two makes the finding robust to the normality question, and disagreement usually points at an outlying pair worth inspecting.

Choose another method when

  • Avoid it for independent groups—two unrelated samples belong to the Mann-Whitney U test; the signed-rank machinery is only defined through pairing.
  • Avoid it when the differences are clearly asymmetric under plausible alternatives and your question concerns the median difference specifically; the test’s null is symmetry around zero, and skewed differences can reject for reasons other than a median shift.
  • Avoid it when many differences are exactly zero: each zero is dropped, and a dataset dominated by zeros leaves few informative pairs and an inflated sense of sample size.

Interactive tool

The calculator loads as you approach this section so the guide remains fast on mobile connections.

Example preview

Nine paired measurements

Inputs
Nine nonzero paired differences ranked by absolute size.
Representative result
W⁺=40 versus W⁻=5 gives p≈0.0382, so the differences are asymmetric around zero at α=0.05.

Illustrative only. Load the interactive tool to enter your own values and review assumptions.

Watch the explanation

4:38 min

The player loads only after you press play. You can also watch on YouTube.

Read the complete transcript

The Wilcoxon Signed-Rank Test. Paired measurements can shift without normally distributed differences. This test asks whether positive and negative differences carry balanced rank mass around zero. Keep every pair intact and subtract sample two from sample one. The subtraction order defines every sign, tail, and effect that follows. An exactly zero difference contributes no direction. This page drops every zero before ranking and records how many informative pairs remain. Take absolute values of the nonzero differences, rank them from smallest to largest, then restore each difference's original sign. Equal absolute differences share a midrank. Their positive or negative signs stay attached while the tie term reduces the null variance. Add positive ranks into W plus and negative ranks into W minus. Together they equal n times n plus one over two. This page always uses a tie-corrected normal approximation. It standardizes W plus without a continuity correction and never switches automatically to exact inference.

Pairing is the design. Row i in sample one and row i in sample two must describe the same person or deliberately matched unit. Different pairs must remain independent. Households, clinics, or one person contributing several pairs require a model that represents that dependence. Difference magnitudes must be meaningful because larger absolute differences receive larger ranks. If only directions are trustworthy, use the sign test instead. The sharp null says the paired-difference distribution is symmetric about zero. It is not a direct test of the mean paired difference. Calling a rejection a median or location shift needs reasonably symmetric differences. Strong skew can move signed ranks for another reason. Tail direction follows sample one minus sample two. Right-tailed means positive differences dominate; left-tailed means negative differences dominate. The matched rank-biserial compares positive and negative rank mass. Standardized r divides z by the square root of nonzero n; keep them separate.

Now compare nine matched measurements under two conditions. Keep sample one minus sample two, a two-sided alternative, and alpha point zero five fixed. The nine differences contain seven positives, two negatives, and no zeros. All nine pairs therefore enter the rank calculation. The absolute ranks in pair order are eight, three, nine, four, seven, six, five, two, and one. None are tied. Positive ranks sum to forty. Negative ranks sum to five, and together they recover all forty-five units of rank mass. Under symmetry, W plus centers at twenty-two point five. With no ties, its standard deviation is about eight point four four one. Subtract the null mean and divide by that spread, with no half-unit adjustment. The resulting z score is about two point zero seven three. The two-sided p-value is zero point zero three eight one five two, below alpha. Reject symmetry around zero, while reporting rank-biserial zero point seven seven eight and standardized r zero point six nine one.

With fewer than ten nonzero pairs, the calculator warns that the approximation is rough. The nine-pair example still does not become exact. In a diagnostic set, one zero exits first. Equal absolute differences then share ranks, and the tie correction reduces the variance. Unequal sample lengths or fewer than two original pairs fail validation. If every difference is zero, no rank signal remains and the calculator stops. Swap the sample order and W plus becomes five, z and both effects turn negative, but the two-sided p-value stays unchanged. Lock pair order, subtraction direction, tail, and alpha before results. Choosing a favorable method or tail afterward invalidates the evidence. Report original and nonzero pairs, zeros, ties, W plus, W minus, method, z, p, both effects, symmetry limits, and design boundaries. No shift estimate or confidence interval is provided. Rank meaningful paired differences, inspect their signed rank mass, and run the Wilcoxon signed-rank calculator free at Distri Scope dot com.

How to read the result

W⁺ and W⁻ always sum to n(n+1)/2, so either one determines the other; the display shows both to make the asymmetry visible at a glance.

The matched rank-biserial reads as a share of rank mass: a value of 0.78 means the positive differences carry 89% of the total ranks, since the positive share is (r+1)/2.

Because ranks weight larger differences more heavily, a few large improvements can outweigh many small declines—the direction of the z statistic tells you which side carries the rank mass.

How to use the Wilcoxon signed rank test calculator

Enter the two paired samples in matching order; both fields must contain the same number of values, and the calculator forms the differences (sample 1 minus sample 2) itself.

Zero differences are dropped before ranking (the wilcox convention) and the calculator reports how many were removed; ties among the absolute differences receive midranks with the matching variance correction.

A right-tailed alternative claims the differences tend to be positive, meaning sample 1 tends to exceed sample 2 within pairs.

Formula, hypotheses, and assumptions

W+=di>0rank(di),z=W+n(n+1)/4σWW^+ = \sum_{d_i > 0} \operatorname{rank}(|d_i|), \quad z = \frac{W^+ - n(n+1)/4}{\sigma_W}

Conditions to review

  • Paired observations with meaningful differences
  • Independent pairs
  • Differences measured on at least an interval-like ordinal scale
  • Under the null, differences are symmetric around zero

Calculator parameters

  • Significance Level (α): default 0.05.
  • Test Type: default Two-tailed.

What the method is doing

The calculator ranks the nonzero |dᵢ|, sums the ranks of positive differences into W⁺, and refers z = (W⁺ − n(n+1)/4)/σ to the standard normal, with σ tie-corrected. This matches scipy’s wilcoxon with zero_method=‘wilcox’, correction=False, method=‘approx’, so results are directly reproducible.

Exact small-sample distributions are not computed; below 10 nonzero pairs a warning marks the approximation as rough rather than silently trusting it.

The matched-pairs rank-biserial correlation (W⁺ − W⁻)/(W⁺ + W⁻) is reported alongside r = z/√n, giving both a dominance-style and a standardized effect size.

Worked example: nine paired measurements

Nine subjects are measured under two conditions. Condition A: 1.83, 0.50, 1.62, 2.48, 1.68, 1.88, 1.55, 3.06, 1.30. Condition B: 0.878, 0.647, 0.598, 2.05, 1.06, 1.29, 1.06, 3.14, 1.29. The differences include values as small as 0.01 and as large as 1.02, with no zeros. Run a two-sided Wilcoxon signed-rank test at α = 0.05.

  1. 1Form the nine differences A − B; seven are positive and two are negative, and none are zero, so all nine pairs are informative.
  2. 2Rank the absolute differences (all distinct here, so no tie correction is needed) and sum the ranks of the positive differences: W⁺ = 40, leaving W⁻ = 45 − 40 = 5.
  3. 3Under the null, W⁺ has mean n(n+1)/4 = 22.5 and standard deviation √(n(n+1)(2n+1)/24) ≈ 8.44, giving z = (40 − 22.5)/8.44 ≈ 2.073.
  4. 4The two-sided p-value is 2·P(Z > 2.073) ≈ 0.038, and the matched rank-biserial correlation is (40 − 5)/45 ≈ 0.78.

Interpretation

The positive differences dominate the rank mass (about 89% of it), and that asymmetry is unlikely under a symmetric-around-zero null (p ≈ 0.038 < 0.05). At α = 0.05 the data support a systematic shift toward higher values under condition A, with a large matched-pairs effect size—though nine pairs is small, and the approximate p-value deserves that caveat in any report.

Common mistakes

  • Do not treat the test as assumption-free: the null is symmetry of differences around zero, and skewed differences can produce rejections that are not median shifts.
  • Do not overlook the dropped zeros; reporting the original pair count while testing only the nonzero ones overstates the effective sample size.
  • Do not compare W⁺ across studies with different n; the statistic’s scale depends on n(n+1)/2, so effect sizes—not raw W values—are the comparable quantity.

Limits and independent validation

The p-value relies on a normal approximation; genuinely exact small-sample p-values are not computed here, which matters most below about 10 nonzero pairs.

No Hodges-Lehmann confidence interval for the pseudomedian difference is reported yet; the effect sizes stand in for interval information.

Heavily discretized scales produce many tied ranks and reduced resolution; with very coarse data, the sign test’s direction-only reading may be the more honest summary.

Before using the result

  • Verify the pairing: the i-th value of each field must belong to the same subject or block, and a scrambled order silently changes every difference.
  • Recompute W⁺ by hand for the first few pairs—sign each difference, rank the absolute values, sum the positive ranks—and check the display; a mismatch signals an entry-order problem.
  • Plot or list the differences and look at their symmetry; strong asymmetry under the alternative changes what a rejection means, and a paired t test on transformed data may frame the question better.

See every option in the Statistical Hypothesis Test Calculator or review the DistriScope methodology. Educational information; last reviewed 2026-08-09. Verify consequential calculations independently.