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²Pass/fail results, defect rates, yes/no answers.
Use 50% if unknown: it gives the largest sample.
Leave blank for a large or unknown population.
Result
- z-score
- 1.960
n = 1.960² × 0.5 × 0.5 ÷ 0.05² = 385
Rounded up to whole units. Assumes simple random sampling.
Sample at least 385 units for 95% confidence within ±5 percentage points.
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
n = Z² × p × (1 − p) ÷ E²n = Z² × σ² ÷ E²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
| Confidence | Z-score | α | Common use |
|---|---|---|---|
| 80% | 1.282 | 0.20 | Preliminary studies |
| 90% | 1.645 | 0.10 | General screening |
| 95% | 1.960 | 0.05 | Standard (most common) |
| 99% | 2.576 | 0.01 | High-confidence |
| 99.9% | 3.291 | 0.001 | Critical applications |