Lelifi·tools

Sample Size Calculator

For 95 percent confidence, a 5 point margin of error and no prior guess, the sample size is 385 responses. The formula n = z^2 × p × (1 - p) / E^2 gives 384.16, which rounds up to 385. With 30 percent nonresponse you would send out 550 questionnaires.

Set the confidence level, margin of error and population, and get the number of responses to collect, the corrected figure for a small group, and the questionnaires to send out.

By the Lelifi editors ·

Key takeaways

Sample size needed against margin of error, 95 percent confidence, p = 0.5n9710 pts3855 pts1,5372.5 pts2,4012 ptsBars are drawn to a square root scale so the shape stays readable: halving the error costs four times the interviews.
Sample size against margin of error at 95 percent confidence, drawn to a square root scale.
The finite population correction pulls the sample down as the population shrinksUncorrected: 385N = 50,000382N = 10,000370N = 2,000323N = 1,000278N = 500218All figures assume 95 percent confidence and a 5 point margin of error on a share with p = 0.5.Below about N = 2,000 the correction saves a quarter of the interviews.
How the finite population correction shrinks the sample as the population gets smaller.
On this page
  1. What a sample size calculation decides
  2. The proportion formula, worked through
  3. Why p = 0.5 is the safe choice
  4. Confidence levels and the z value behind them
  5. Halving the error takes four times the sample
  6. Small populations and the finite population correction
  7. z or t, and where the two differ
  8. Turning the number into a fieldwork plan

What a sample size calculation decides

A sample size calculation answers one question: how many responses do you need so that the estimate is useful? The inputs are the confidence level you promise, the margin of error you will tolerate, and a guess about the answer you are trying to estimate. The output is a head count.

The margin of error is the half-width of the interval your estimate will sit in. If you survey a city and find that 42 percent of residents support a transit plan, a margin of error of 5 points means you will report something like "42 percent, plus or minus 5 points", and the true share sits inside that band 95 percent of the time if you drew at random. Tightening the band from 5 points to 2.5 points costs a lot more interviews, and that trade is what the arithmetic below quantifies.

Two links in the background are worth naming. The U.S. Census Bureau sample size documentation (accessed 2026) describes the American Community Survey, which samples about 2.9 million housing unit addresses a year and publishes margins of error at the 90 percent confidence level, the Census Bureau standard. The CDC National Center for Health Statistics reliability guidance (updated 2026) sets out the practice in health surveys: estimates are judged by minimum sample size, confidence interval width and degrees of freedom, and estimates that fail those checks get suppressed rather than published.

The proportion formula, worked through

For estimating a share, or proportion, the required sample size is n = z^2 × p × (1 - p) / E^2. The z value comes from the confidence level, p is your guess at the share, and E is the margin of error written as a proportion. Here is the classic case worked line by line: 95 percent confidence, a 5 point margin of error, and no useful prior guess so p = 0.5.

StepWorkingResult
Confidence level95 percentz = 1.960
z squared1.960 × 1.9603.8416
p(1 - p) with p = 0.50.5 × 0.50.25
Numerator3.8416 × 0.250.9604
E squared0.05 × 0.050.0025
n0.9604 ÷ 0.0025384.16
Round upyou cannot interview part of a person385 responses

Two habits matter here. Always round up, never down: 384 people gives an error slightly wider than the 5 points you promised. And keep the units straight: E = 5 percent means E = 0.05 in the formula, so E squared is 0.0025, not 25. Plugging in 5 by mistake produces a number 25 times too large.

Why p = 0.5 is the safe choice

The p × (1 - p) term is the part people try to guess away, and the guess almost never helps. That product is a parabola peaking at p = 0.5, where it equals 0.25. At p = 0.3 it is 0.21, at p = 0.1 it is 0.09, and at p = 0.01 it is 0.0099. The smaller the product, the smaller the sample, so the choice of p moves the answer by a large factor at the extremes.

Guessed pp × (1 - p)n at 95 percent, E = 5 pointsDifference vs p = 0.5
0.5 (no guess)0.2500385baseline
0.40.240036916 fewer
0.30.210032362 fewer
0.20.1600246139 fewer
0.10.0900139246 fewer

Plugging in a confident-looking p = 0.1 buys you a sample that is less than half the safe size, and if the real share turns out to be 0.4 your error will be nearly twice what you promised. The NIST/SEMATECH e-Handbook of Statistical Methods section on sample sizes required (accessed 2026) makes this point directly: taking p = 0.5 gives the largest possible sample size, the widest interval and the highest cost, but it also gives the maximum information. Use p = 0.5 unless you have prior data, and if you do have prior data, keep in mind the guess is often wrong in the direction that hurts.

Confidence levels and the z value behind them

Every confidence level maps to a z value, and the z value is what does the work in the formula. The standard table for two-sided intervals runs as follows, and the z values are the ones listed in the NIST Technical Note 1297 (1994 edition), the same factors used in the Stanford University course tables on the normal distribution (accessed 2026).

Confidence levelz valuen for a share, E = 5 points, p = 0.5Cost against 95 percent
80 percent1.28216543 percent of the 95 percent sample
90 percent1.64527170 percent
95 percent1.960385baseline
99 percent2.5766641.7 times

Moving from 95 to 99 percent confidence is expensive: z squared goes from 3.84 to 6.64, and the sample grows by three quarters for four extra points of confidence. Moving down to 90 percent saves about 30 percent of the interviews and costs five points of confidence, which is why the Census Bureau publishes American Community Survey margins of error at 90 percent rather than 95.

The NIST handbook works its own version of this table for a proportion. A manager wanting 90 percent confidence on a defect rate within 4 percent takes z = 1.645, e = 0.04 and p = 0.5, which gives n = 423 by the formula above, and the handbook then adds the finite population correction on top.

Halving the error takes four times the sample

Because E sits in the denominator squared, the error falls as the square root of the sample size. Double the sample and the error shrinks by a factor of the square root of 2, about 1.41. Halve the error and the sample has to grow fourfold. That relationship is the single most useful fact in survey planning, because it tells you what precision costs before anyone starts calling respondents.

Margin of errorn at 95 percent, p = 0.5Multiple of the 5 point sample
10 points970.25
5 points3851.00
2.5 points1,5374.00
2 points2,4016.25
1 point9,60425.00

The same square root shape governs a mean: with a standard deviation of 15 points and a 95 percent confidence level, a margin of error of 2 points needs n = (z × sigma / E)^2 = (1.960 × 15 / 2)^2 = 216.09, so 217 responses. Halving that margin to 1 point needs four times as many, 865, and no amount of clever wording changes that curve.

Small populations and the finite population correction

When the population is small, sampling a large share of it means you have already seen most of it, and the formula overstates what you need. The correction is n_adj = n / (1 + (n - 1) / N), where N is the population size. The effect is negligible when N is much larger than n and grows as the sample approaches the population. The NIST handbook flags the same threshold, noting that once the sample exceeds roughly a quarter of the population the correction has a substantial effect.

Population NCorrected n from 385 uncorrectedShare of the population sampled
20013266 percent
50021844 percent
1,00027828 percent
2,00032316 percent
5,0003577 percent
50,0003820.8 percent

Worked example: 385 is the uncorrected figure for 95 percent and 5 points. Take a survey of a company with 1,000 employees. The corrected figure is 384.16 / (1 + 383.16 / 1,000) = 277.74, so 278 completed responses are enough, 107 fewer than the uncorrected number. Interviewing all 1,000 would beat any correction, of course, and if the budget allows, a census leaves no sampling error at all.

z or t, and where the two differ

The z value assumes you know the population standard deviation. When you are estimating a mean and the standard deviation has to come from the sample itself, the right multiplier is a t value with n - 1 degrees of freedom, and the t value is always larger than z because it has to cover the uncertainty in the estimate of sigma. The NIST Technical Note 1297 table of t factors shows the gap shrinking as the sample grows.

Degrees of freedom (n - 1)t for 95 percentz for 95 percentSample needed for a mean, sigma = 15, E = 2
92.2621.960288
192.0931.960247
292.0451.960236
492.0101.960228
1001.9841.960222
infinite1.9601.960217

So the gap between the two approaches is largest when the sample is small: with 10 observations, the t-based sample of 288 is a third larger than the z-based 217. Past about 30 to 40 observations the two lines merge, which is why many practitioners use z as a shortcut for larger samples and reserve t for small ones. Two further cautions sit alongside this choice. A margin of error assumes simple random sampling, and any clustering, stratification or weighting changes it. And a proportion near 0 or 1 breaks the normal approximation the z formula rests on, which is one reason NCHS prefers the Clopper-Pearson interval with a minimum denominator sample size of 30 for proportion estimates in its complex survey work.

Turning the number into a fieldwork plan

The formula gives you completed interviews. What you send out has to be larger, because some people decline, some do not answer, and some are unreachable. The usual adjustment divides the required sample by the expected response rate: if you expect 30 percent nonresponse, you divide by 0.70. For 385 completed responses, that is 385 / 0.7 = 550 questionnaires sent, and rounding up gives exactly 550 in this case.

Required completed responsesExpected nonresponseDivide byQuestionnaires to send
3850 percent1.00385
38510 percent0.90428
38530 percent0.70550
38550 percent0.50770
27830 percent0.70398

Response rate assumptions are the softest number in the whole exercise, and they should be tied to something you have measured rather than to a guess. Fieldwork also has a floor: the CDC and NCHS practice of suppressing estimates built on fewer than 30 observations is a reminder that a sample that small supports no published estimate at all, whatever the arithmetic says.

Putting the pieces together for a concrete case: a student wants 95 percent confidence and a 5 point margin of error on the share of 2,000 students who use the campus shuttle. The uncorrected sample is 385, the population correction trims it to 323, and with an assumed 30 percent nonresponse the student sends out 323 / 0.7 = 461.43, so 462 questionnaires, hoping for 323 replies.

Frequently asked questions

How many people do I need for a 95 percent survey with a 5 point margin of error?

385 responses, assuming you do not have a prior guess at the share. The formula gives 384.16 and you round up. With a 30 percent nonresponse rate, send out 550 questionnaires to land on 385 replies.

What is the sample size for a 99 percent confidence level?

664 at a 5 point margin of error and p = 0.5. The z value of 2.576 enters the formula squared, so 6.6358 × 0.25 ÷ 0.0025 = 663.58, which rounds up to 664.

What about 90 percent confidence?

271 responses at a 5 point margin with p = 0.5, using z = 1.645. That is about 70 percent of the 385 needed for 95 percent confidence, which is why the U.S. Census Bureau publishes American Community Survey margins of error at the 90 percent level.

Why do you say to use p = 0.5?

Because p × (1 - p) is largest at 0.5, where it equals 0.25, and the sample size grows with it. The NIST/SEMATECH e-Handbook notes that p = 0.5 gives the largest sample size and the most information, at the highest cost.

How much does the margin of error matter?

Enormously, because it is squared in the denominator. A 10 point margin needs 97 responses, a 5 point margin needs 385, a 2.5 point margin needs 1,537 and a 1 point margin needs 9,604, all at 95 percent confidence with p = 0.5.

What does the finite population correction do?

It reduces the sample when the population is small, because a large share of the group gets surveyed. For a population of 1,000, 384.16 uncorrected becomes 277.74, so 278 responses, a saving of 107.

How do I allow for people who do not respond?

Divide the required completed responses by the expected response rate. At 30 percent nonresponse, 385 ÷ 0.70 = 550 questionnaires. A 50 percent nonresponse rate doubles the fielding to 770.

Should I use z or t?

Use z when the population standard deviation is known, and t when it is estimated from a small sample. At 95 percent, t is 2.262 with 9 degrees of freedom and 1.984 with 100, against z of 1.960.

How do I work out the sample size for a mean rather than a share?

Use n = (z × sigma / E)^2. With sigma of 15 points, E of 2 points and z of 1.960, that is (29.4 / 2)^2 = 216.09, so 217 responses.

Does the population size matter much for a big survey?

Barely at all. For a population of 50,000 the correction changes 385 to 382, a difference of 3 responses. It matters when N is within about four times the sample size, or when you would be surveying more than a quarter of the group.

What does a 5 point margin of error mean exactly?

It is the half-width of the interval around your estimate. If the survey finds 42 percent support, a 5 point margin lets you report 37 to 47 percent, and with random sampling the true value lands inside that band 95 times out of 100.

Can I run a census instead?

Yes, if the group is small and the cost allows. Surveying everyone leaves no sampling error, which beats any confidence level or margin of error you could buy with a sample.

Is 384 or 385 the right answer?

385. The calculation gives 384.16 and you round up, because 384 completed interviews produce an error slightly wider than the 5 points you promised.

Spotted a wrong number or a broken result?

More Everyday tools

See all Everyday tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.