Sample Size Calculator

Estimate survey sample size for a proportion with optional finite population correction.

Sample Size Calculator

Formula

n0=(z^2*p*(1-p))/moe^2; finite correction; ceil

z depends on confidence. Population 0 skips finite correction.

This sample size calculator estimates how many survey completes you need for a proportion question. Set confidence, margin of error, and expected proportion. Optionally enter a finite population.

sample size calculator

Defaults: unlimited population, 95% confidence, 5% margin, 50% expected proportion. That setup rounds up to 385 completes for a very large population.

Formula

n0 = (z^2 * p * (1 – p)) / moe^2. z is 1.96 at 95%, 2.576 at 99%, otherwise 1.645. If population N > 0, n = n0 / (1 + (n0 – 1)/N). Then ceil.

Worked example

95% confidence, 5% margin, 50% proportion, population 0: n0 = 384.16, ceil = 385. With N = 1000 the finite correction yields about 278.

After you collect data, estimate precision with the confidence interval calculator or standardize a value with the z-score calculator.

How each input changes the sample size

  • Margin of error: n scales with 1 ÷ margin². Halving the margin from 5% to 2.5% roughly quadruples the sample (385 to 1,537 at 95%).
  • Confidence level: the sample size calculator uses z = 1.96 for 95%, 2.576 for 99% and 1.645 for other levels such as 90%. At a 5% margin, 99% confidence needs 664 responses, against 385 at 95%.
  • Expected proportion: p(1 − p) peaks at p = 0.5. If a previous survey found 20%, then p(1 − p) = 0.16 instead of 0.25 and you need 36% fewer responses. If you are unsure, keep 50%.
  • Population: the finite population correction only matters when the sample is a noticeable share of the group.

Sample size calculator worked example: 3% margin, 5,000 employees

An HR team wants a 90% confidence level, a ±3% margin and p = 0.5 for a staff survey of 5,000 people.

  1. n₀ = 1.645² × 0.5 × 0.5 ÷ 0.03² = 2.706 × 0.25 ÷ 0.0009 ≈ 751.7.
  2. Finite correction: n = 751.7 ÷ (1 + 750.7 ÷ 5,000) = 751.7 ÷ 1.1501 ≈ 653.6.
  3. Round up: 654 completed responses.

At 95% confidence the same survey needs n₀ ≈ 1,067.1, which corrects to 880. The extra confidence costs about 226 more responses.

Convert completes into invitations

The sample size calculator gives completed responses. Divide by your expected response rate to get the number to invite. If past staff surveys got 40%, invite 654 ÷ 0.40 ≈ 1,635 people. A low response rate also raises the risk of non-response bias, which no sample size can fix. People who answer may differ from those who don’t.

Estimating a share vs detecting a change

This sample size calculator sizes a survey to estimate one proportion. Detecting a difference, such as an A/B test or a change in a defect rate, also needs statistical power. The NIST/SEMATECH e-Handbook of Statistical Methods gives that formula. It adds a z-value for power and the size of the change you want to detect. In NIST’s example, detecting a rise from 10% to 20% defective with a one-sided 5% test and 90% power needs about 102 items, or 112 with a continuity correction. Use a dedicated power calculation for designs like that.

After the data comes in

Report the margin you actually achieved, which depends on the observed proportion and the final count. Use the confidence interval calculator for that. Subgroups have their own, larger margins. If 654 responses split into four equal departments, each one has only about 164 responses and much wider error bars. Size for the smallest subgroup you plan to report on separately.

Sample size calculator quick reference at 95% confidence, p = 0.5

For a very large population: a 10% margin needs 97 completes, 5% needs 385, 4% needs 601, 3% needs 1,068 and 2% needs 2,401. Each step toward a tighter margin costs far more responses than the last, which is why ±3% to ±5% is common for opinion polls.

Last reviewed: October 2026

Related calculators

Frequently Asked Questions

What z values does the tool use?

Confidence 95 uses z = 1.96. Confidence 99 uses z = 2.576. Other levels in range use z = 1.645.

What is the classic 95 percent example?

Confidence 95, margin 5 percent, proportion 50 percent, population 0 rounds up to sample size 385.

Why start at 50 percent proportion?

p = 0.5 maximizes p(1-p), so it is a conservative default when you do not know the true share.

When should I enter a population?

Enter population when the group is finite and not huge relative to n. Use 0 when the pool is effectively unlimited.

Is this for means or proportions?

This page uses the proportion (binary) sample size model, not a mean with known SD model.

Does ceil always round up?

Yes. Partial people are rounded up so the reported n meets the target precision.

Can I plan A/B tests here?

Only as a rough proportion screen. Powered A/B designs need effect size and power inputs this form does not include.

How does this relate to a confidence interval?

Sample size planning sets n before data. After you collect data, use a confidence interval calculator to report precision around an estimate.

What sample size do I need for a 5% margin of error at 95% confidence?

385 completed responses for a large population, with p = 0.5. For a population of 1,000, the finite correction reduces it to about 278.

How does population size affect sample size?

Only a little once the population is large. The finite population correction matters mainly when the sample would be a sizeable share of the group.

Why use 50% as the expected proportion?

Because p(1 − p) is largest at 0.5, it gives the most conservative sample size when you don't know the true share.

How many people should I invite to a survey?

Divide the required completes by your expected response rate. For example, 654 completes at a 40% response rate means about 1,635 invitations.