math

Sample Size Calculator

Determine the sample size needed for a statistically valid survey.

retro matrix layoutHOLA-SERIES // ANALYZER
LCD OUTPUT STATUS // DEG MATH
Required Sample Size385
Z-Score:1.96
Population:Infinite

Recent Calculations

No calculations yet — results will appear here automatically.

About the Sample Size Calculator

A sample size calculator tells you how many responses a survey needs to achieve a chosen margin of error at a chosen confidence level. It is the calculation that decides whether a study can support conclusions, and it is best done before collecting any data rather than after.

The formula

n = z² · p(1 − p) / e²

z is the critical value for your confidence level — 1.96 at 95 percent. p is the expected proportion, and e is the margin of error as a decimal. A finite population correction reduces n when the population is small.

How to use this calculator

  1. 1Enter your Confidence Level (90=90%, 95=95%, 99=99%). The field starts at 95, which you can overwrite.
  2. 2Enter your Margin of Error (%). The field starts at 5, which you can overwrite.
  3. 3Enter your Population Size (0=infinite). The field starts at 0, which you can overwrite.
  4. 4Enter your Expected Proportion (%). The field starts at 50, which you can overwrite.
  5. 5Read the result straight away — it recalculates as you type, so there is no button to press. Use Share to copy a link that reopens the page with your exact numbers filled in.

Worked example

Example inputs and the resulting output for the Sample Size Calculator
InputValue
Confidence Level (90=90%, 95=95%, 99=99%)95
Margin of Error (%)5
Population Size (0=infinite)0
Expected Proportion (%)50

Result

Required Sample Size: 385

Z-Score: 1.96

Population: Infinite

Those are the values the page loads with, so you can reproduce this result yourself and then change one field at a time to see what drives the outcome.

Understanding your result

Precision is expensive because the requirement grows with the square of the margin of error. Halving the margin from 5 to 2.5 percentage points quadruples the sample needed. This is why national polls settle around 1,000 respondents: it delivers roughly a 3 percent margin, and pushing to 1 percent would demand nearly 10,000.

The result depends far less on population size than most people expect. Above roughly 20,000 people, the population barely affects the sample needed — 1,000 respondents give about the same precision for a city of 100,000 as for a country of 300 million. Representativeness, not raw size, is what determines whether a sample is trustworthy.

Things worth knowing

  • Use p = 0.5 when you have no prior estimate. It maximises required sample size, so the result is conservative.
  • Oversample to allow for non-response. A 30 percent response rate means inviting three times your target.
  • Margin of error applies to the whole sample. Analysing subgroups needs enough responses within each subgroup.
  • A large sample cannot fix a biased sampling method. Non-random selection produces confidently wrong answers.
  • For comparing two groups rather than estimating one proportion, use a power calculation instead.

Frequently asked questions

How many people do I need to survey?+

For a 95 percent confidence level and a 5 percent margin of error, about 385 responses regardless of population size above roughly 20,000. Tighter margins require substantially more.

What does margin of error mean?+

The range within which the true population value likely falls. A result of 60 percent with a 5 percent margin means the true figure is probably between 55 and 65 percent.

Does population size matter?+

Only for small populations. Below a few thousand, the finite population correction meaningfully reduces the sample needed. Above about 20,000 the effect is negligible.

What confidence level should I use?+

95 percent is the convention in most research. 90 percent needs a smaller sample but accepts more uncertainty; 99 percent needs a much larger one and is reserved for high-stakes decisions.

Related math calculators