Determine the optimal sample size for your surveys, experiments, and research studies.
Enter your parameters and click "Calculate Sample Size" to see results.
Sample size (n) is the number of observations or participants needed in a study to draw reliable conclusions about a population. Larger samples generally provide more accurate estimates but cost more to collect.
Too Small: Results may be unreliable, missing important effects (Type II error)
Too Large: Wastes resources, time, and money
Just Right: Balances statistical power with practical constraints
Confidence Level: How certain you want to be (95% is standard)
Margin of Error: Acceptable uncertainty in your estimate
Expected Variability: Standard deviation or proportion
Effect Size: The minimum difference you want to detect
| Confidence Level | Z-Score | Use Case |
|---|---|---|
| 90% | 1.645 | Quick surveys, preliminary studies |
| 95% | 1.96 | Standard for most research |
| 99% | 2.576 | High-stakes decisions, medical studies |
Formula: n = (Z² × p × (1-p)) / E²
Example: To estimate election results within ±3% at 95% confidence, you need ~1,067 voters
Formula: n = (Z² × σ²) / E²
Example: To estimate average height within ±2cm (σ=10cm) at 95% confidence, you need ~97 people
Formula: n = 2 × (Z + Z_β)² × p̄(1-p̄) / Δ²
Example: To detect a 5% improvement (10%→15%) with 80% power, you need ~620 per group
Formula: n = 2 × [(Z + Z_β) × σ / Δ]²
Example: To detect a 5-point difference (σ=10) with 80% power, you need ~64 per group
Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site — you're helping me build what developers actually need.
Choose confidence level and margin of error. For proportions, provide an estimated p (use 0.5 if unknown). For means, provide population SD if available.
p = 0.5 maximizes variability and yields the largest required sample size when no prior estimate is known.
For large populations, required sample size mainly depends on confidence and error. Finite population correction matters when the sample is a large fraction of N.
Power‑based sizing needs effect size and desired power (1−β). This tool focuses on precision (margin‑of‑error) sizing; use power analysis for hypothesis tests.