Shapiro-Wilk Test Calculator
Paste your data and test whether it came from a normal distribution — with W, the exact p-value, a normal Q-Q plot and a histogram with a bell-curve overlay.
Reject normality at α = 0.05 — with W = 0.7888 and a p-value of 0.0067, these reaction times are unlikely to have come from a normal distribution.
Calculation
Normal Q-Q plot
If the data are normal, the points sit close to the line. Points bending away at the ends signal skew or heavy tails.
Histogram with a normal curve
The bell curve uses the mean and SD of your data. Compare its shape with the bars: skew shows up as a long tail on one side.
The Shapiro-Wilk test checks whether your data came from a normal distribution — the formal test behind every t-test and ANOVA assumption. Paste up to 5,000 values and get W, the exact p-value, a normal Q-Q plot and a histogram with a bell-curve overlay, plus skewness and kurtosis.
This is a FORMAL test of normality — it returns W and a p-value. If you only want a quick descriptive check (skewness, kurtosis, a normality score), use the normality-check tool instead.
A p-value above 0.05 does NOT prove your data are normal — it only means this test found no clear departure. Always read the Q-Q plot alongside the p-value.
How to use the Shapiro-Wilk test calculator
Paste your data into the box above — numbers separated by commas, spaces or line breaks. The test needs at least 3 values and accepts up to 5,000.
- Paste your data (3 to 5,000 values).
- Choose the significance level (α) — 0.05 is the usual choice.
- Read W and the exact p-value, then the decision: reject normality, or no evidence against it.
- Read the normal Q-Q plot and the histogram with the bell-curve overlay — they show how the data depart from normal, not just whether they do.
Try it now: the worked example below — 11 reaction times — gives W = 0.7888 and a p-value of 0.0067, so normality is rejected at the 5% level. Paste the normal sample of 20 values from the second example button and it gives W = 0.9335, p = 0.1807 — no evidence against normality.
What is the Shapiro-Wilk test?
The Shapiro-Wilk test asks one question: could these data plausibly have come from a normal distribution? It compares your ordered data with the values a normal sample of the same size would be expected to have, and summarises the agreement in a single number, W:
W = (Σ ai · xi)² / Σ(xi − x̄)²
Here xi are your ordered values and the ai are the expected normal order statistics, normalised through their covariance structure. W is close to 1 when the data look normal and falls towards 0 as they depart from normality. The NIST/SEMATECH e-Handbook puts it plainly: “The Shapiro-Wilk test, proposed in 1965, calculates a W statistic that tests whether a random sample comes from (specifically) a normal distribution. Small values of W are evidence of departure from normality.” (Anderson-Darling and Shapiro-Wilk tests.)
This calculator uses Royston’s Algorithm AS R94 — the same algorithm R and SciPy use — so its W and p-value match shapiro.test in R and scipy.stats.shapiro in Python. It works for 3 to 5,000 values. Below 3 values there is nothing to test; above 5,000 the p-value is not reliable, and SciPy itself warns that for N > 5000 the W test statistic is accurate, but the p-value may not be.
Worked example: reaction times
Eleven reaction times in milliseconds: 148, 154, 158, 160, 161, 162, 166, 170, 182, 195, 236. The mean is 172.00 ms, the standard deviation is 24.95 ms and the median is 162.00 ms.
The calculator gives W = 0.7888 and a p-value of 0.0067. Because 0.0067 is below α = 0.05, we reject normality: these times are unlikely to have come from a normal distribution.
The value 236 pulls the right tail. The Q-Q plot shows it bending away from the line at the top, and the histogram is right-skewed — skewness 1.68 and excess kurtosis 1.99. This is the same dataset SciPy’s own documentation uses: scipy.stats.shapiro returns W = 0.7888147830963135 and p = 0.006703833118081093.
How the p-value is calculated
The p-value comes from Royston’s normalising transform of (1 − W). There are three cases:
- n = 3: an exact formula, p = (6/π) · (asin√W − asin√(3/4)).
- 4 ≤ n ≤ 11: a polynomial in n transforms (1 − W) onto a normal scale, with γ = −2.273 + 0.459n.
- n ≥ 12: a polynomial in log n does the same job.
There is no table lookup and no approximation by eye: the coefficients are Royston’s published constants, and the p-value is the upper tail of the normal distribution after the transform. That is why the results match R to four decimal places. SciPy runs the same algorithm in single precision, so on large samples (n ≥ 500) its p-value can differ in the fourth decimal — the tool’s value is the exact one.
Reading the Q-Q plot and the histogram
The p-value is a verdict; the two charts are the evidence. Read them together:
- Q-Q plot: each point pairs a value from your data with the value a normal distribution would expect at the same rank. If the data are normal, the points sit close to the red reference line. Points bending away at the top signal a heavy right tail; bending away at the bottom signal a heavy left tail; an S-shape signals skew.
- Histogram: the red bell curve uses the mean and SD of your data. Compare its shape with the bars: a long tail on one side is skew, and a flat or sharply peaked shape is a departure the p-value alone cannot describe.
If the p-value is small but the Q-Q points sit close to the line, the departure is real but small — see the large-sample warning below.
Why a large sample almost always rejects
The test’s power grows with n, so with hundreds or thousands of values even a trivial departure becomes statistically significant. A W of 0.95 with n = 1,000 is a real rejection, but the departure may be too small to matter for a t-test, which is fairly robust to mild non-normality when n is large.
That is why the calculator shows the Q-Q plot next to the p-value. If the points sit close to the line, the data are normal enough for a t-test even when the p-value is small. A small p-value with a straight Q-Q plot is a small problem; a small p-value with a bent Q-Q plot is a real one.
What to do when normality fails
If the departure is mild and the sample is large, a t-test is often still fine — check the Q-Q plot first. If the data are skewed, a transformation (such as a log transform) can sometimes restore normality; re-test after transforming. And if the sample is small and clearly non-normal, the non-parametric test is the safe choice.
Shapiro-Wilk vs other normality tests
Shapiro-Wilk is the usual first choice, but it is not the only normality test. Here is how it compares:
| Test | What it does | Best for | Limitation |
|---|---|---|---|
| Shapiro-Wilk | Compares ordered data with expected normal order statistics (W) | Small to moderate samples; the most powerful normality test in general | n must be 3 to 5,000; the p-value is unreliable above 5,000 |
| Anderson-Darling | Weights the tails of the distribution more heavily | Detecting departures in the tails | Less familiar; no single headline statistic like W |
| Kolmogorov-Smirnov | Compares the empirical CDF with the normal CDF | A general goodness-of-fit check | Lower power for normality specifically |
| Normality-check tool | Descriptive only: skewness, kurtosis and a normality score | A quick check without a formal verdict | No p-value — it cannot reject normality |
When the tests disagree, trust the Q-Q plot: it shows what kind of departure you have, which no single p-value can.
Shapiro-Wilk in Excel
Excel has no built-in Shapiro-Wilk function — and no built-in Anderson-Darling function either. The test cannot be done with worksheet formulas alone, because the ai coefficients come from the means, variances and covariances of normal order statistics; the NIST handbook states this explicitly.
Add-ins, not Excel itself, provide the test: Analyse-it and the Real Statistics Resource Pack both offer Shapiro-Wilk for Excel. If you need the test without an add-in, paste your data into the calculator above — it runs the same Royston algorithm R and SciPy use.
Frequently asked questions
What does W measure?
W is the squared correlation between your ordered data and the values a normal sample of the same size would be expected to have. W = 1 means the data sit exactly where a normal sample would; W near 1 (say 0.97 and above) looks normal, and W of 0.79, as in the worked example, is far from normal. Small W is evidence of departure from normality.
What p-value means “normal”?
None. A p-value above 0.05 only means this test found no clear departure — it is not proof the data are normal. With a small sample the test has little power, so a large p-value may just mean there was not enough data to tell. Always read the Q-Q plot alongside the p-value.
Why does a large sample almost always reject?
The test’s power grows with n, so with hundreds or thousands of values even a trivial departure becomes statistically significant. A W of 0.95 with n = 1,000 is a real rejection, but the departure may be too small to matter for a t-test. Read the Q-Q plot: if the points sit close to the line, the data are normal enough.
What if n is 3?
The test works with just 3 values, using an exact formula for the p-value: p = (6/π)(asin√W − asin√(3/4)). But with n = 3 the test has almost no power — only a wildly non-normal sample will reject. Three evenly spaced values, 1, 2, 3, give W = 1.0000 and p = 1.0000: they look perfectly normal to the test.
Can I use it on discrete or tied data?
Ties are allowed: the calculator still returns W and a p-value. For example, 5, 5, 6, 7, 8, 9, 10, 11, 12, 13 gives W = 0.9422 and p = 0.5781. SciPy reports 0.5782 for the same data — its Fortran routine runs in single precision, so its W carries a tiny rounding error and its p is the one that is off; the tool’s 0.5781 is the exact value. But the test assumes continuous data, so if your data are heavily tied — rounded to whole numbers, or a Likert scale — treat the p-value as approximate and lean on the Q-Q plot.
What do I do if normality fails?
Do not force a t-test onto the data. For paired data use the Wilcoxon signed-rank test; for two independent groups use the Mann-Whitney U test; for three or more groups the Kruskal-Wallis test is the non-parametric alternative.
Sources: NIST/SEMATECH e-Handbook of Statistical Methods, Anderson-Darling and Shapiro-Wilk tests; Shapiro, S. S. & Wilk, M. B. (1965), “An analysis of variance test for normality (complete samples)”, Biometrika 52: 591–611; Royston, J. P. (1995), “Remark AS R94: A remark on Algorithm AS 181: The W-test for normality”, Applied Statistics 44(4). All examples on this page were checked against SciPy’s scipy.stats.shapiro.
See all 67 free statistics tools on Empirical Rule Calculators.
Next steps
๐โ Live
Hypothesis Testing Explained
The five steps of a hypothesis test, with worked z, t and chi-square examples.GuideRead the Guide โ
๐งฎโ Live
Normality Check Tool
A quick descriptive check โ skewness, kurtosis and a normality score.CalculatorTry Calculator โ
๐งฎโ Live
Skewness and Kurtosis Calculator
Measure the shape โ skew and tails โ alongside the formal test.CalculatorTry Calculator โ
More Tools to Explore
Keep going with the calculators that pair with the Shapiro-Wilk test—normality checks, non-parametric alternatives and t-tests.
Normality Check Tool
A quick descriptive check — skewness, kurtosis and a normality score.
Skewness and Kurtosis Calculator
Measure the shape — skew and tails — alongside the formal test.
Mann-Whitney U Test Calculator
Groups not normal? Compare them by rank.
Wilcoxon Signed-Rank Test Calculator
Paired differences not normal? Test the median by rank.
Two-Sample T-Test Calculator
The test this normality check is usually run for.
T-Distribution Calculator
Look up any area, p-value or critical t for any degrees of freedom.
Explore All Tools →
Browse all 67 free statistics tools — every calculator on this site in one place.