Shapiro-Wilk Test Calculator

StatisticsLast updated: August 22, 2026

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.

At least 3 and at most 5000 observations. You can separate the numbers with commas, spaces, or line breaks; a decimal comma is also accepted (3,14).
Sets the false positive risk. In the social sciences 5% is the common choice.

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

  1. Paste every value of the numeric variable whose normality you want to test into the box; at least 3 observations are required.
  2. Choose the significance level — α = 0.05 is the common choice in the social sciences.
  3. Read the W statistic and the p-value: if p < α, normality is rejected; otherwise it cannot be rejected.
  4. 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.
  5. 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.
  6. 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

Frequently Asked Questions

Does p > 0.05 in a Shapiro-Wilk test prove that the data is normal?
No. Hypothesis tests never prove H₀; they only tell you whether you can reject it. p > 0.05 means "no departure from normality could be detected at this sample size". In small samples, especially n < 20, the test has so little power that even serious departures can pass unnoticed, which is why the Q-Q plot should always be inspected alongside it.
The test is always significant in my large sample — what should I do?
Around n > 300, Shapiro-Wilk becomes so sensitive that departures with no practical relevance still produce p < 0.05. Judge the normality assumption with effect-size style measures rather than the p-value: if skewness stays within ±1 and kurtosis within ±2 and the Q-Q plot is clean, you can continue with the parametric method. In addition, by the central limit theorem the sampling distribution of the mean is already close to normal at large n.
Should I use Shapiro-Wilk or Kolmogorov-Smirnov?
For testing normality, Shapiro-Wilk is more powerful in almost every scenario and modern references recommend it. The classical Kolmogorov-Smirnov test without the Lilliefors correction is misleading as a normality test, because it becomes far too conservative when the parameters are estimated from the data. If you want an alternative that is especially sensitive to departures in the tails, the Anderson-Darling test is the usual choice.
Does it give the same result as SPSS and R?
Yes. This calculator implements the Royston (1992) AS R94 algorithm that underlies both the R function shapiro.test() and the SPSS Explore → Plots → Normality plots with tests output; the W values agree to four decimal places. In the very small p region (p < 0.001) rounding differences between packages can show up in the p-values, which is normal.
Is the test reliable when the data contains many repeated values?
Shapiro-Wilk assumes continuous data. A large number of ties (the same value repeated) makes W conservative and lowers the power of the test; for discrete variables such as a 5-point Likert scale the result is not interpretable in the first place. The calculator raises a warning when the number of distinct values drops below half the number of observations.
What should I do if normality is rejected?
There are three routes: transform the data to fix the shape (log or square root for right skew), switch to a nonparametric test (Mann-Whitney U, Wilcoxon, Kruskal-Wallis), or use robust methods. If the departure comes from an outlier, first investigate whether that observation is a measurement error or a genuine extreme value; a single bad record can change the entire result.
Should I test normality on the raw data or on the residuals?
In regression and ANOVA, the normality assumption applies to the MODEL RESIDUALS, not to the raw dependent variable. The correct approach is to fit the model and test the residuals with Shapiro-Wilk; testing the raw data misleadingly returns "not normal" whenever the group means differ. In single-group settings such as a one-sample t-test, the variable itself is tested directly.