Skip to content

Wilcoxon Signed-Rank Test Calculator

Enter before-and-after scores, matched pairs, or a list of differences and get T⁺, T⁻, and a p-value — exact for up to 25 untied pairs, from the tie-corrected normal approximation otherwise — with z, the effect size r, the matched-pairs rank-biserial correlation, and a table of signed ranks. It is the rank-based alternative to the paired t-test. Free, no sign-up.

Input

0 values

0 values

Differences are first − second.

Enter the two measurements in matching order — the same number of values in each box.

How to Use the Wilcoxon Signed-Rank Test Calculator

  1. 1. Choose the input. Enter two paired lists in matching order — the first value of each list belongs to the same participant — or switch to a single list of differences you have already computed.
  2. 2. Set the hypothesis. Differences are first minus second. Keep the alternative two-sided unless you predicted the direction in advance.
  3. 3. Decide on the continuity correction. It is on by default, as in R's wilcox.test; SciPy and SPSS leave it off. It only changes the normal approximation, never the exact p-value.
  4. 4. Read and report. The results name the method used, list every signed rank, show the working, and give an APA line with the effect size.

How the Signed-Rank Statistic Works

Take each pair's difference d, set aside any that are exactly zero, and rank the rest by their absolute size, smallest first — tied absolute values share the average of their ranks. Then give each rank the sign of its difference. T⁺ is the sum of the ranks attached to positive differences and T⁻ the sum attached to negative ones; together they always add up to n(n + 1)/2. If the two measurements do not systematically differ, positive and negative differences of each size are equally likely and T⁺ should land near n(n + 1)/4. The test statistic T (also written W) is the smaller of the two sums.

  • Mean and spread under H₀: μ = n(n + 1)/4 and σ² = n(n + 1)(2n + 1)/24 − Σ(t³ − t)/48, where each t is the size of a group of tied absolute differences.
  • Normal approximation: z = (T⁺ − μ) / σ, moved 0.5 toward μ when the continuity correction is on.
  • Effect sizes: r = |z| / √n, with n the number of non-zero pairs, and the matched-pairs rank-biserial correlation (T⁺ − T⁻) / (T⁺ + T⁻), which runs from −1 to 1.

Zeros, Ties, and the Exact p-Value

A zero difference carries no information about direction, so Wilcoxon's original method — used here, and the default in R and SciPy — drops it and reduces n. Pratt's method keeps the zeros in the ranking and then discards their ranks, which can shift the result slightly in small samples. When no absolute differences are tied and there are 25 or fewer non-zero pairs, the calculator uses the exact distribution of T⁺, found by counting every way of attaching signs to the ranks. Otherwise it uses the normal approximation with the tie correction above. R's wilcox.test switches to the approximation whenever there are ties or zeros, which is one reason its p-value can differ from SPSS's.

Worked Example: Anxiety Before and After a Workshop

Click Try an example to load anxiety ratings for ten students before and after a study-skills workshop. The differences (before − after) are 5, 3, 7, −1, 6, 9, 0, 8, 4, and 10; the median difference is 5.5 points.

Wilcoxon signed-rank test, step by step

Drop the one zero difference: n = 9

Rank |d|: 1 → 1, 3 → 2, 4 → 3, 5 → 4, 6 → 5, 7 → 6, 8 → 7, 9 → 8, 10 → 9

T⁻ = 1 (only the −1 is negative); T⁺ = 45 − 1 = 44; T = 1

exact two-sided p = 2 × 2/512 = .0078

z = (44 − 22.5 − 0.5) / 8.44 = 2.49; r = 2.49 / √9 = .83; rank-biserial = (44 − 1) / 45 = .96

Only two of the 512 equally likely sign patterns give a T as small as 1 — no negative ranks at all, or the single smallest rank negative — hence the exact one-tailed probability 2/512, doubled for a two-sided test. In APA style: anxiety ratings fell after the workshop (Mdn = 43.5 before, 38.0 after), T = 1, z = 2.49, p = .008, r = .83.

Signed-Rank Test or Paired t-Test?

Both analyse the differences within pairs. The paired t-test asks whether the mean difference is zero and assumes the differences are roughly normal; with ten or fifteen pairs, one extreme difference can dominate it. The signed-rank test uses only the ranks of the differences, so an outlier counts as the largest rank and no more. It does assume the differences are distributed symmetrically around their median; if they are strongly skewed, the simpler sign test, which uses only the direction of each difference, is the safer choice. For two separate groups of people, use the Mann-Whitney U test instead.

Frequently Asked Questions

When should I use the Wilcoxon signed-rank test?
When you have two related measurements — the same people before and after, or matched pairs — and the differences are not plausibly normal, contain outliers, or come from an ordinal scale such as ratings. With 30 or more pairs and roughly symmetric differences, the paired t-test usually works too and reports a mean difference.
What happens to differences of zero?
This calculator drops them before ranking, which is Wilcoxon's original method and the default in R and SciPy, and reports how many were removed. The test then runs on the remaining n pairs. Pratt's method ranks the zeros along with everything else and then discards their ranks; it can give a slightly different answer in small samples.
What is the difference between T, W, V, and T⁺?
They are names for related sums. T⁺ is the sum of positive ranks — R reports it as V, and SciPy reports it for one-sided tests. T (or W) usually means the smaller of T⁺ and T⁻, which is what tables of critical values use. Because T⁺ + T⁻ = n(n + 1)/2, any one of them gives the same p-value.
How do I report a Wilcoxon signed-rank test in APA style?
Give the medians (or the median difference), then T, z if you used the approximation, p, and an effect size: T = 1, z = 2.49, p = .008, r = .83. Italicise the statistical symbols, write p without a leading zero, and state whether the p-value is exact or asymptotic and how many zero differences were excluded.
What is a good effect size for the Wilcoxon signed-rank test?
With r = |z| / √n, the usual benchmarks are about .1 small, .3 medium, and .5 large. The matched-pairs rank-biserial correlation is often easier to explain: .96 in the example means the positive differences outweigh the negative ones by 96% of the total rank sum.
Why is my p-value different from SPSS or R?
Usually because of the method. SPSS's standard output and SciPy's wilcoxon give the normal approximation without a continuity correction, while R applies the correction by default; R and SciPy also switch to exact p-values for small samples without ties or zeros. Toggle the continuity correction here and compare the exact and approximate p-values in the method note.

Related Tools

More in Statistics Calculators

See all Statistics Calculators