Sample Size Calculator — How to Estimate Required n
Estimate required sample size for a proportion with n = Z²·p·(1−p)/E². Pick 90/95/99% confidence (Z = 1.645/1.96/2.576), enter p and margin of error E. Example: 95%, p = 0.5, E = 0.05 → n ≈ 385 (ceil). Browser-only learning tool.
How it works
Choose 90%, 95%, or 99% confidence, then enter the planning proportion p and the desired margin of error E. The page maps confidence to Z and returns ceil of Z² p (1−p) / E². Runs in your browser for survey homework.
Formula and assumptions
n = Z² · p · (1 − p) / E², then round up. Keep in mind:
- Z comes from the selected level: 1.645 / 1.96 / 2.576 for 90 / 95 / 99%.
- Uses a normal approximation for a single proportion; not a finite-population correction.
- p = 0.5 maximizes n for a fixed E — a common conservative plan.
- Design effects, clustering, or multiple outcomes need a fuller study plan.
Example
Example: 95% (Z = 1.96), p = 0.5, E = 0.05 → n = ceil(384.16) = 385.
When to use it
- Homework: size a simple proportion survey.
- Compare how tighter E inflates required n.
- Pair with confidence-interval pages after you have data.
Frequently asked questions
Why use p = 0.5 when unsure?
For a fixed E, p(1−p) peaks at 0.5, so the plan is most conservative.
Is the result always an integer?
Yes here: the raw n is ceiled so you never under-sample the formula.
Does this include finite population correction?
No. It assumes a large or infinite population relative to n.
Can I enter Z instead of a confidence level?
This page uses the 90/95/99 select that maps to standard Z values.
Questions or feedback
Something unclear, broken, or missing? Draft a message below — we read every note about these tools.