How Many Parts Should I Measure? Sample Size for a Mean
Nobody wants to measure more parts than necessary, but measuring too few gives an average you cannot trust. The classic formula n = (z x sigma / E) squared answers the question directly, and this tool adds the lot size correction and a chart so you can trade precision for effort.
Your numbers
From past data or a pilot run.
How close to the true lot mean you need to be (plus or minus).
Your results
Assumes roughly normal measurements and a known sigma. If sigma is estimated from a small pilot, add a safety margin.
Pieces to measure vs allowed margin of error
Sweeps Allowed margin of error E from 0.001 to 0.01, holding your other inputs fixed.
Sampling rules inside your inspection plans
Optional: a review of how to encode sample size rules in your ERP quality module.
Optional. The tool and every export work without this. No spam.
How to use it
Pick the confidence level, enter the process standard deviation, and decide the margin of error: how close to the true lot average you need to be. Enter the lot size. The result is the number of parts to measure. Halving E roughly quadruples n, which the chart makes plain, so be realistic about the precision you really need.
- Use sigma from a control chart or capability study, not tolerance divided by six.
- Set E well above the repeatability of your gauge.
- For tiny lots the correction can cut the sample sharply.
The formula
For a normal process, the margin of error on a mean is E = z x sigma / sqrt(n). Solving gives n = (z x sigma / E) squared, with z = 1.645, 1.96 or 2.576 for 90, 95 and 99 percent confidence. When the sample is a large share of the lot, the finite population correction n' = n / (1 + (n - 1) / N) lowers the requirement. The tool always rounds up.
Worked example
With sigma = 0.012 mm, E = 0.004 mm and 95 percent confidence, z = 1.96 and n = (1.96 x 3) squared, which is about 34.6. In a lot of 2000 the correction brings it to about 34, so you round up to 35 parts. At E = 0.002 mm you would need about 138. Moving to 99 percent at the original E raises the need to roughly 60. Use the chart to find the knee where extra precision stops being worth the measuring time.
Common mistakes
Using the tolerance instead of the actual process sigma overstates the sample. Ignoring gauge variation is worse: if your measurement error is bigger than E, no sample size will deliver the precision you want. Finally, this estimates the average only. To control the spread or the fraction out of tolerance you need other methods such as variables sampling or a capability study.
Frequently Asked Questions
What sigma should I use?
Use the standard deviation from a recent stable process, such as a control chart or a capability study. If you have no data, measure a pilot sample of about 20 and use that, then add some margin because small samples understate spread.
Why does the sample get so big for small E?
Because n scales with one over E squared. Doubling the precision needs four times the measurements. This is a property of statistics, not a flaw in the tool.
Is this the same as an AQL sample size?
No. An AQL plan decides lot acceptance from the number of defectives. This tool sizes a sample to estimate an average. Different questions, different formulas.
What if my data are not normal?
With n above about 30 the average is still close to normal for most shapes, so the formula is a fair guide. For strongly skewed data or small samples, transform the data or use a larger sample.
We can help set up automatic sample size rules inside your ERP inspection plans so inspectors get the right count for each characteristic. Ask for a quick review.
Related Tools
Variables Sampling Quality Index Acceptance Calculator (Z1.9 k-Method)
Accept or reject a lot from measured data using the quality index method of variables sampling, with an estimate of percent nonconforming.
Quality & InspectionCpk Confidence Interval and Sample Size Calculator
Shows the true uncertainty around a Cpk estimate for a given sample size, so a Cpk of 1.40 from 30 parts is not mistaken for proof.
Quality & InspectionDefect Rate Upper Confidence Limit Calculator
You found 2 defects in 125 pieces. What is the highest defect rate the lot could plausibly have? This tool answers that.
Quality & InspectionGage Resolution and Distinct Categories (ndc) Calculator
Check whether gage resolution is fine enough for a tolerance and calculate the number of distinct categories from part variation and gage R&R.
More Quality & Inspection tools
See all- SAP QM Process Capability Cp Cpk Calculator
- SAP QM Lot Rejection Rate, PPM and Sigma Level Calculator
- SAP QM Gauge R&R Study Calculator
- SAP QM Cp and Cpk Capability Calculator
- Job Shop Material Certification Log Worksheet
- Job Shop First Piece Inspection Sign-Off Template
- Job Shop Scrap and Rework Cost Calculator
- Master Data Audit Sample Size Calculator
- Data Quality Sigma Level Calculator