Sample Size Calculator
n from Z, margin E, and either p(1−p) or σ — proportion or mean mode. Click any i for detail.
Study inputs
Mode
i
Mode
Proportion or mean. |
|
|---|---|
Confidence level
i
Conf
Maps to Z: 90→1.645, 95→1.96, 99→2.576. |
|
Margin of error
i
E
Proportion: decimal (0.05). Mean: same units as SD. |
|
Expected proportion p
i
p
Use 0.5 for maximum n. |
|
Std. deviation σ
i
SD
Required for mean mode. |
How to use this calculator
- Choose proportion or mean mode.
- Pick confidence level and margin of error.
- Enter p or σ.
- Read n rounded up.
Results explained
Survey sample-size sketches use n = Z² p(1−p)/E² for proportions and n = (Z σ / E)² for means. These ignore finite-population corrections and design effects.
Quick reference: sample size
Proportion: Z²p(1−p)/E²; mean: (Zσ/E)².
| Item | Detail |
|---|---|
| 95% Z | 1.96 |
| p=0.5 | Largest proportion n |
| Smaller E | Larger n |
| Finite population | Not corrected here |
Planning formula — power analysis for trials can differ.
How the estimate is built
n_prop = Z² p(1−p)/E²; n_mean = (Z σ / E)²; round up.
Example scenario
95%, E=0.05, p=0.5 → n = 385.
FAQ
What Z for 95%?
1.96 for large-sample normal.
Cluster samples?
Inflate n by a design effect — not modeled.
Response rate?
Divide n by expected response fraction separately.
Means units?
E and σ must share units.