Determine the sample size needed for a target margin of error and confidence.
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.
Cochran (proportion)
n₀ = z² × p(1−p) / e²
Cochran (mean)
n₀ = (z×σ/e)²
Finite population correction
n = n₀ / (1 + (n₀−1)/N)
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.
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.
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.
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.