Shapiro-Wilk Test Calculator
The Shapiro-Wilk test checks whether a sample comes from a normally distributed population, and it is regarded as the most powerful normality test for small and moderate samples. It measures how well the ordered observations line up with the order statistics expected under a normal distribution: the closer W is to 1, the better the fit; the further it falls, the larger the departure from normality.
Because parametric methods such as the t-test, ANOVA, Pearson correlation, and regression rest on a normality assumption, this test is run routinely before the analysis. This calculator reports the W statistic, the p-value, the critical W for the significance level you choose, the skewness and kurtosis measures, and the Q-Q correlation together, and it visualizes the result with a histogram and a normal Q-Q plot so you do not base the decision on the p-value alone.
Shapiro-Wilk Test Statistic
W = ( Σᵢ aᵢ·x₍ᵢ₎ )² / Σᵢ (xᵢ − x̄)² b = Σᵢ aᵢ·( x₍ₙ₊₁₋ᵢ₎ − x₍ᵢ₎ ) → W = b² / SS SS = Σ(xᵢ − x̄)² aᵢ: Royston AS R94 weights, derived from the scores mᵢ = Φ⁻¹((i − 0.375)/(n + 0.25)) n ≥ 12: y = ln(1 − W), z = (y − μ_y) / σ_y, p = Φ(−z) 4 ≤ n ≤ 11: y = −ln(γ − ln(1 − W)), γ = −2.273 + 0.459·n n = 3: p = (6/π)·( arcsin√W − π/3 ) (exact) H₀: the data is normally distributed · H₁: it is not normally distributed Decision: H₀ is rejected if p < α or W < W_critical(n; α)
The W statistic lies in (0, 1] and the closer it is to 1, the better the fit to normality. Except for n = 3, the p-value is computed with the Royston (1992) normalization; the SPSS Explore → Normality Plots with Tests output and the R function shapiro.test() use the same algorithm.
How to Calculate
- Paste every value of the numeric variable whose normality you want to test into the box; at least 3 observations are required.
- Choose the significance level — α = 0.05 is the common choice in the social sciences.
- Read the W statistic and the p-value: if p < α, normality is rejected; otherwise it cannot be rejected.
- Compare the observed W with the critical W; if W falls below the critical value, the decision points to rejection, consistent with the p-value.
- Look at the Q-Q plot and the histogram: a systematic departure from the line, an S shape, or a break in the tails carries more information than the p-value.
- Check the skewness and kurtosis values; if there is a departure, decide between a transformation (log, square root) and a nonparametric test.
Worked Examples
Roughly normal exam scores (n = 20)
For the scores of 20 students, W = 0.9855 with p = 0.984. The critical W (n = 20; α = 0.05) is 0.9044, so the observed W sits well above that bound and normality cannot be rejected; a skewness of -0.044, a kurtosis of -0.453, and a Q-Q correlation of r = 0.9952 together point to a symmetric, near-normal distribution. A t-test or ANOVA can safely be run on this data.
Shapiro-Wilk W: 0.9855 · p-value: p = 0.984 · Decision: Normality not rejected
Right-skewed income-like data (n = 15)
In this series, which contains a few large values, W = 0.6261 with p < 0.001; the critical W (n = 15; α = 0.05) is 0.8815, so normality is clearly rejected. A skewness of 2.432 and a kurtosis of 5.652 confirm a right-skewed, peaked distribution. The mean is 18.67 while the median is 15 — a log transformation or a method such as the Mann-Whitney U test is more appropriate than a parametric test.
Shapiro-Wilk W: 0.6261 · p-value: p < 0.001 · Decision: Not normally distributed
Small sample with a single outlier (n = 8)
Seven of the eight laboratory measurements fall between 4.8 and 5.3, while the value 9.4 breaks the series: W = 0.5199 with p < 0.001, so normality is rejected. The critical W (n = 8; α = 0.05) is 0.8229, far above the observed W; the skewness is 2.768 and the kurtosis is 7.747. It is a textbook illustration of how a single extreme observation dominates the test in a small sample.
Shapiro-Wilk W: 0.5199 · p-value: p < 0.001 · Decision: Not normally distributed