Skip to content

Quality & Statistics

Sample Size Calculator

The sample size needed for surveys, quality inspections, and experiments — for proportions or means, with finite population correction.

n = Z²·p(1−p) ÷ E²

Use 50% if unknown (maximizes sample size)

Why sample size matters

Too small a sample gives unreliable conclusions. Too large wastes time and money. The right sample size balances statistical confidence with practical resource constraints.

  • Ensures statistically valid conclusions
  • Optimizes inspection costs
  • Required for AQL sampling plans
  • Drives experiment design

Sample size formulas

For proportions
n = Z² × p × (1 − p) ÷ E²
For means
n = Z² × σ² ÷ E²
Finite population correction
n_adj = n ÷ (1 + (n − 1) ÷ N)

Z is the z-score for the confidence level, E the margin of error, σ the standard deviation, and N the population size.

Z-score by confidence level

ConfidenceZ-scoreαCommon use
80%1.2820.20Preliminary studies
90%1.6450.10General screening
95%1.9600.05Standard (most common)
99%2.5760.01High-confidence
99.9%3.2910.001Critical applications

Frequently asked questions

What proportion should I use if I don’t know the expected defect rate?
Use 50% (p = 0.5), which gives the maximum (most conservative) sample size. As the true proportion moves away from 50% in either direction, the required sample size decreases.
When should I use finite population correction?
Apply finite population correction when the sample is more than 5% of the total population. For large populations (over 100,000), the correction has negligible effect.
How do I estimate standard deviation for means?
Options: (1) use data from a pilot study, (2) use historical process data, (3) estimate it as range ÷ 4 if you can estimate the range, or (4) use a conservative estimate and adjust after initial data collection.