Sample size calculator
Work out how many parts to measure before you run the test: enter the smallest difference that matters, the process standard deviation, and the power you need.
64 per group (128 total)
t-test sample sizes use the exact noncentral t distribution, the same method as Minitab; the proportion test uses the normal approximation. Open SpcLite →
What the inputs mean
- Difference to detect — the smallest shift in the mean that matters in practice, in the same units as your data. Smaller differences need many more samples.
- Standard deviation — an estimate of process variation, from historical data, a pilot study, or σ within from a control chart.
- Power — the probability of detecting the difference if it is real. 80% is the usual minimum; 90% is common when missing a change is costly.
- Significance level α — the risk of a false alarm, usually 0.05.
The formula behind it
For a two-sided comparison of two means, the classic normal approximation is:
n per group ≈ 2 · (z₁₋α/₂ + z₁₋β)² · (σ / Δ)²- With α = 0.05 and 80% power,
(1.960 + 0.842)² ≈ 7.85, so detecting a half-σ shift needs about 2 × 7.85 × 4 ≈ 63 parts per group; the t correction above raises it to 64. - A one-sample or paired test needs roughly half the per-group number of a two-sample test.
Sample sizes at a glance (two-sided, α = 0.05)
| Shift to detect (Δ/σ) | 2-sample, 80% power | 2-sample, 90% power | 1-sample, 80% power |
|---|---|---|---|
| 0.25 | 253 per group | 338 per group | 128 |
| 0.5 | 64 per group | 86 per group | 34 |
| 0.75 | 29 per group | 39 per group | 16 |
| 1 | 17 per group | 23 per group | 10 |
| 1.5 | 9 per group | 11 per group | 6 |
Sample size in quality work
- Verifying an improvement (before vs after): use the 2-sample t with σ from the control chart of the current process.
- Showing a defect rate dropped below target: use 1 proportion. Rare defects need large samples — going from 5% to 2% takes hundreds of parts.
- Capability studies are different: aim for at least 30, ideally 100+, measurements so the Cpk estimate is not too wide.