Editverse Free Calculator
Normality Test (Shapiro-Wilk)
Test whether your data plausibly come from a normal distribution before you pick a parametric test, with the exact R command behind the result. A full guide follows below. Validated against R 4.3.3.
In Simple Words
Before running a t-test, ANOVA, or Pearson correlation, it helps to know whether your data are roughly normally distributed — because all three of those tests lean on that assumption to be fully trustworthy. This calculator runs the Shapiro-Wilk test, the most widely used formal normality test, and returns the W statistic and p-value with skewness, excess kurtosis and a histogram with a fitted normal curve to inspect visually.
A small p-value (typically below 0.05) suggests your data depart from normality; a larger p-value means the test found no strong evidence against normality — which is not the same thing as proof that your data are normal.
When to Use a Normality Test
Run a normality test whenever you’re deciding between a parametric test and its non-parametric alternative — for example, a paired t-test versus a Wilcoxon signed-rank test, or one-way ANOVA versus a rank-based comparison across three or more groups. It’s also worth running before Pearson correlation, since Pearson’s r assumes roughly normal variables.
The Correlation calculator covers both Pearson’s r and its rank-based alternative, Spearman’s rho, so you can switch once you know which one your data support. And if your groups clearly fail normality, a rank-based group comparison — rather than one-way ANOVA — is usually the safer route.
Expected format: Values
Drop a CSV here or click to choose. Parsed in your browser: nothing is uploaded.
Expected format: Values
x <- c({data})
shapiro.test(x)User guide
When to use. Assess whether data plausibly come from a normal distribution before choosing a parametric test.
Assumptions. Continuous data; n between 3 and 5000 for Shapiro-Wilk.
Common mistakes. p > 0.05 does not prove normality: always inspect the histogram and Q-Q plot too.
Worked example
Click Load example data above, then Run Analysis to see a fully worked result with figure, formula and interpretation for this test.
References
- Shapiro SS, Wilk MB. An analysis of variance test for normality. Biometrika. 1965;52:591-611.
Worked Examples
Example 1: A Small Continuous Sample
Ten measurements: 23.1, 25.4, 22.8, 24.0, 26.1, 23.5, 24.8, 25.0, 22.5, 24.3. The values cluster fairly tightly in the low-to-mid twenties without an obvious long tail or extreme outlier — visually the kind of pattern that often (though not always) returns a Shapiro-Wilk p-value comfortably above 0.05. Enter the values into the calculator to get the actual W statistic and p-value for this sample, plus the histogram.
Example 2: Reading the Output
shapiro.test() returns a W statistic (closer to 1 indicates a closer match to normality) and a p-value. On a Q-Q plot (qqnorm(x) in R), points that hug the diagonal reference line support normality; a systematic curve or S-shape in the points suggests skew or heavier-than-normal tails — worth checking visually even when the p-value alone looks reassuring.
Assumptions to Check
Continuous data. Shapiro-Wilk is designed for continuous measurements, not counts or categories.
Sample size between 3 and 5,000. The Shapiro-Wilk test is only valid in this range; for very large samples, visual inspection of the histogram becomes more informative than the p-value alone.
Independent observations. Each value should come from an independent draw — repeated measurements on the same subject can distort the test.
Common Mistakes
Treating p > 0.05 as proof of normality
A large p-value only means the test didn’t detect a departure from normality; it does not prove your data are normal, especially in small samples where the test has limited power. Always inspect the histogram and Q-Q plot too.
Over-relying on the test in large samples
With very large samples, Shapiro-Wilk can flag trivially small departures from normality as statistically significant. Visual inspection often matters more than the p-value once n is large.
Testing the raw outcome instead of the residuals
For regression and ANOVA, what actually needs to be approximately normal is the model’s residuals, not necessarily the raw outcome variable on its own, so enter the residuals here. For a two-sample t-test, test each group’s raw values separately; for a paired t-test, test the paired differences.
Skipping the check entirely
Choosing a t-test or ANOVA without checking normality at all risks an unreliable p-value when the sample is small and visibly skewed. A quick Shapiro-Wilk run plus a look at the histogram only takes a minute.
Frequently Asked Questions
What does the Shapiro-Wilk W statistic mean?
It measures how closely the sample’s shape matches a normal distribution; values closer to 1 indicate a better match. It’s meant to be read together with the p-value, not on its own.
What should I do if my data fail the normality test?
Consider a non-parametric alternative for the analysis you were planning, use Spearman’s correlation instead of Pearson’s via the Correlation calculator, or apply a transformation (such as a log transform) if that’s appropriate for your data.
Is Shapiro-Wilk the only normality test?
No — the Kolmogorov-Smirnov and Anderson-Darling tests are common alternatives — but Shapiro-Wilk generally has good power for small-to-moderate sample sizes, which is why it is the test this calculator runs.
Do I need my data to be perfectly normal to run a t-test?
No. t-tests and ANOVA are fairly robust to mild departures from normality, particularly with larger samples. A failed normality test is a signal to look more closely, not an automatic disqualification.
Related Calculators
References
- Shapiro SS, Wilk MB. An analysis of variance test for normality. Biometrika. 1965;52:591-611.
- D’Agostino RB, Stephens MA, eds. Goodness-of-Fit Techniques. New York: Marcel Dekker; 1986.
Need This Analysis Done for Your Manuscript?
Our PhD biostatisticians check your data’s distributional assumptions and select the right parametric or non-parametric test — publication-ready tables with reproducible R output.
