Shapiro-Wilk Test Calculator
Test data for normality.
Enter your data to see results
Use the Shapiro-Wilk test to check whether your data follows a normal (bell-curve) distribution before running tests like t-tests or ANOVA that assume normality. It's the most reliable normality test for samples under 50 observations and helps you decide whether to use standard parametric tests or switch to non-parametric alternatives that don't require normally distributed data.
What Is the Shapiro-Wilk Test?
The Shapiro-Wilk test assesses whether a sample comes from a normally distributed population. It's widely considered the most powerful normality test for small to moderate sample sizes.
Question answered: "Is there evidence that this data is not normally distributed?"
Null hypothesis: The data follows a normal distribution. Alternative: The data does not follow a normal distribution.
Why Test for Normality?
Many statistical tests assume normally distributed data:
- T-tests: Assume normal populations (or large samples)
- ANOVA: Assumes normal residuals
- Pearson correlation: Assumes bivariate normality for inference
- Linear regression: Assumes normal residuals
Violating normality assumptions can lead to:
- Invalid p-values
- Incorrect confidence intervals
- Misleading conclusions
How It Works
The test compares the ordered sample values to expected values under normality.
Test Statistic
Where:
- = ordered sample values (smallest to largest)
- = tabulated coefficients based on expected normal order statistics
- = sample mean
Interpretation
| W Value | Interpretation |
|---|---|
| Close to 1 | Data consistent with normality |
| << 1 | Evidence against normality |
P-Value
If (typically 0.05), reject normality.
If , insufficient evidence to reject normality (doesn't prove normality).
Example Calculation
Data: 23, 25, 27, 28, 29, 31, 33
Step 1: Order data and calculate mean
Ordered: 23, 25, 27, 28, 29, 31, 33 Mean: 28
Step 2: Apply the Shapiro-Wilk formula with tabulated coefficients
For n = 7:
Step 3: Calculate W
(calculation involves specialized tables)
Step 4: Find p-value
For with :
Conclusion: No evidence against normality ().
Interpretation Guidelines
Significant Result (p < 0.05)
The data likely does not come from a normal distribution.
But consider:
- Is the departure from normality practically important?
- With large samples, even trivial deviations are significant
- What is the actual shape of the distribution?
Non-Significant Result (p ≥ 0.05)
We cannot conclude the data is normally distributed—only that we lack evidence against normality.
Remember:
- "Not significant" ≠"normal"
- Low power with small samples
- Consider visual methods too
Sample Size Considerations
Small Samples (n < 20)
- Low power to detect non-normality
- Non-significant results are weak evidence
- Visual inspection equally important
Moderate Samples (20-50)
- Reasonable power
- Good balance of sensitivity
Large Samples (n > 50)
- Very high power
- May reject normality for trivial deviations
- Practical significance matters more than statistical significance
Very Large Samples (n > 5000)
- Almost always rejects normality
- Even approximately normal data will fail
- Focus on visual assessment and effect on your actual analysis
Complement with Visual Methods
Q-Q Plot (Quantile-Quantile)
Plot sample quantiles against theoretical normal quantiles.
- Points on diagonal line → Normal
- S-curve → Skewness
- Heavy tails → Kurtosis issues
Histogram
Visual assessment of symmetry and bell shape.
Box Plot
Check for symmetry and outliers.
Alternatives to Shapiro-Wilk
Kolmogorov-Smirnov Test
Compares sample to any specified distribution. Less powerful than Shapiro-Wilk for normality specifically.
Anderson-Darling Test
Weights tail observations more heavily. Good for detecting tail departures.
D'Agostino-Pearson Test
Uses skewness and kurtosis. Works well for larger samples.
Lilliefors Test
Modified Kolmogorov-Smirnov when mean and variance are estimated from data.
What to Do If Normality Is Rejected
Option 1: Use Non-Parametric Tests
- Mann-Whitney instead of t-test
- Kruskal-Wallis instead of ANOVA
- Spearman instead of Pearson
Option 2: Transform the Data
- Log transformation for right skew
- Square root for count data
- Box-Cox transformation
Option 3: Proceed with Caution
Many tests are robust to mild normality violations, especially with:
- Large samples (Central Limit Theorem)
- Equal group sizes
- Similar variances
Option 4: Use Robust Methods
- Bootstrapping
- Permutation tests
- Trimmed means
Common Misconceptions
"Significant = Non-Normal"
True, but the deviation might be trivial. A perfectly normal population's sample will occasionally fail the test.
"Non-Significant = Normal"
False. Non-significance only means insufficient evidence against normality—not proof of normality.
"Must Transform If Non-Normal"
Not always. Many analyses are robust to non-normality, especially with larger samples.
"Normality Test Should Always Be Done"
Not necessarily. With large samples, the Central Limit Theorem often makes normality less critical. Visual assessment may be more useful.
Reporting Results
When normality is not rejected:
"A Shapiro-Wilk test indicated that the residuals were approximately normally distributed, W = 0.98, p = .42."
When normality is rejected:
"A Shapiro-Wilk test indicated significant departure from normality, W = 0.91, p = .003. Inspection of the Q-Q plot suggested moderate positive skewness."
Applications
Before Parametric Tests
Test residuals or group data before t-tests, ANOVA, or regression.
Quality Control
Verify that process measurements follow expected normal distribution.
Research Validation
Confirm distributional assumptions for statistical models.
Historical Context
Samuel Shapiro and Martin Wilk introduced this test in 1965. It quickly became the preferred normality test due to its superior power, especially for small samples.
The test was computationally difficult before computers—the coefficients required specialized tables. Modern software has made it accessible for any sample size up to several thousand.
Related Calculations
- Skewness Calculator — Measure asymmetry
- Kurtosis Calculator — Measure tail weight
- Z-Score Calculator — Standardization
- Normal Probability Calculator — Normal distribution
Summary
The Shapiro-Wilk test assesses whether data come from a normal distribution. A significant result (p < 0.05) suggests non-normality; a non-significant result does not prove normality. The test is most useful for small to moderate samples—large samples often reject normality even for approximately normal data. Always complement with visual methods (Q-Q plots, histograms). If normality is rejected, consider non-parametric alternatives, data transformation, or assess whether your analysis is robust to the observed departure.