Sample size calculator

Uses Cochran's formula, common in theses and surveys, with the finite population correction when you enter a population size.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter confidence level, margin of error, expected proportion and population size (optional).
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

n₀ = z² × p(1 - p) ÷ e². With a population of N: n = n₀ ÷ (1 + (n₀ - 1) ÷ N). The result is rounded up.

Example

Inputs: Confidence level = 95%, Margin of error = 5 %, Expected proportion = 50 %. Result: Required sample size: 385; Unrounded size: 384.1459; Size for an unlimited population (n₀): 384.1459.

Limits and caveats

  • Assumes simple random sampling; cluster or stratified designs need an extra adjustment.
  • Does not allow for non-response, so add enough extra invitations to cover it.

Questions about this tool

What proportion should I use if I do not know?

Use 50%. It gives the largest sample size, so the number is enough whatever the result turns out to be.

Why does the size barely grow for huge populations?

Precision depends mainly on the sample itself. At 95% and 5% the answer approaches 385 however large the population is.

Is this Cochran's formula?

Yes, Cochran's formula for proportions with the finite population correction.