The formula
The sample size is z² p(1 − p) / e², where z comes from the confidence level, p is the expected proportion and e is the margin of error as a decimal.
At 95% confidence z is 1.96, and with p = 0.5 and e = 0.05 the answer is 384.16, which rounds up to 385.
Worked example
A margin of ±5% at 95% confidence needs 385 responses when the audience is large.
If only 1,000 people are available, the correction brings the requirement down, because you are sampling a large share of the whole group.
Why 50% is the safe guess
p(1 − p) is largest at 0.5, so assuming a 50/50 split gives the biggest sample size and therefore the safest plan.
If you already know roughly what the answer will be, entering that proportion can cut the sample needed.
Rounding and reality
Always round up, because a fraction of a person cannot be surveyed.
Expect a lower response rate than you plan for: if a third of invitations are answered, invite three times as many people.
Inputs for the sample size calculator
Margin of error
How close the estimate must be, in percentage points.
Confidence level
How often the true value should fall inside the margin. 95% is the usual choice.
Expected proportion
The share you expect to answer a certain way. 50% needs the largest sample.
Population size
The total number of people available. Leave at 0 for a very large group.
CALCULATOR QUESTIONS
Sample size calculator questions
How many responses do I need for a 5% margin of error?
385 at 95% confidence, assuming a 50/50 split and a large population.
Why does a smaller population need fewer responses?
Because you are sampling a larger share of it, so each response carries more of the total information.
Why use 50% when I do not know the answer?
It gives the largest possible sample size, so the plan is safe whatever the true proportion turns out to be.
Does the sample size depend on the population?
Only when the population is small enough to matter. Above about 20,000 the correction changes almost nothing.
