Calculators
Home › Calculators › Shapiro-Wilk Test

Shapiro-Wilk Test Calculator

Paste your sample. The test says whether normal is a fair description of it.

Published 15 November 2026

Run the Shapiro-Wilk test

3 to 50 values. Paste a sample, pick alpha, get W and the verdict.

Quick answer: Twelve exam scores (mean 69.0): W = 0.9717, p = 0.9281, so normality stands. Eight delivery times with one 38-minute outlier: W = 0.5278, p < .001, so normality fails. The test runs on 3 to 50 values and shows every step.

A teacher, twelve marks, one question

A teacher had twelve exam marks and a t-test to run. The class average was 69. The marks looked fine on the page. Nothing wild, nothing missing. But the t-test she planned assumes the marks come from a normal distribution, and "looks fine" is not a check. She needed a number that says yes or no. That is the whole job of the Shapiro-Wilk test.

It is the standard check for normality in small samples, named after Samuel Shapiro and Martin Wilk, who published it in 1965. Textbooks reach for it first when n is under 50. R and SPSS run it by default. If you have ever read "check normality before the t-test" in a methods section, this is usually the test doing the checking.

The W statisticW = (Σaix(i))² ÷ Σ(x − x̄)²

Read it as a comparison. Sort your data from smallest to largest. Then ask how closely that sorted list matches the sorted list a normal sample of the same size would produce. The weights ai say how much each position matters. The extremes carry the most weight, the middle almost none, because the tails are where a non-normal sample gives itself away. W is that match scored from 0 to 1. A perfect match scores 1.

Worked example

Those twelve exam marks: 62, 68, 71, 65, 74, 69, 72, 66, 70, 73, 67, 71. Mean 69.0, sample SD 3.54. Sum of squared deviations 138.0, weighted sum squared 134.10. W = 0.9717, p = 0.9281. At any usual alpha the verdict is clear: fail to reject. The marks are consistent with a normal distribution, and the t-test can go ahead.

When the verdict flips

Now eight delivery times from a courier depot: 12, 14, 13, 15, 12, 14, 13 and 38 minutes. Seven ordinary runs and one van stuck in traffic. W = 0.5278, p = 0.0000223. That p-value is far below 0.05, so the null goes. Here the fix is a look at the van, the route, and whether that 38 belongs in the analysis at all. A different test would only hide the question.

Small W means a poor match. How small is too small? There is no fixed cutoff worth memorising, because W drifts with n even when the shape stays the same. Read W together with the p-value and the sample size. A W of 0.97 at n = 12 is comfortable. The same W at n = 50 would be a different story, because a large sample leaves less room for chance to explain the gap.

Three to fifty values, and why

The classic test takes 3 to 50 values. Below 3 there is nothing to test. Above 50 the test turns so sensitive that tiny bends in the shape, the kind no plot would show, come back significant. Large samples need plots and judgement more than they need this test. The p-value here follows Royston's normalising transform of log(1 − W), the method R uses, and for n = 3 it is exact.

Look at the plot before the p-value

A number never replaces a picture. The histogram under the calculator shows the shape in one glance: one hump in the middle, tails that taper, or something lopsided. A Q-Q plot does the same job with more precision, plotting each sorted value against the value a normal distribution predicts. Points that hug the diagonal say normal. Points that curve away say otherwise. Run the test, then check the picture agrees. When they disagree, trust the picture and ask why.

Watch out

Reading p = 0.06 as "the data are normal". Failing to reject is not proof. It says the sample is too small, or too close to normal, to convict. At n = 10 the test has little power: the numbers 1 to 10, perfectly uniform, score W = 0.9702 with p = 0.8924 and sail through. Report the W, show the plot, and call the check inconclusive rather than clean.

If normality fails

First, find the cause. Skew often yields to a log transform. An outlier may be a data entry slip, or a real event worth keeping and explaining. A bimodal shape usually means two groups mixed together, and no transform fixes that: split the groups first. When the shape stays non-normal, rank tests drop the requirement entirely. The Mann-Whitney U test replaces the two-sample t-test, and the Wilcoxon signed-rank test replaces the paired one. And when the sample is large, the t-test leans on the central limit theorem: means of large samples behave normally even when the raw data do not, so a mild departure at n = 200 matters far less than the same departure at n = 12.

Where this test sits in your workflow

Check normality before any test that assumes it: the one-sample t-test, the two-sample t-test, ANOVA. Check it alongside equal variances, where the Levene test calculator does the same gatekeeping job for spread. The guide to choosing a statistical test puts the whole family side by side, so you can see which assumptions each test carries and which check belongs where. Run the check, read the plot, then run the test you actually wanted. That order keeps the p-value honest.

Frequently asked questions

What is the null hypothesis of the Shapiro-Wilk test?

That the sample comes from a normally distributed population. A small p-value rejects that claim. A large one only says the sample does not contradict it, which is a weaker statement than it sounds.

What is a good W value?

Near 1. The exam marks scored 0.9717, which is comfortable at n = 12. The delivery times scored 0.5278, which is not. There is no universal cutoff, because W shifts with sample size, so always read it next to the p-value.

Why does the test only take 3 to 50 values?

That is the range the classic test was built for. With fewer than 3 values there is no shape to judge. Above 50 the test grows so sensitive that trivial departures from normal come back significant, and plots carry more weight than the p-value.

My p-value is 0.06. Is my data normal?

No verdict either way. You failed to reject normality, which is not the same as proving it. Small samples have little power to detect non-normality, so report the W, show the histogram, and say the check was inconclusive.

The test rejected normality. What should I do?

Look at the plot first and find the cause: skew, an outlier, or two groups mixed together. A log transform helps right skew. Rank tests such as Mann-Whitney U and Wilcoxon signed-rank drop the normality requirement. With a large sample, the t-test can often proceed anyway, because the central limit theorem steadies the mean.