Sample Size Calculator
Calculate the minimum sample size needed for surveys, experiments, and clinical trials. Find n based on confidence level, margin of error, and expected proportion or effect size.
Formula & Reference
| Variable | Symbol | Formula | Units |
|---|---|---|---|
| Sample Size Calculator | — | n = (z*/MOE)² × p(1-p) | participants |
Step-by-Step Examples
95% CI, ±3% margin of error, unknown proportion (use p=0.5).
- n = (1.96/0.03)² × 0.5 × 0.5
- = 42.78² × 0.25 = 4268 × 0.25 = 1067
- Round up: n = 1,068 participants
- This is why national polls often use ~1000-1500 respondents
95% CI, ±5% MOE, expect ~30% yes response.
- n = (1.96/0.05)² × 0.3 × 0.7
- = 1536.64 × 0.21 = 323
- Smaller than ±3% case because larger MOE allowed
95% CI, want MOE of ±2 mmHg blood pressure, SD=12 mmHg.
- n = (1.96 × 12 / 2)² = (11.76)² = 138.3
- n = 139 patients per group
- For two-group trial: total n = 278
Real-World Applications
Common Mistakes to Avoid
p=0.5 gives the largest (most conservative) sample size. If you have prior data suggesting p≈0.2, use it — you need fewer participants.
The calculated n is the required complete responses. If 40% won't respond, you must contact n/0.6 people.
This calculator gives n for one proportion/mean. For comparing two groups (A/B test), you often need this n per group.
Frequently Asked Questions
Related Math Calculators
Formula Explorer connections
Interpretation: This formula summarizes data, models uncertainty or supports inference about a population or random process. Assumption: The sampling design and distribution assumptions must match the data. Independence, sample size, outliers and measurement quality can materially affect interpretation.