The Sample Size Calculator estimates how many survey responses you need for a chosen confidence level and margin of error, with an optional finite population correction when the population is small. Enter confidence level, margin of error and an assumed proportion (default 50%); the calculator returns n and can reverse the math to show the margin a given n achieves.
Sample size plans precision for a proportion. It does not repair a biased sampling frame or fix nonresponse. Those limits sit in their own section below.
Calculate the sample size for a survey
Classic survey planning asks three questions: how confident (for example 95%), how precise (for example ±5 percentage points), and what proportion you expect (or 50% if unknown). From those inputs the calculator returns the required n before fielding the survey.
Write the confidence level and margin in the analysis plan before fielding. Changing them after seeing an inconvenient result is the survey analogue of moving alpha after seeing p. If budget caps n below the calculated figure, report the wider margin that budget actually buys.
Outputs round up to the next whole person. A fractional 384.16 becomes 385. You cannot interview 0.16 of a respondent.
Apply the sample size formula
For a proportion with a very large population, n equals z squared times p-hat times one minus p-hat, all divided by E squared. Here z is the two-sided critical value for the confidence level, E is the margin of error as a proportion, and p-hat is the planning proportion.
For a mean with planning standard deviation sigma, n equals the square of z times sigma over E.
n = z² × p̂(1 − p̂) / E²
z is the two-sided critical value for the confidence level (1.960 at 95%). E is the margin of error as a proportion (5% → 0.05). p̂ is the planning proportion.
For a mean with known planning SD σ:
n = (z × σ / E)²
Most political and customer surveys use the proportion form.
Understand why the default proportion is 50 percent
The product p(1−p) peaks at p = 0.5, where it equals 0.25. Any other planning proportion yields a smaller product and thus a smaller n. Using 50% when the true proportion is unknown is the conservative choice: you plan for the hardest case.
When a pilot shows the proportion near 20 percent or 80 percent, substituting that value can cut required n because p times one minus p falls from 0.25 toward 0.16. Document the pilot source. An optimistic planning p that turns out wrong leaves the finished survey less precise than promised.
If prior studies show the proportion near 10% or 90%, substituting that value reduces required n. Only do that when the prior is solid; an optimistic p that turns out wrong leaves the study under-precise.
Apply the finite population correction
When population size N is not huge relative to the uncorrected n, adjust with n-adj equals n divided by one plus n minus 1 over N. Sampling hundreds of people from a city of millions needs no correction in practice. Sampling from a firm of one thousand employees does, because each response removes a meaningful share of the remaining population.
n_adj = n / (1 + (n − 1) / N)
Sampling 385 people from a city of 5 million needs no correction in practice. Sampling from a firm of 1,000 employees does. The calculator applies the correction when you enter N.
Calculate the sample size for a 5 percent margin at 95 percent
Planning values are confidence 95 percent with z of 1.96, margin E of 0.05, and p-hat of 0.5. Squaring 1.96 gives 3.8416; times 0.25 gives 0.9604; divided by 0.0025 gives 384.16, which rounds up to 385. With finite population N of 1000 the adjusted n falls to about 278.
1. z² = 1.96² = 3.8416. 2. p(1−p) = 0.25. 3. Numerator = 3.8416 × 0.25 = 0.9604. 4. n = 0.9604 / 0.0025 = 384.16 → 385.
With finite population N = 1,000:
n_adj = 385 / (1 + (385 − 1)/1000) = 385 / 1.384 ≈ 278.
Same precision targets, much smaller draw, because each response removes a larger fraction of the remaining population.
Find the margin of error from a sample size
Reverse the proportion formula to E equals z times the square root of p-hat times one minus p-hat over n. With n of 385, z of 1.96 and p-hat of 0.5, E returns about 0.050, which checks the forward calculation.
Use reverse mode when a panel vendor quotes a fixed completes count and the precision that count buys is the unknown.
E = z × √(p̂(1 − p̂) / n)
With n = 385, z = 1.96, p̂ = 0.5: E = 1.96 × √(0.25/385) ≈ 1.96 × 0.0255 ≈ 0.050. That checks the forward calculation. Use the reverse mode when a panel vendor quotes a fixed completes count and you need the precision that count buys.
Read the sensitivity table
Required n grows steeply as the margin shrinks. At 95 percent with p of 0.5, about 97 completes buy plus or minus 10 percent, 385 buy plus or minus 5 percent, 1068 buy plus or minus 3 percent and 9604 buy plus or minus 1 percent.
Halving the margin roughly quadruples n, which is why chasing plus or minus 1 percent is expensive. |---|---| | ±10% | 97 | | ±5% | 385 | | ±3% | 1,068 | | ±2% | 2,401 | | ±1% | 9,604 |
Halving the margin roughly quadruples n. Moving from ±5% to ±3% more than doubles the sample. Diminishing returns set in fast; decide whether the extra precision is worth the field cost before chasing ±1%.
Understand what sample size does not fix
Large n shrinks random sampling error. It does not fix nonresponse bias when refusers differ from responders, a sampling frame that never included the people you care about, self-selection in open web polls, or leading questions that distort answers. A thousand biased responses remain biased; representativeness is a design problem while sample size is a precision problem.
- Nonresponse bias when refusers differ from responders
- A bad sampling frame that never included the people you care about
- Self-selection in open web polls
- Leading questions and other measurement error
A thousand biased responses remain biased. Representativeness is a design problem; sample size is a precision problem. Solve design first, then size the sample.
Planning checklists before fielding
Confirm the population definition, the sampling frame and the mode of contact before locking n. A perfect sample-size formula on a bad frame still estimates the wrong group. If the design is clustered or stratified, simple random-sample formulas understate the n required; design effects need their own adjustment beyond this calculator's basic correction.
For means rather than proportions, a realistic planning standard deviation is as important as E. Using an unrealistically small sigma produces an optimistic n and a disappointing interval later.
Frequently asked questions
How is survey sample size calculated?
For a proportion: n = z² × p(1−p) / E², then round up. Apply the finite population correction when N is modest relative to n.
Why is 50% the default proportion?
Because p(1−p) is largest at 0.5, producing the maximum n. That is the safe planning value when the proportion is unknown.
What confidence level should I use?
95% is the common default. Use 99% when the cost of being wrong is high and you can afford a larger sample; use 90% when rough precision is enough.
Does a larger population always need a larger sample?
No. Once N is large, n levels off near the infinite-population figure. Only relatively small populations shrink n via the finite correction.
Can I calculate sample size for a mean?
Yes, if you have a planning standard deviation σ and a margin E in the same units: n = (z × σ / E)².
What is margin of error?
The largest expected difference between the sample estimate and the population value at the stated confidence level, for the sampling error component only.
Will 385 responses guarantee a good survey?
It targets about ±5% at 95% under simple random sampling with p near 0.5. It does not guarantee unbiased measurement or a representative frame.
Where does z = 1.96 come from?
It is the two-sided 95% critical value from the standard normal distribution, the same constant used in the Confidence Interval Calculator.
Summary
The Sample Size Calculator returns the survey n for a chosen confidence level and margin of error, defaults p to 50% for a conservative plan, and applies a finite population correction when N is entered. At 95% and ±5% with p = 0.5, n = 385; with N = 1,000 that falls to about 278.
Reverse mode shows the margin a given n achieves. Sample size controls precision, not bias: fix the frame and the questionnaire before treating a large n as a cure-all.