Determine statistically valid sample sizes for surveys, A/B tests, and clinical research. Supports infinite/finite populations, custom confidence levels, and visual margin-of-error analysis.
Determining an adequate sample size is the cornerstone of inferential statistics. Too small a sample may fail to detect real effects (low power), while an excessively large sample wastes resources. This calculator implements the widely accepted Cochran formula for infinite populations and the Yamane (finite population correction) adjustment, ensuring your research meets desired precision and confidence constraints.
? Cochran's formula (infinite population)
n₀ = (Z² × p × (1-p)) / e²
where Z = z-score for confidence level, p = expected proportion, e = margin of error.
Finite population correction (Yamane): n = n₀ / (1 + (n₀-1)/N )
Our approach follows established statistical theory from William Cochran (1977) and Yamane (1967). The sample size maximizes variability at p=0.5, ensuring conservative estimates. For populations under 100,000, we strongly recommend applying finite population correction to avoid over-sampling. The underlying assumption is simple random sampling, although the formula also provides a baseline for stratified designs.
1. Choose confidence level (1-α). For 95% confidence, the Z‑score is 1.96, reflecting that the true population parameter lies within the margin of error in 95 of 100 repeated samples.
2. Set the margin of error: e = 0.05 means you accept a ±5% difference between sample estimate and true proportion.
3. Estimate expected proportion p: if unknown, p=0.5 yields maximum required sample size.
4. Compute initial n₀, then apply finite population correction (FPC): n = n₀ / (1 + (n₀-1)/N).
5. For populations below 10,000, FPC substantially reduces sample size without sacrificing precision.
Real-world constraints such as budget, non-response rate (we recommend inflating sample size by 10–20%), and design effects for cluster sampling are not automatic; consider over-sampling accordingly.
A research team aims to estimate COVID‑19 booster acceptance among hospital workers. Total population N = 4,200. They choose 95% confidence, margin of error e = 3% (0.03), and expected proportion p = 0.65 based on previous surveys. The infinite sample yields n₀ = (1.96² × 0.65×0.35) / (0.03²) ≈ 972. After finite correction: n = 972 / (1 + (971/4200)) ≈ 789. The calculator instantly provides 789 subjects, saving the team from recruiting 183 unnecessary participants while maintaining statistical rigor.
If your population size N is less than 50,000, the finite correction yields a noticeably smaller sample size while maintaining precision. Our correction uses the standard formula: n_adj = n₀ / (1 + (n₀ - 1)/N). For populations > 500,000, the difference between corrected and uncorrected is negligible (<1%).