Since 2010 · Powering 2M+ tool runs every month
Since 2010
Add to Chrome

My Toolbox

Automatic Mode

No saved tools yet.

Go Premium
Home Page > Math > Statistics And Data Analysis

Wilcoxon Signed-Rank Test Calculator

Compare paired before-and-after data with MiniWebtool’s Wilcoxon Signed-Rank Test Calculator. Paste or upload your pairs to get the exact p-value, W, z, the effect size and an APA sentence to copy.

Need help using this tool? Ask AI

For Gemini, paste the copied question into the chat. You can also copy it below.

View the question

3 free uses dailyNo sign-up requiredInstant Results
Wilcoxon Signed-Rank Test CalculatorTry it now — free ▼
Paste paired data, get the exact p-value

Paste or upload your before-and-after pairs. The differences are ranked and signed, and you get W, z, the exact p-value, the effect size and an APA sentence.

⚡ Quick Examples
⚠ Add at least 2 pairs — one pair per line.
Takes the first two number columns (one column for a single sample or differences).

One pair per line: the two measurements for the same subject, e.g. 1.83, 0.878. A text header row is skipped automatically.

Usually 0.

0.05 is conventional.

Two-sided unless you had a direction in mind first.

Both conventions are computed whenever your data contain a zero — this picks the headline.

Embed Wilcoxon Signed-Rank Test Calculator Widget

About Wilcoxon Signed-Rank Test Calculator

The Wilcoxon Signed-Rank Test Calculator runs the non-parametric alternative to the paired t-test: it asks whether paired measurements shifted, without assuming the differences are normally distributed. Paste your before-and-after values and it returns W+, W− and an exact p-value computed from the true null distribution — every one of the 2n sign patterns enumerated, not a normal curve fitted over them. It also reports the rank-biserial effect size, the Hodges-Lehmann median estimate with a distribution-free confidence interval, and a magnitude-blind sign test as a cross-check, so you can see at a glance whether your conclusion survives every method at once.

At a Glance

Wilcoxon Signed-Rank Test Calculator compares paired before-and-after data, or one sample against a median, with the exact p-value, W, z, effect sizes, a confidence interval and an APA sentence to copy.

Wilcoxon Signed-Rank Test Calculator: features at a glance
FeatureWhat you getGood for
Three data layoutsPaired values, a list of differences, or one sample against a hypothesized median; paste or upload a CSV or Excel file.Before-and-after studies and one-sample checks
Exact p-valueComputed from every possible sign pattern for up to 50 pairs, with the normal approximation alongside.Small samples
Ties and zerosMidranks for ties and a choice between dropping zero differences or keeping them (Pratt).Likert ratings and rounded scores
Every software conventionW+ (R’s V), T = min(W+, W−) (scipy), z (SPSS) and four p-values.Matching the output of R, SPSS or Python
Effect size and estimateRank-biserial r, r = z/√N and the Hodges-Lehmann estimate with a confidence interval.Reporting how large the change is
APA sentenceMedians, T, z, p and r in one sentence, ready to copy.Writing the results section
Steps and reportA step-by-step ranking table, charts, a plain-text summary and a PDF report.Homework and appendices

Is This the Right Test?

Your dataUse
The same people measured twice (before and after, left and right, two conditions)Wilcoxon signed-rank test (this page)
Two separate groups of different peopleMann-Whitney U test (also called the Wilcoxon rank-sum test)
Paired data whose differences look roughly normal, with no big outliersThe paired t-test has a little more power
Only the direction of each change is trustworthy, not its sizeThe sign test, shown under every result here

Why Your Software Shows a Different Number

The test is the same everywhere, but the statistic goes by different names. Every result on this page shows all of them, so you can match any program:

SoftwareWhat it reportsWhere to find it here
R wilcox.test(x, y, paired = TRUE)V = the sum of the positive ranksW+
Python scipy.stats.wilcoxonstatistic = the smaller of the two rank sums (two-sided)T = min(W+, W−)
SPSS (Related Samples)Z, usually negative, and Asymp. Sig.z (normal approximation) and its p-value
ExcelNo built-in functionPaste the two columns here

Small differences in the p-value between programs come from the method: an exact p-value, or the normal approximation with or without a continuity correction. All four versions are listed with every result.

What Is the Wilcoxon Signed-Rank Test?

Frank Wilcoxon introduced the test in 1945 in a three-page paper that also gave us the rank-sum test. The idea is disarmingly simple. Take the difference for every pair, throw away the signs for a moment and rank the differences by size. Then give each rank back its original sign. If the treatment did nothing, the positive and negative ranks should be interchangeable and their sums should land near each other. If the treatment did something, the large ranks — the big changes — will pile up on one side.

That single move buys a great deal. Because only the order of the magnitudes matters, one wildly atypical subject can contribute at most the largest rank instead of dragging the mean with it. Ordinal data such as five-point satisfaction ratings become usable, since ranking them is meaningful even though averaging them is not. And no normality assumption is needed anywhere.

The Formula

For each pair \( i \), form the difference \( d_i = x_i - y_i \), discard any \( d_i = 0 \), and rank the remaining \( |d_i| \) from smallest to largest to get ranks \( R_i \). The test statistic is the sum of the ranks belonging to positive differences:

\[W^{+} = \sum_{d_i > 0} R_i \qquad W^{-} = \sum_{d_i < 0} R_i \qquad W^{+} + W^{-} = \frac{n(n+1)}{2}\]

Under the null hypothesis every difference is equally likely to be positive or negative, so:

\[E\left[W^{+}\right] = \frac{n(n+1)}{4} \qquad \operatorname{Var}\left[W^{+}\right] = \frac{1}{4}\sum_{i=1}^{n} R_i^{2} = \frac{n(n+1)(2n+1)}{24} - \frac{\sum (t^{3}-t)}{48}\]

The two expressions for the variance are identical: writing it as \( \tfrac{1}{4}\sum R_i^2 \) over the actual midranks automatically produces the classic tie correction \( \sum(t^3-t)/48 \), where \( t \) is the size of each group of tied absolute differences. That is exactly how this calculator computes it, which is why ties need no separate setting. For large samples the standardized statistic

\[z = \frac{W^{+} - E\left[W^{+}\right] \mp 0.5}{\sqrt{\operatorname{Var}\left[W^{+}\right]}}\]

is compared with the standard normal distribution, the \( \mp 0.5 \) being the continuity correction that compensates for approximating a discrete statistic with a smooth curve.

Exact vs Approximate P-Values

Most online calculators only ever give you the normal approximation, and for small samples that is precisely where it is least trustworthy. With \( n \) non-zero differences there are exactly \( 2^n \) equally likely sign patterns, and the exact p-value is simply the proportion of them that produce a statistic at least as extreme as yours. This calculator enumerates that distribution with integer arithmetic whenever there are no tied absolute differences and \( n \le 50 \), which covers most real paired designs.

The difference matters. At \( n = 10 \) the normal approximation can be off by several thousandths of a p-value — plenty to move a borderline result across 0.05 in either direction. The agreement panel in the results shows the exact value, both approximations and the sign test together, so you can see the spread rather than trusting one number.

How to Read the Result

What you seeWhat it meansWhat to do next
p < αThe paired values shifted; the median difference is not the hypothesized value.Report W+, n, the exact p-value and the Hodges-Lehmann estimate with its interval.
p ≥ αNo detectable shift — which is not the same as proof of no shift.Check the sample size warning and the width of the confidence interval before concluding anything.
All four methods agreeThe conclusion does not depend on which method your software chose.Report with confidence, quoting the exact p-value.
Only the uncorrected z is significantAn artifact of the approximation, not a finding.Trust the exact test; the uncorrected version is always the most liberal.
Wilcoxon significant, sign test notUsually normal: the sign test ignores magnitudes and so has less power.Fine, but check that the differences are roughly symmetric.
Confidence interval contains 0Consistent with the non-significant p-value, and it also shows you how big an effect is still plausible.Read the interval width as your precision, and consider whether the sample is simply too small.

Zero Differences: Wilcoxon vs Pratt

Pairs that did not change at all are the awkward case, and the two standard conventions can genuinely disagree.

✂️ Wilcoxon — discard zeros

The original 1945 rule and the default in R and SPSS: unchanged pairs are removed before ranking, so n shrinks. It is slightly liberal, because discarding the evidence of "no change" makes the surviving differences look more decisive than the full dataset warrants.

⚖️ Pratt — keep zeros

Pratt (1959) ranks the zeros along with everything else and only then excludes them from the sum. The real changes therefore receive larger ranks and the variance grows, making the test more conservative. Most methodologists prefer it when zeros are common, such as in Likert-scale data.

🪙 The sign test

The most cautious option of all: count only how many differences point each way and test that count against a coin flip. It has less power, but it needs no symmetry assumption, so agreement between it and Wilcoxon is strong reassurance.

How to Report the Result (APA 7)

Give the test, the medians of the two measurements, the statistic, z, the exact p-value and an effect size. The calculator writes this sentence for you, for example for the patient data above:

A Wilcoxon signed-rank test showed that the first measurement (Mdn = 1.68) was significantly higher than the second (Mdn = 1.06), T = 5, z = −2.01, p = .039, r = .47, n = 9.

Report p with three decimals and no leading zero (p < .001 for very small values). The effect size r = |z| ÷ √N, with N the number of observations, is the one SPSS users are usually asked for; the rank-biserial correlation shown with each result is an equally accepted alternative.

Effect Size and the Hodges-Lehmann Estimate

A p-value tells you whether a shift is detectable, never how big it is. Two complements are reported here.

The matched-pairs rank-biserial correlation is \( r_{rb} = (W^{+} - W^{-}) / (W^{+} + W^{-}) \). It runs from −1 to +1 and reads directly as the net share of ranked evidence pointing one way: \( r_{rb} = 0.6 \) means 60% more of the ranked change went up than down. Conventional cut-offs are 0.1 small, 0.3 medium and 0.5 large. Journals that follow the SPSS tradition often expect \( r = |Z| / \sqrt{N} \) instead, which is also shown.

The Hodges-Lehmann estimate gives the effect in your original units. It is the median of all \( n(n+1)/2 \) pairwise averages \( (d_i + d_j)/2 \), called Walsh averages, and it is the point estimate that belongs with the Wilcoxon test in the same way the sample mean belongs with the t-test. Inverting the test yields a genuinely distribution-free confidence interval for it. Because the underlying distribution is discrete, the achievable coverage comes in jumps — a nominal 95% interval might actually deliver 96.1% — so the exact achieved coverage is reported rather than glossed over.

A Worked Example

Nine patients had a mood score measured before and after treatment (the classic Hollander and Wolfe depression data):

  • Differences: 0.95, −0.15, 1.02, 0.43, 0.62, 0.59, 0.49, −0.08, 0.01
  • Seven of the nine went up, and the two that went down were the two smallest changes in absolute size.
  • Ranking by magnitude and summing gives \( W^{+} = 40 \) against \( W^{-} = 5 \).
  • The exact two-sided p-value is 0.0391 — and every one of the 512 sign patterns really was enumerated to get it.
  • The Hodges-Lehmann estimate is 0.46, so the typical improvement is roughly half a point on the scale.

Note how little the two negative differences cost: because they were tiny, they received ranks 1 and 2 and contributed just 5 of the 45 available rank points. A paired t-test on the same data would have let their raw sizes matter; the rank test only cares that they were the smallest changes.

Common Pitfalls

  1. Forgetting the symmetry assumption. Wilcoxon is distribution-free but not assumption-free: it assumes the differences are symmetric about their median. With badly skewed differences it can reject because of the skew rather than a shift. The sign test is the fallback.
  2. Using it on unpaired data. If your two groups contain different subjects, you need the Mann-Whitney U test instead. Signed-rank requires a meaningful pairing.
  3. Reading a non-significant result from six pairs as evidence of no effect. With five non-zero differences the smallest possible two-sided p-value is 0.0625, so significance at α = 0.05 is arithmetically impossible.
  4. Reporting only the p-value. Give W+, n, the effect size and the Hodges-Lehmann interval — reviewers increasingly insist on it.
  5. Mixing up W+ and T. R's V is W+; many textbooks report the smaller of W+ and W− as T. Both are shown here so you can match either convention.

How to Use This Calculator

  1. Pick your Data Layout: paired samples, a plain list of differences, or one sample against a hypothesized median.
  2. Paste the numbers into Your Data. In paired mode put two values per line — 1.83, 0.878. Commas, spaces, semicolons and tabs all work, and a text header row is skipped automatically.
  3. Leave the Hypothesized Median at 0 to test for any change, or set another value to test against a specific shift.
  4. Choose the Alternative Hypothesis and the Significance Level, and pick how zero differences should be handled.
  5. Click Run Wilcoxon Test, then read the verdict, check the agreement panel, and copy the plain-text report for your write-up.

Frequently Asked Questions

What is the Wilcoxon signed-rank test?

The Wilcoxon signed-rank test is the non-parametric alternative to the paired t-test. Instead of averaging the differences between paired measurements, it ranks them by size, attaches the sign of each difference to its rank, and asks whether the positive ranks clearly outweigh the negative ones. Because it uses ranks rather than raw magnitudes it does not require the differences to be normally distributed, and a single wild outlier can only ever contribute the largest rank rather than dominating the result.

When should I use it instead of a paired t-test?

Use the Wilcoxon signed-rank test when the paired differences are clearly skewed, contain outliers, come from a small sample where normality cannot be checked, or are measured on an ordinal scale such as a Likert rating. If the differences look roughly normal the paired t-test is slightly more powerful, but the efficiency gap is small: on genuinely normal data Wilcoxon still retains about 95 percent of the t-test's power, and on heavy-tailed data it can be far more powerful.

What are W+ and W− and which one do I report?

W+ is the sum of the ranks belonging to positive differences and W− is the sum belonging to negative differences. Together they always add up to n(n+1)/2, so either one determines the other. R reports W+ under the name V, while many textbooks report the smaller of the two as T. This calculator shows W+, W− and their total so you can match whichever convention your course or software uses.

What does an exact p-value mean here?

Under the null hypothesis every difference is equally likely to be positive or negative, so with n differences there are exactly 2 to the power n equally likely sign patterns. The exact p-value enumerates all of them and counts the proportion that produce a W+ at least as extreme as yours. No normal curve is involved, which matters most for small samples where the approximation is least accurate. This calculator computes the exact value whenever there are no tied absolute differences and n is at most 50.

How are zero differences and ties handled?

Ties among the absolute differences receive their average rank, and the variance of W+ is built directly from those midranks, which reproduces the textbook tie correction exactly. Zero differences can be handled two ways: Wilcoxon's original rule discards them before ranking, while Pratt's rule ranks them along with everything else and only then leaves them out of the sum. Pratt is more conservative and generally considered the better choice when zeros are common. This calculator shows both whenever your data contain a zero.

How many pairs do I need?

At least six non-zero differences are required before a two-sided test can reach significance at alpha 0.05 at all, because with five differences the smallest possible two-sided p-value is 2 divided by 32, or 0.0625. With fewer than about ten pairs the test has low power, so a non-significant result is weak evidence of no effect rather than evidence of none. The calculator warns you when your sample is in that range.

What effect size should I report alongside the p-value?

The matched-pairs rank-biserial correlation is the most natural choice: it is the difference between W+ and W− divided by their total, so it runs from −1 to +1 and can be read directly as the net proportion of ranked evidence favouring one direction. Many journals also expect r equal to the absolute value of Z divided by the square root of N. Both are shown here, along with the Hodges-Lehmann estimate, which gives the effect in the original units of your measurements.

What is the Hodges-Lehmann estimate?

The Hodges-Lehmann estimator is the median of all pairwise averages of the differences, known as Walsh averages. It is the point estimate that belongs with the Wilcoxon test in the same way the sample mean belongs with the t-test, and it estimates the pseudomedian of the difference distribution. Inverting the test also produces a distribution-free confidence interval for it, which this calculator reports together with the exact coverage actually achieved, since discrete distributions cannot always hit 95 percent precisely.

Does the test assume anything at all?

It assumes the pairs are independent of one another and that the distribution of differences is symmetric about its median under the null hypothesis. Symmetry is the assumption people forget. If it fails badly, the test can reject because the distribution is skewed rather than because it is shifted. The sign test shown in the agreement panel needs no symmetry assumption at all, so when the two agree your conclusion is unusually safe.

Reference this content, page, or tool as:

"Wilcoxon Signed-Rank Test Calculator" at https://MiniWebtool.com/wilcoxon-signed-rank-test-calculator/ from MiniWebtool, https://MiniWebtool.com/

by miniwebtool team. Updated: November 27, 2026

Chat with your favorite AI

For Gemini, paste the copied question into the chat. You can also copy it below.

View the question

Statistics And Data Analysis:

Top & Updated:

Chi-Square Test CalculatorA/B Test Significance CalculatorFisher's Exact Test CalculatorView all →
Home Page > Math > Statistics And Data Analysis > Wilcoxon Signed-Rank Test Calculator