Sample Size Calculator
Determine the sample size needed for a target margin of error and confidence.
Inputs
For surveys/polls use proportion. For continuous measurements with known σ use mean.
Acceptable +/− error, expressed as percentage points.
Use 0.5 if unknown — this maximises the required sample size.
When your population is finite and n₀ > 5 % of N, the finite population correction reduces the required sample.
Required sample size (n)
385
Rounded up to guarantee the margin-of-error constraint.
n (infinite population)
385
Critical z value
1.9600
Finite population correction applied
No
Step by step
Critical z value
= 1.9600
Cochran formula (infinite population)
n₀ = z² × p(1−p) / e² = 1.9600² × 0.5×0.5000 / 0.0500²
= 385
Required sample size (rounded up)
= 385
How it works
The Cochran formula gives the minimum sample size to achieve a specified margin of error at a given confidence level. For proportions it is n₀ = z² × p(1−p) / e², where p = 0.5 maximises n₀ and is therefore the conservative choice when the true proportion is unknown. When the population is finite and n₀ exceeds 5 % of N, the finite population correction n = n₀/(1+(n₀−1)/N) reduces the requirement.
Formulas
Cochran (proportion)
n₀ = z² × p(1−p) / e²
- z
- Critical z value
- p
- Expected proportion
- e
- Margin of error (decimal)
Cochran (mean)
n₀ = (z×σ/e)²
Finite population correction
n = n₀ / (1 + (n₀−1)/N)
- N
- Population size
Frequently Asked Questions
Why do I use p = 0.5 when the proportion is unknown?
The product p(1−p) is maximised at p = 0.5, which produces the largest — and most conservative — sample size estimate. Any other value of p will result in a smaller required sample. By using 0.5 you ensure the margin-of-error target is met regardless of the actual proportion.
What is the finite population correction (FPC)?
For a large population the Cochran formula treats n as if sampling from an infinite pool. When your population is finite and the uncorrected sample would be more than 5 % of N, the FPC shrinks the required n because you are sampling a non-trivial fraction of the total population.
Why is the result always rounded up?
Rounding down would mean your actual margin of error slightly exceeds the target. Rounding up guarantees the margin-of-error constraint — you cannot have a fractional person in a sample.
Does this formula assume simple random sampling?
Yes. The Cochran formula assumes each unit is drawn independently with equal probability. For cluster, stratified or systematic designs the effective sample size differs and you need a design effect (DEFF) correction.