Sample Size Calculator

The result is the number of responses needed to estimate a proportion within the chosen margin. A 5% margin at 95% confidence with an unknown proportion needs about 385 responses, the figure behind many polls. Halving the margin of error quadruples the sample size, so precision gets expensive.

Add extra for the expected nonresponse rate and for subgroups you want to analyze separately.

Sample Size Calculator: inputs

Calculated result
Required sample size385
Z-value used2

Sample Size Calculator: Desired margin of error sensitivity

Sample Size Calculator: Desired margin of error and Required sample size5 calculations vary the “Desired margin of error” input while holding the other entered inputs constant.3.0%1,0684.0%6015.0%3856.0%2677.0%196

Sample Size: formula

n = (z² × p × (1−p)) ÷ marginOfError²

NIST/SEMATECH e-Handbook of Statistical Methods

The calculation assumes a random sample and ignores bias from who responds. If the population is small, a correction reduces the needed sample. Surveys of means rather than proportions need a different formula.

Statistical power for comparing groups requires another calculation.

Sample Size: worked example

Desired margin of error5.0%
Confidence level95%
Estimated population proportion50.0%
Required sample size385
Z-value used2

Enter the desired margin of error as a percentage, the z value for your confidence level, 1.96 for 95%, and the expected proportion, which is 50% when you have no idea, since that gives the largest sample. Use this for surveys where you are estimating a percentage. A smaller margin of error or higher confidence increases the required sample.

The population size matters only when the sample is a large share of it.

Sample Size: changing Desired margin of error

Desired margin of errorRequired sample sizeZ-value used
3.0%1,0682
4.0%6012
5.0% (example)3852
6.0%2672
7.0%1962

Sample Size: compare input ranges

InputTested fromToRequired sample size: low inputRequired sample size: high inputSwing
Confidence level90%99%271664393 (102%)
Desired margin of error4.0%6.0%601267334 (87%)
Estimated population proportion48.0%52.0%3843840

Sample Size: individual input comparisons

InputValueRequired sample sizeZ-value used
Desired margin of error3.0%1,0682
4.0%6012
5.0%3852
6.0%2672
7.0%1962
Confidence level90%2711.6
95%3852
99%6642.6
Estimated population proportion46.0%3822
48.0%3842
50.0%3852
52.0%3842
54.0%3822

Sample Size: combined input changes

Desired margin of error / Estimated population proportion46.0%50.0%54.0%
3.0%1,0611,0681,061
4.0%597601597
5.0%382385382
6.0%266267266
7.0%195196195

Sample Size: which assumptions move the result?

Sample Size: Required sample size as Confidence level changesRequired sample size starts at 271. Moving Confidence level from 90% to 99% changes it to 664, with Desired margin of error 5.0%; Estimated population proportion 50.0% kept fixed.90%27195%38599%664
Chart quantityDisplayed settings
Confidence level90% → 99%
Required sample size271 → 664
Desired margin of error5.0%
Estimated population proportion50.0%
Sample Size: Required sample size as Desired margin of error changesRequired sample size starts at 1,068. Moving Desired margin of error from 3.0% to 7.0% changes it to 196, with Confidence level 95%; Estimated population proportion 50.0% kept fixed.3.0%1,0684.0%6015.0%3856.0%2677.0%196
Chart quantityDisplayed settings
Desired margin of error3.0% → 7.0%
Required sample size1,068 → 196
Confidence level95%
Estimated population proportion50.0%

Sample Size: values and definitions

Quantity and definitionValue used
Desired margin of error5.0%
Confidence level — How confident the result should be.95%
Estimated population proportion50.0%
Required sample size385
Z-value used2

Common error: Assuming sample size scales in a straight line with precision. Wanting a margin of error half as wide isn't a modest ask; it's close to a fourfold increase in the respondents needed.

Statistics & Probability calculators: Binomial Probability Calculator, Normal Distribution Probability Calculator, P-Value from Z-Score Calculator, Expected Value Calculator, Bayes' Theorem Calculator, Mean & Median Calculator.

Cutting a margin of error in half doesn't double the sample size needed: it roughly quadruples it, because required sample size scales with the square of how tight the margin needs to be. A survey aiming for a very precise result can need dramatically more respondents than one accepting a looser estimate, out of proportion to how much tighter the target is.

Check the relationship between your target margin and the resulting sample size before committing to a survey budget: small precision gains get expensive fast.

See the interval that results on the confidence interval calculator, the normal distribution on the z-score and normal probability pages, and testing on the p-value calculator. The binomial probability page covers success counts, and the percentage calculator helps with reporting.

What does the 385 count assume?

It uses 1.96² × 0.5×0.5 / 0.05² = 384.16, rounded up, under a simple-random-sample normal approximation for a proportion.

Does 50% guarantee the requested coverage for every survey?

No. It maximizes p(1−p) in this formula, but sampling design, nonresponse and approximation accuracy still affect actual uncertainty.

Does halving the margin double the required sample?

No. The squared denominator makes it approximately four times as large before rounding, with other assumptions fixed.

Why does the sample size stop growing with the population?

Because the precision of a random sample depends mainly on its size, not on the population size, unless the sample is a large fraction of it.

What proportion should I use if I do not know it?

In the simple random-sample proportion formula, p(1−p) is largest at p = 0.5, so that assumption gives the largest calculated sample at a fixed confidence level and margin. Nonresponse, sampling design, bias and a misspecified population can still invalidate the intended precision.

How do I reduce the margin of error?

Increase the sample size. Cutting the margin of error in half requires four times as many responses, so precision gets expensive quickly.