Sample Size Calculator

Estimate required sample size for a proportion survey with confidence, margin of error, and optional population size.

Sample Size Calculator

Formula

n0 = (z^2 * p * (1 - p)) / moe^2; if population > 0 apply finite correction; then ceil

z is 1.96 for 95 percent confidence, 2.576 for 99 percent, otherwise 1.645. p is expected proportion. moe is margin of error as a decimal. Finite populations shrink n with the usual correction formula.

This sample size calculator estimates how many responses you need for a proportion style survey. Enter confidence level, margin of error, expected proportion, and optionally a finite population. The tool returns a ceiling integer sample size.

Researchers, marketers, and student projects use it before launching a poll so the planned margin of error is realistic. It is a planning formula, not a substitute for a full study design review.

How the formula works

First compute n0 = (z squared times p times (1 – p)) divided by moe squared. If population is greater than zero, apply the finite population correction n = n0 / (1 + (n0 – 1) / population). Finally round up with ceil.

z depends on confidence: 95 percent maps to 1.96, 99 percent to 2.576, and other supported levels use 1.645. Margin and proportion are entered as percents and converted to decimals inside the math.

Worked example

Confidence 95, margin of error 5 percent, expected proportion 50 percent, population 0 (unlimited). n0 = (1.96^2 * 0.5 * 0.5) / 0.05^2 = 384.16, which ceils to 385.

InputValue
Confidence95%
Margin of error5%
Proportion50%
Population0
Sample size385

How to choose inputs

  • Tighter margins need larger samples. Moving from 5 percent to 3 percent grows n quickly.
  • Use 50 percent proportion when unsure. Known proportions away from 50 percent can reduce required n.
  • Enter population for small schools, member lists, or closed customer bases.
  • Leave population at 0 for large markets or open web audiences.

Finite population correction

When the population is small, each response covers more of the group, so you need fewer people than the unlimited formula suggests. The correction never raises n above the unlimited result.

Assumptions and limits

The model assumes random sampling, a simple proportion, and that nonresponse is handled outside the formula. Cluster samples, stratified designs, and design effects need adjusted n. Response rate planning is separate: if half of invites reply, you must invite about twice the target completes.

Common mistakes

  • Treating margin of error as a percent of the mean instead of absolute percentage points on a proportion
  • Forgetting to ceil and reporting a fractional sample
  • Using 99 percent confidence without budgeting for the larger n
  • Ignoring nonresponse when scheduling fieldwork

Next step after data arrives

After you collect responses, report precision with interval estimates rather than sample size alone. This planner only answers how large to aim before you start.

Margin of error in plain language

A 5 percent margin on a proportion means your estimate aims to sit within five percentage points of the true share at the chosen confidence, under the usual random sample assumptions. Cutting the margin from 5 to 3 percent is not a small tweak. Because moe is squared in the denominator, required n rises quickly.

Confidence is separate from margin. Higher confidence widens the critical z and also grows n. Pick confidence for how sure you need to be, then pick margin for how precise the percent must be for decisions.

Fieldwork and response rates

Sample size is completes, not invites. If you expect a 25 percent response rate, you may need about four times as many invitations as the calculator reports. Soft audiences, email filters, and survey fatigue all change response. Build a buffer before you lock a fieldwork budget.

Panel providers sometimes quote completes directly. In that case you can treat the calculator output as the completes target and buy to that number.

When 50 percent proportion is wrong

If prior studies show a share near 10 percent or 90 percent, p(1-p) is smaller than at 50 percent, so required n drops. Using 50 percent then oversamples, which is safe but costly. Using an optimistic proportion that is wrong undersamples. When the share is truly unknown and the decision is important, stay conservative at 50 percent.

Finite populations in practice

A company with 800 employees surveying engagement should enter 800. A national consumer brand usually leaves population at 0. The correction matters most when n0 is not tiny relative to the population. For huge populations the unlimited formula is enough.

  • Employee or member censuses: enter population.
  • Citywide open polls with huge reachable adults: population 0 is fine.
  • Classroom projects with 40 students: enter 40 and expect a smaller n after correction.

After you collect data, report uncertainty with intervals rather than only stating n. Sample size planning and interval reporting are two different steps in the same quality chain.

Reporting the plan in a methods note

Write down confidence, margin, proportion assumption, population choice, and the resulting n before fieldwork starts. When stakeholders later ask why you surveyed a certain number of people, that note answers without rewriting history. If budget forces a smaller n, record the wider margin you accepted so readers do not assume 5 percent precision you no longer have.

Pilot surveys can refine the proportion assumption. A small pilot that finds a share far from 50 percent can justify a recalculated n for the main study, as long as the pilot sample is not biased toward unusual respondents.

For related unit and percent checks while you plan materials, try the unit converter or the percentage calculator.

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.