FREE TOOL

Histogram Generator with Normality Check

Paste a column of measurements. Get a histogram with the fitted normal curve, the summary statistics, skewness and kurtosis, and an Anderson–Darling test of whether the data could have come from a normal distribution.

Histogram and normality check

Paste at least 8 values separated by new lines, spaces, tabs, commas or semicolons.
Leave blank to use Sturges' rule, or enter 2 to 50.
Shown with the results, for example mm or in.
Mean
25.0084 mm
Standard deviation
0.02461 mm
Min – max
24.96 mm – 25.06 mm
Median
25.01 mm
Skewness (G1)
0.0725
Excess kurtosis (G2)
-0.253
Anderson–Darling A²*
0.2181
p-value
0.84
Normality at α = 0.05
No evidence against normal
HistogramHistogram of 25 values in 6 bins with the fitted normal curve.0246824.96 – 24.977: 224.977 – 24.993: 524.993 – 25.01: 425.01 – 25.027: 825.027 – 25.043: 425.043 – 25.06: 224.9625.00825.06
Bars: count per bin. Line: normal curve with the sample mean and standard deviation, scaled to the counts.
Frequency table
BinCount
24.96 – 24.97672
24.9767 – 24.99335
24.9933 – 25.014
25.01 – 25.02678
25.0267 – 25.04334
25.0433 – 25.062
Intermediate steps
StepFormulaValue
Sample sizeCount of values25
Meanx̄ = Σx / n25.0084
Standard deviations = √(Σ(x − x̄)² / (n − 1))0.02461
Number of binsk = ⌈log₂ 25⌉ + 16
Bin width(25.06 − 24.96) / 60.016667
SkewnessG1 = √(n(n−1)) / (n−2) × m₃ / m₂^1.50.07254
Excess kurtosisG2 = (n−1) / ((n−2)(n−3)) × ((n+1) g₂ + 6)-0.2532
Anderson–Darling A²A² = −n − (1/n) Σ (2i−1) [ln Φ(zᵢ) + ln(1 − Φ(zₙ₊₁₋ᵢ))]0.211
Adjusted A²*A²* = A² (1 + 0.75/25 + 2.25/25²)0.2181
p-valueD'Agostino & Stephens approximation0.84

Formulas used

Number of bins (Sturges)
k = ⌈log₂ n⌉ + 1
Bin width
h = (max − min) / k
Sample standard deviation
s = √(Σ(x − x̄)² / (n − 1))
Skewness (adjusted Fisher–Pearson)
G1 = √(n(n−1)) / (n−2) × m₃ / m₂^1.5
Anderson–Darling statistic
A² = −n − (1/n) Σ (2i−1) [ln Φ(zᵢ) + ln(1 − Φ(zₙ₊₁₋ᵢ))], zᵢ = (x₍ᵢ₎ − x̄)/s
Small-sample adjustment
A²* = A² (1 + 0.75/n + 2.25/n²)

Assumptions and limits

  • Values are independent measurements of one characteristic, in the same unit.
  • The mean and standard deviation are estimated from the data. The p-value approximation from D'Agostino & Stephens accounts for that.
  • At least 8 values are needed. With small samples the test has little power, so 'no evidence against normality' is weak evidence for it.
  • With very large samples the test flags departures too small to matter. Look at the histogram as well as the p-value.
  • Bins are equal width from the minimum to the maximum. The last bin includes its upper edge.

Worked example

Illustrative example: 25 shaft diameters in mm (25.02, 24.98, 25.05 … 25.03), the same values the calculator loads with.

Intermediate steps
StepFormulaValue
Sample sizeCount of values25
Meanx̄ = Σx / n25.0084
Standard deviations = √(Σ(x − x̄)² / (n − 1))0.02461
Number of binsk = ⌈log₂ 25⌉ + 16
Bin width(25.06 − 24.96) / 60.016667
SkewnessG1 = √(n(n−1)) / (n−2) × m₃ / m₂^1.50.07254
Excess kurtosisG2 = (n−1) / ((n−2)(n−3)) × ((n+1) g₂ + 6)-0.2532
Anderson–Darling A²A² = −n − (1/n) Σ (2i−1) [ln Φ(zᵢ) + ln(1 − Φ(zₙ₊₁₋ᵢ))]0.211
Adjusted A²*A²* = A² (1 + 0.75/25 + 2.25/25²)0.2181
p-valueD'Agostino & Stephens approximation0.84

Result: Mean 25.0084 mm, standard deviation 0.02461 mm. A²* = 0.218 and p = 0.84, well above 0.05, so the test gives no reason to reject a normal model.

How to read a histogram and a normality test

Shape first

Before any statistic, look at the bars. One peak in the middle, tailing off evenly on both sides, is what a stable, centred process usually looks like. Two peaks often mean two machines, cavities, operators or material lots mixed together. A cliff on one side often means sorted parts or a gauge at the end of its range.

Change the bin count and look again. A shape that only appears at one bin width is usually noise.

What the Anderson–Darling test tells you

The test compares your data with a normal distribution that has the same mean and standard deviation, weighting the tails heavily. A small p-value (below 0.05 is the usual cut-off) says data like yours would be unlikely from a normal distribution. A large p-value says the data is consistent with normal. It does not prove the data is normal.

Why normality matters for capability

Cp, Cpk, Pp and Ppk turn into a predicted defect rate through the normal distribution. If the data is skewed, the predicted PPM in the long tail can be far off even when the index looks fine. Check normality here before you run the process capability calculator, and if the data fails, look for the cause before reaching for a transformation.

Skewness and kurtosis

Skewness is zero for symmetric data. Positive skew means a long tail to the right, common for flatness, runout and other characteristics bounded at zero. Excess kurtosis is zero for a normal distribution. Positive values mean heavier tails and a sharper peak, negative values a flatter shape.

Common mistakes

  • Testing mixed data. Data from two cavities or shifts can fail the test even when each source is normal. Split by source first.
  • Trusting a pass from 10 values. Small samples rarely fail any normality test. Collect more data before relying on tail predictions.
  • Rounding measurements coarsely. Values recorded to too few decimals pile into a few bins and can fail the test on resolution alone.
  • Ignoring the picture. A p-value can't tell you why the data isn't normal. The histogram often can.
  • Dropping outliers to pass. Find out why the point is there. Remove it only if it is a recording or measurement error.

Frequently asked questions

How many bins should a histogram have?

Sturges' rule, k = ⌈log₂ n⌉ + 1, is a common default and gives 6 bins for 25 values and 8 for 100. Try a few counts: a real feature stays visible across them.

What p-value means the data is normal?

None proves normality. By convention a p-value of 0.05 or more means the test found no evidence against a normal distribution, and below 0.05 means it did.

Why Anderson–Darling and not another test?

Anderson–Darling gives extra weight to the tails, which is where defect predictions come from. Shapiro–Wilk is a good alternative, especially for small samples.

How many data points do I need?

This tool requires at least 8. For judging shape and tails, 50 to 100 or more is far better.

Can I paste data from Excel?

Yes. Copy a column or row and paste it. Values can be separated by new lines, spaces, tabs, commas or semicolons.

What if my data isn't normal?

First look for a cause: mixed sources, a shift during the run, or a physical bound such as zero. If the characteristic is naturally skewed, use a capability method for non-normal data rather than forcing a normal model.

Sources

  • Sturges, H. A., "The Choice of a Class Interval", Journal of the American Statistical Association, 1926.
  • Anderson, T. W. and Darling, D. A., "A Test of Goodness of Fit", Journal of the American Statistical Association, 1954.
  • D'Agostino, R. B. and Stephens, M. A., Goodness-of-Fit Techniques, Marcel Dekker, 1986: adjusted A² and p-value approximation.
  • Joanes, D. N. and Gill, C. A., "Comparing Measures of Sample Skewness and Kurtosis", The Statistician, 1998.
  • NIST/SEMATECH e-Handbook of Statistical Methods: histogram and Anderson–Darling test.

Results are computed in your browser from the published formulas named above. They are an engineering aid, not a substitute for the governing standard, your drawing, or your customer's requirements.

Related Tools & Templates