gizmobench

Sample Size Calculator

A sample size calculator usually hands back one number. This one prints the arithmetic behind it. At 95% confidence z is 1.959964, computed from the level rather than read off a three-row table, and with a margin of 5 points and an expected 50% that gives n0 = 384.1459, so 385 completed responses for an unbounded population. Enter a population of 1,000 and the finite-population correction takes it to 278; add a 50% response rate and it works out 556 invitations. A table under the working runs the same arithmetic at 90, 95 and 99% and margins of 3 to 6 points, so the cost of a tighter margin is a number on the page.

95% confidenceMargin 5 pointsExpected 50%Population unboundedNo response rate
z at 95% confidence   1.959964, the inverse normal at 0.975
p, expected 50%       0.5, so p(1 - p) = 0.25
e, margin 5 points    0.05, so e² = 0.0025

n0 = z² × p(1 - p) / e²
   = 3.841459 × 0.25 / 0.0025
   = 384.1459, rounded up to 385 for an unbounded population

population left blank   no correction: 385 completed responses
no response rate        invitations not worked out
z rounded to 1.96       n0 = 384.16, 385 completed responses, the same as above
Completed responses for an unbounded population and expected 50%
confidence3 pts4 pts5 pts6 pts
90%752423271188
95%1,068601385, your settings267
99%1,8441,037664461

The margin is in percentage points either side of the estimate: 5 means plus or minus 5 points. A blank population is treated as unbounded; a blank response rate leaves the invitations out.

Completed responses
385
Unbounded population
385
n0
384.1459
Invitations
no rate entered
  • z = 1.959964, p = 0.5, e = 0.05population left blank, so unbounded
    n0 = 384.1459, rounded up to 385
  • z rounded to 1.96three decimals, as printed tables give it
    n0 = 384.16, rounded up to 385
Accuracy. The textbook sample size for estimating a proportion, worked in full: z comes from your confidence level through the inverse normal, n0 = z² × p(1 - p) / e², a population you enter divides that by 1 + (n0 - 1) / N, and only the final counts are rounded up. It assumes a simple random sample of independent responses and the normal approximation, and applies no design effect. It cannot make a sample representative, remove nonresponse or other bias, or stand in for a clinical-trial power calculation, and a blank population is treated as unbounded rather than guessed.

Common questions

How do you calculate the sample size for a survey?
For a proportion, n0 = z² × p(1 - p) / e², where z comes from the confidence level, p is the proportion you expect and e is the margin as a proportion. At 95% confidence z is 1.959964, and with p = 0.5 and e = 0.05 that is 3.841459 × 0.25 / 0.0025 = 384.1459, rounded up to 385 completed responses. For a population of N the page divides n0 by 1 + (n0 - 1) / N and rounds up again: 278 for a population of 1,000 and 370 for 10,000. Every one of those steps is printed on the page.
Why is the answer 385 and not 384?
Because a sample size is rounded up, never to the nearest. n0 at 95% confidence, a 5-point margin and an expected 50% is 384.1459, and 384 responses would give a margin a little wider than 5 points. The page rounds only the final counts: the population correction works on the unrounded 384.1459, which is why a population of 1,000 gives 278 rather than the 279 that correcting 385 would give.
What expected proportion do I enter if I have no estimate?
50% is the conventional entry, because p(1 - p) is largest there, at 0.25, so 50% gives the largest sample of any value. At 95% confidence and a 5-point margin it gives 385, against 246 for an expected 20% and 139 for 10%. The page uses whatever you enter and says how it read it: a bare 0.5 is read as 0.5%, and the note under the result says so.
Does the population size matter?
Much less than people expect once the population is large. At 95% confidence and a 5-point margin, a population of 1,000 gives 278 completed responses, 10,000 gives 370, 1,000,000 gives 384 and an unbounded one 385. Leave the population field blank and the page treats it as unbounded rather than guessing a size.
Why do other calculators give a slightly different number?
Two things move the result: how z was rounded and whether the population correction was applied. Printed tables give 1.96 for 95%; this page computes 1.959964 and also shows the 1.96 version, where n0 is 384.16 instead of 384.1459. Often the rounded-up count is the same, but not always: for a population of 1,000,000 it is 384 with 1.959964 and 385 with 1.96.
How many invitations does a response rate mean?
Enter a response rate and the page divides the completed responses by it and rounds up: 278 completed responses at 50% is 278 / 0.5 = 556 invitations. A rate of 0 is refused, because no number of invitations reaches the sample, and when the invitations come to more than the population you entered, the page says so. The rate only scales the count: it cannot tell whether the people who answer differ from the people who do not.
What does this calculation leave out?
It assumes a simple random sample of independent responses and the normal approximation. It applies no design effect, so a clustered or weighted design is not reflected in the number, and it cannot see nonresponse bias, gaps in who could be reached, or question wording. It sizes a sample for estimating one proportion; it is not a power calculation for comparing groups or for a clinical trial.

The textbook sample size for estimating a proportion, worked in full: z comes from your confidence level through the inverse normal, n0 = z² × p(1 - p) / e², a population you enter divides that by 1 + (n0 - 1) / N, and only the final counts are rounded up. It assumes a simple random sample of independent responses and the normal approximation, and applies no design effect. It cannot make a sample representative, remove nonresponse or other bias, or stand in for a clinical-trial power calculation, and a blank population is treated as unbounded rather than guessed.