Sample Size Calculator

Find out exactly how many responses your survey or study needs. Set your confidence level and margin of error, add your population size if you know it, and get the minimum sample size — calculated with Cochran’s formula and the finite population correction, with every step shown.

Textbook-accurate · Reviewed July 2026 · Uses Cochran’s formula and the finite population correction

Set Your Parameters

Confidence level

How sure you want to be that your results reflect the true population. 95% is the research standard.

Margin of error

As a percent (e.g. 5 for ±5%).

Proportion (p)

Expected % (use 50 if unsure).

Population size (N)optional

If your total population is known and not too large, the finite population correction trims the required sample. Leave blank for large or unknown populations.

Required Sample Size

You Need
Enter your parameters to see the result
Z critical
Before FPC
Margin
Confidence

How Sample Size Changes

Required n at different margins of error (your confidence level)

Margin±1%±2%±3%±5%±10%
Sample

What Is Sample Size?

Sample size is the number of people or items you need to include in a survey or study to draw reliable conclusions about a much larger group. You almost never have the time or budget to survey everyone, so instead you survey a representative sample and use it to estimate what the whole population thinks or does. The catch is that a sample only gives a reliable answer if it’s big enough — too small, and your results are just noise; unnecessarily large, and you’ve wasted time and money. A sample size calculator tells you the sweet spot: the minimum number of responses that delivers the precision you need.

Here’s the counterintuitive part that surprises almost everyone: the required sample size depends far more on your desired precision than on how big your population is. Whether you’re studying a city of 50,000 or a country of 50 million, a standard survey needs roughly the same number of responses — around 385 for the common 95% confidence, ±5% setup. Once a population is large enough, adding more people barely changes the math.

The Three Ingredients of Sample Size

Every sample size calculation balances three decisions. Understanding them is the key to choosing sensible inputs above.

Confidence level

The confidence level is how sure you want to be that your sample reflects the true population — usually 90%, 95%, or 99%. A 95% confidence level means that if you repeated the survey many times, about 95% of the resulting intervals would capture the true value. Higher confidence demands a larger sample, because certainty isn’t free.

Margin of error

The margin of error is how much sampling error you’re willing to tolerate — the “plus or minus” around your result. A ±5% margin means a survey result of 60% really means somewhere between 55% and 65%. Tighter margins (±2% or ±3%) give more precise answers but require dramatically bigger samples. Most surveys land between ±3% and ±5%.

Population variability (proportion or standard deviation)

The more varied the responses, the larger the sample needed. For a proportion, variability peaks at p = 0.5 (a 50/50 split), which is why 50% is the safe default when you have no prior estimate — it produces the largest, most conservative sample size. For a mean, this variability is captured by the standard deviation.

The Sample Size Formula

For a proportion — any yes/no or percentage question — the standard approach is Cochran’s formula:

n₀ = Z² × p(1 − p) / e²

where Z is the z critical value for your confidence level (1.96 for 95%), p is the expected proportion (0.5 for maximum variability), and e is the margin of error as a decimal. Plugging in 95% confidence, p = 0.5, and e = 0.05 gives n₀ = 384.16, which rounds up to 385 — the number behind countless political polls.

Sample size for a mean

When you’re estimating an average rather than a percentage, the formula uses the standard deviation instead:

n = ( Z × σ / e )²

Here σ is the population standard deviation (estimated from prior data or a pilot study) and e is the margin of error in the same units as your measurement.

The finite population correction

Cochran’s base formula assumes a very large or unknown population. If your population N is known and your initial sample would be more than about 5% of it, you can shrink the requirement using the finite population correction (FPC):

n = n₀ / ( 1 + (n₀ − 1) / N )

For example, that base sample of 385 drops to about 370 for a population of 10,000, and all the way to about 66 for a small team of 80. This calculator applies the correction automatically whenever you enter a population size, which is why surveying small, defined groups needs proportionally more of the group to participate.

How to Determine Sample Size for a Survey

Putting it together, here’s the practical workflow the calculator follows:

  1. Pick a confidence level. 95% is standard; use 99% for high-stakes decisions.
  2. Choose a margin of error. ±5% is common; tighten to ±3% for more precision.
  3. Estimate the proportion or standard deviation. Use p = 50% for a proportion if you have no prior data.
  4. Enter the population size if it’s known and reasonably small, so the finite population correction can apply.
  5. Round up. Always round the result up to the next whole number — you can’t survey a fraction of a person.

Sample size vs. number of invites

One crucial distinction: the sample size is how many completed responses you need, not how many people to invite. If your survey has a 20% response rate and you need 385 completes, you’ll need to invite roughly 1,925 people. Always divide your target sample by your expected response rate to plan your outreach.

What Is a Good Sample Size?

There’s no single magic number, but some benchmarks help. For a general-population survey, around 385 completed responses gives you 95% confidence with a ±5% margin — enough for most business and market-research decisions. Tightening to ±3% pushes that to about 1,068, and ±1% requires nearly 9,600. The table below shows how quickly the requirement grows as you demand more precision:

Margin of error (95% conf.)Sample size (large population)Precision
±10%97Rough / exploratory
±5%385Standard for most surveys
±3%1,068High-precision polling
±1%9,604Very high precision (rare)

Notice the pattern: because the margin of error is proportional to 1/√n, cutting it in half requires quadrupling the sample. That’s why extremely precise surveys are so expensive, and why ±3% to ±5% is the practical sweet spot for most research.

Where Sample Size Calculations Are Used

  • Market research & surveys: determining how many customers to poll for reliable insights.
  • Political polling: the classic ±3% at 95% confidence drives the ~1,000-person poll.
  • Clinical trials: ensuring enough participants to detect a real treatment effect.
  • Quality control: setting inspection sample sizes for a production batch.
  • A/B testing: deciding how many users each variant needs before a result is trustworthy.

Once you’ve collected your sample, the same parameters flow into a confidence interval around your result — you can build that with our Confidence Interval Calculator. And because the z critical value driving the formula comes straight from the standard normal distribution, our Z-Score Calculator shows exactly where values like 1.96 come from.

Frequently Asked Questions

Use Cochran’s formula: n₀ = Z² × p(1−p) / e², where Z is the z critical value for your confidence level (1.96 for 95%), p is the expected proportion (use 0.5 if unknown), and e is the margin of error as a decimal. If your population is known and small, apply the finite population correction n = n₀ / (1 + (n₀−1)/N). Round up to the next whole number. This calculator runs both steps automatically as you enter your values.

For a general-population survey, about 385 completed responses gives 95% confidence with a ±5% margin of error, which is sufficient for most market research and business decisions. If you need higher precision, a ±3% margin requires around 1,068 responses. The right number depends on your confidence level, margin of error, and how variable the responses are. For small, defined populations, you’ll need a proportionally larger share of the group.

Much less than most people expect. For large populations, the required sample size is almost independent of population size — you need roughly 385 responses whether your population is 50,000 or 50 million. Population size only matters meaningfully when it’s small, typically under about 20,000, or when your sample would exceed roughly 5% of it. In those cases the finite population correction reduces the required sample, sometimes substantially.

Because a proportion of 0.5 (50%) produces the maximum possible variability, and therefore the largest, most conservative sample size. The term p(1−p) in Cochran’s formula peaks at p = 0.5. Using 50% guarantees your sample is big enough to hit your target margin of error no matter what the true proportion turns out to be. If you have reliable prior data suggesting a different proportion, using it will give a smaller required sample.

Margin of error has a powerful effect because sample size is proportional to one over the margin squared. Halving the margin of error quadruples the required sample. For example, at 95% confidence, moving from a ±5% margin (about 385 responses) to ±2.5% requires roughly 1,537. This is why tighter, more precise surveys become expensive quickly, and why ±3% to ±5% is the practical range for most studies.

The sample size is the number of completed responses you need; the number to invite is larger, because not everyone responds. To find how many to invite, divide your target sample size by your expected response rate. For example, if you need 385 completes and expect a 20% response rate, you should invite about 1,925 people. Always plan outreach around your response rate so you actually reach your target sample.

Methodology & formulas used

This calculator uses established sample-size formulas, reviewed July 2026. All computation runs locally in your browser; your data is never uploaded.

  • Proportion (Cochran): n₀ = Z² · p(1−p) / e², with p defaulting to 0.5 for maximum variability.
  • Mean: n = (Z · σ / e)².
  • Finite population correction: n = n₀ / (1 + (n₀ − 1) / N), applied automatically when a population size N is entered.
  • Z critical values come from the standard normal distribution (1.645 for 90%, 1.96 for 95%, 2.576 for 99%).
  • Rounding: the final sample size is always rounded up to the next whole number so the target margin of error is not exceeded.

Cochran’s formula assumes simple random sampling and that the normal approximation holds (np and n(1−p) both comfortably above 5–10). The result is the number of completed responses required; plan for non-response by dividing by your expected response rate. Results are computed at full precision and rounded up for the final count.

References

  1. NIST/SEMATECH e-Handbook of Statistical Methods. Sample Sizes Required. itl.nist.gov
  2. Cochran, W.G. (1977). Sampling Techniques, 3rd ed. — the origin of Cochran’s formula. Sample size determination overview
  3. Wikipedia. Sample size determination — formulas and finite population correction. en.wikipedia.org