Wilcoxon Signed-Rank Test Calculator
Compare paired before/after data, or one sample against a median, when the differences aren't normally distributed. Paste your numbers to get W⁺, W⁻, an exact or tie-corrected p-value, an effect size, and every ranking step, all in your browser with no signup.
How it works
The Wilcoxon signed-rank test is the non-parametric alternative to the paired t-test. Instead of comparing the mean of the paired differences, it ranks the sizesof those differences and asks whether the positive and negative ranks balance out, so skew, outliers, and ordinal data don't break it. It works on two paired columns (the same subjects measured twice) or on one sample against a hypothesised median μ₀.
- Form the differences.For paired data, dᵢ = afterᵢ − beforeᵢ; for a one-sample test, dᵢ = valueᵢ − μ₀. Any dᵢ = 0 carries no direction, so the standard Wilcoxon rule discards it and reduces n. Pratt's (1959) option keeps zeros while ranking but still excludes them from W⁺ and W⁻.
- Rank the absolute differences. Sort |dᵢ| from smallest to largest and assign ranks 1…n, giving tied magnitudes the average of the ranks they span (Wilcoxon, 1945). Two values tied for ranks 3 and 4 each become 3.5.
- Sum the signed ranks.
W⁺ = Σ ranks where dᵢ > 0and W⁻ = Σ ranks where dᵢ < 0. As a check, W⁺ + W⁻ must equal n(n+1)/2. The reported statistic is W = min(W⁺, W⁻). - Exact p-value (small, tie-free samples). Under H₀ each rank is independently positive or negative with probability ½, so W⁺ ranges over the 2ⁿ equally likely sign assignments. This tool enumerates that null distribution and reads the tail directly: two-sided p = 2·min(P(W⁺ ≤ w), P(W⁺ ≥ w)), capped at 1.
- Normal approximation (ties or larger samples). Otherwise it uses μ_W⁺ = n(n+1)/4 and
σ²_W⁺ = n(n+1)(2n+1)/24 − Σ(tⱼ³−tⱼ)/48, where tⱼ is the size of each group of tied |dᵢ| (NIST e-Handbook). The z-score z = (W⁺ − μ_W⁺ ∓ ½)/σ_W⁺, with an optional ±0.5 continuity correction toward the mean, is read against the standard-normal distribution.
The effect size is the matched-pairs rank-biserial correlation r = (W⁺ − W⁻)/(W⁺ + W⁻), bounded in [−1, 1] (Kerby, 2014): positive means values tended to rise. This module computes σ² straight from the ranks as ¼·Σrᵢ², which equals the NIST closed form exactly and is shown reconciled against it in the working. Every step runs client-side, so nothing you paste leaves your device.
Worked examples
Frequently asked questions
Sources & references
- Wilcoxon, F. (1945): Individual Comparisons by Ranking Methods (Biometrics Bulletin 1(6): 80–83)
- NIST/SEMATECH e-Handbook of Statistical Methods: normal approximation, tie correction, and continuity correction
- Kerby, D. S. (2014): The simple difference formula: rank-biserial correlation (Comprehensive Psychology)
The formulas and all worked examples on this page were last cross-checked against these sources, and against SciPy's stats.wilcoxon reference cases, on 2026-07-10.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us, our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, edge case, or want to suggest an improvement?
Email me at [email protected] , most fixes ship within 24 hours.