Math calculator

Sample Size Calculator

This sample size calculator tells you how many responses a survey needs the moment you set your confidence level and margin of error. Pick 90, 95, or 99 percent confidence, choose how tight you want the margin, and you'll see the sample size right away. Add a population size and it applies the finite-population correction, and a live chart shows how big your sample is next to the whole group. It's the quick way to plan a poll or study.

  • 90, 95, 99 percent
  • Adjustable margin
  • Finite population
  • Custom proportion
  • Live sample view

Last updated July 29, 2026 Method: n = z² p(1-p) / e² (Cochran's formula) By Muhammad Younus, Calcowa

Confidence level
Sample vs population sample shaded mint
Sample size needed
385 responses
z-score
1.96
Before finite
385
Sampling rate
Formula used

n = 1.96² × 0.5(1 - 0.5) / 0.05² = 385

Quick answer

How many responses does a survey need?

For a typical survey at 95% confidence and a ±5% margin of error, you need 385 responses. Tighten the margin to ±3% and it climbs to 1,068; drop to 90% confidence and it eases to 271. Those figures assume a large population and a 50% response proportion, the safe default. Enter your own numbers above for an exact count.

The formula

What is the sample size formula?

For a large population, the sample size is n = z² × p(1 - p) / e². Here z is the score for your confidence level, p is the expected proportion, and e is the margin of error as a decimal. At 95% confidence with a 5% margin and p set to 50%, that comes out to 385 responses. Statisticians call this Cochran's formula, and it's the standard way to size a survey from a proportion.

When your group is small and known, you don't need that full number. The finite-population correction trims it: n = n₀ / (1 + (n₀ - 1) / N), where N is the population. For 1,000 people, the 385 drops to about 278. That's the calculator's two-step approach, and it's why a small population needs a smaller sample.

n = z² p(1-p) / e²
sample population
A sample drawn from the whole group
Step by step

How do you calculate sample size?

It's a short routine once you've got your settings. Here's the full sequence:

  1. 1

    Pick a confidence levelChoose 90, 95, or 99 percent. That sets the z-score: 1.645, 1.96, or 2.576.

  2. 2

    Choose a margin of errorDecide how tight you want the result, like plus or minus 5 percent, and write it as a decimal.

  3. 3

    Set the proportionUse 50% if you don't know it, since that gives the safe maximum sample.

  4. 4

    Apply the main formulaWork out n = z² × p(1 - p) / e² and round up to a whole number.

  5. 5

    Correct for a small groupIf the population is small, divide by (1 + (n - 1)/N). If it's large, skip this.

The trade-off

Confidence, margin, and why precision costs

There's always a trade-off between precision and effort. Bumping confidence from 95% to 99% raises the z-score, and that pushes the sample size up by roughly 70%. Tightening the margin hits even harder, because the sample grows with the square of the precision: halving the margin from 5% to 2.5% quadruples the sample. That's why polls settle on 95% confidence and a 3 to 5 percent margin, since it's the sweet spot where the numbers stay practical. If you're studying spread instead, the Standard Deviation Calculator and the Z-Score Calculator pick up where this leaves off.

Worked examples

Two real-world sample sizes

Market research on a known list

Say you want to survey 2,000 customers at 95% confidence and a ±5% margin. The base formula gives 385, then the finite-population correction trims it: 385 / (1 + (385 - 1) / 2,000) = 323 responses. Because you're sampling a real fraction of the list, the number drops below the large-population 385.

A prevalence survey with a known rate

Estimating something you expect near 10%, like how many people use a service, lets you enter p = 10% instead of the safe 50%. Run that at 95% confidence with a ±5% margin and you get 1.96² × 0.1(0.9) / 0.05² = 139 responses. A proportion far from 50% shrinks the sample, since p(1 - p) is smaller.

Both figures come straight from the calculator above. Want to check the spread in your results afterward? The Standard Deviation Calculator and the Percentage Calculator turn raw counts into clean proportions.

The reverse view

Margin of error from a fixed sample

Sometimes the sample size is already set and you want the precision it buys. Rearranging the formula gives e = z × √(p(1 - p) / n). With p at 50% and 95% confidence, here's what common sample sizes deliver.

Sample sizeMargin of errorTypical use
100 ±9.8% Quick pulse checks and small pilots
385 ±5.0% The standard survey target
1,000 ±3.1% Common for national polls
2,401 ±2.0% Tighter reporting on headline numbers
9,604 ±1.0% Precision work, large budgets
Reference

Common sample sizes

These assume a large population and a 50% proportion, the safe default. Notice how a tighter margin and a higher confidence level both drive the sample up.

SettingsSample sizeGood to know
90% confidence, 5% margin 271 z = 1.645, the lightest common standard
95% confidence, 5% margin 385 The everyday survey default
95% confidence, 3% margin 1,068 Tighter margin needs a bigger sample
95% confidence, 1% margin 9,604 Very precise, very large
99% confidence, 5% margin 664 z = 2.576, the most cautious
FAQ

Frequently asked questions

Does a bigger population need a bigger sample?

Not by much, and that surprises people. Once a population is large, the required sample barely moves, so polling a whole country needs about the same sample as polling a large city. What really drives the sample size is your confidence level and margin of error, not the population. The finite correction only matters for small, known groups.

With a large population, the sample size is n = z² × p(1 - p) / e², where z is the score for your confidence level, p is the expected proportion, and e is the margin of error as a decimal. For a finite population of size N, you then correct it with n = n₀ / (1 + (n₀ - 1) / N). This sample size calculator runs both for you.

Most surveys use 95% confidence and a 5% margin of error, which is the standard you'll see in polls. A higher confidence level (99%) or a tighter margin (3% or 1%) gives more reliable results but needs a much larger sample. The 90% level is lighter and cheaper when precision isn't critical.

The margin of error is how far your survey result might sit from the true value, expressed as a plus or minus percentage. A 5% margin means a poll showing 60% support is really somewhere between 55% and 65%. Shrinking the margin makes the result tighter, but it raises the sample size sharply, since the size grows with the square of the precision.

Setting p to 50% gives the largest possible sample size, so it's the safe default when you don't know the proportion in advance. The term p(1 - p) is biggest at 0.5, which means you'll never undershoot. If you already know the proportion is near 10% or 90%, you can enter it to get a smaller, still-valid sample.

Not always. For a large population (tens of thousands or more), the finite-population correction barely changes the answer, so you can leave it blank. For a small, known group, like the 400 employees at a company, entering the population shrinks the required sample noticeably, since you're sampling a bigger fraction of the whole.

The z-score is how many standard deviations cover your confidence level. The common ones are 1.645 for 90%, 1.96 for 95%, and 2.576 for 99%. A higher confidence level means a larger z, which pushes the sample size up. This calculator picks the matching z when you choose a confidence level, or you can type a custom one.

Yes. The n = z² × p(1 - p) / e² method, paired with the finite-population correction, is Cochran's formula, the standard way to size a survey from a proportion. It's the same approach behind most polling and market-research samples, so the number you get here lines up with what those tools produce.

Flip the formula: e = z × √(p(1 - p) / n). If you've already collected 1,000 responses at 95% confidence with p at 50%, the margin works out to about ±3.1%. With 385 responses it's the familiar ±5%, and with 100 it widens to roughly ±9.8%. So a fixed sample locks in a fixed precision.

Keep going

Related calculators

Working through statistics? These pair well with the sample size calculator.

Planning a survey?

Try the calculator above, or browse every math tool in the hub.

Math tools