CalcPro

Sample Size Calculator

Required survey sample size for a confidence level and margin of error.

The basics

Before launching a survey, you need to know how many people to ask. Too few responses and your data is noise; too many and you're wasting resources. The sample size calculator uses your confidence level, acceptable margin of error, and expected response pattern to determine the minimum number of respondents required.

How it works

The calculator combines three key inputs to find your sample size. Your confidence level sets how certain you want to be (95% is standard in most research). Your margin of error defines the acceptable range around your results—a 5% margin means if 60% say "yes," the true figure is probably between 55% and 65%. The response proportion is your educated guess about how the population will answer (50% is safest if you're unsure). For small populations, you also enter population size; for national surveys or large markets, you leave it unlimited.

These values feed into a statistical formula that accounts for the variability in your data and the precision you need.

The formula

n = (z² × p × (1 − p)) / e² (for unlimited populations)

Where:

  • z = critical value for your confidence level (1.645 for 90%, 1.96 for 95%, 2.576 for 99%)
  • p = expected response proportion (as a decimal: 0.5 for 50%)
  • e = margin of error (as a decimal: 0.05 for 5%)
  • n = required sample size

For finite populations, a finite population correction is applied to reduce n slightly.

Worked example

Imagine you're a coffee brand planning to survey customers about a new product. You want 95% confidence and a 3% margin of error. You don't have prior data, so you assume a 50% split in opinion.

Inputs:

  • Confidence level: 95%
  • Margin of error: 3%
  • Response proportion: 50%
  • Population size: 0 (unlimited)

Calculation:

  • z = 1.96 (for 95% confidence)
  • p = 0.5
  • e = 0.03
  • n = (1.96² × 0.5 × 0.5) / 0.03²
  • n = (3.8416 × 0.25) / 0.0009
  • n = 0.9604 / 0.0009
  • n ≈ 1,068 respondents

So you'd need about 1,068 completed surveys. If you relax the margin of error to 5%:

  • n = (3.8416 × 0.25) / 0.05²
  • n = 0.9604 / 0.0025
  • n ≈ 385 respondents

Notice how tightening the margin of error from 5% to 3% nearly tripled the sample size.

Things to watch

Response rate matters in practice. The calculator tells you how many completed responses you need. If your survey has a 40% response rate, you'll need to contact roughly 2.5× the calculated sample. Plan your outreach accordingly.

Confidence level and margin of error trade off. Moving from 95% to 99% confidence increases your sample size significantly. Similarly, cutting margin of error from 5% to 3% is expensive in sample terms. Understand your actual business tolerance before choosing.

Use 50% if uncertain. If you have no pilot data on response proportions, defaulting to 50% is statistically prudent—it maximizes sample size, so you won't undersample. Once you have real preliminary results, recalculate for a more efficient design.

This is an estimate based on statistical theory, not a substitute for research methodology advice.

Frequently asked questions

What's the difference between confidence level and margin of error?

Confidence level (90%, 95%, 99%) tells you how sure you are that your results reflect the true population. Margin of error is the range above and below your result—a ±5% margin means your true value is probably within 5 percentage points of what you found.

Why does sample size matter?

A larger sample is more likely to accurately represent your population. Too small a sample and your results become unreliable; too large and you waste time and money. The calculator finds the sweet spot.

What should I use for response proportion if I don't know it?

Use 50%. This is the most conservative estimate—it gives you the largest sample size needed. Once you have preliminary data, you can recalculate with a more precise proportion.

When do I enter population size?

Leave it at 0 (unlimited) for most surveys of large populations. Only enter a specific number if you're surveying a small, closed group—like employees at a 200-person company.

Can I use this for online polls or product feedback?

Yes. Any survey where you're collecting yes/no or categorical responses benefits from proper sample sizing. The calculator works for customer satisfaction, political polls, market research, and more.

What if my calculated sample is too large to reach?

You have options: accept a slightly larger margin of error (5% instead of 3%), lower your confidence level to 90%, or increase your expected response proportion if you have reason to believe it won't be 50%.