Skip to content
Popular Calculators
Browse Statistics calculators

Sample Size Calculator

Find how many people to survey for a given margin of error and confidence level, for a percentage or a mean, with a finite population option.

What do you want to work out?

Leave at 0 for a very large or unknown population.

About the Sample Size Calculator

Before running a survey, experiment or study, you need to know how many people or measurements to collect. Too few, and the results are too imprecise to be useful; too many, and time and money are wasted. The sample size you need depends on how precise you want the answer to be (the margin of error), how sure you want to be (the confidence level), how variable the thing you are measuring is, and sometimes the size of the population.

This sample size calculator works for estimating a percentage — the share of customers who are satisfied, voters who support a candidate — or a mean, such as average spending or blood pressure. It applies the finite population correction when you are sampling from a small group, and shows how many people to invite once you allow for non-response. The answer is always rounded up, since you cannot survey a fraction of a person and rounding down would miss the target precision.

How to Use the Sample Size Calculator

Choose For a percentage or For a mean.

For a percentage, enter the margin of error you want, in percentage points, and the expected percentage — use 50% if you have no idea.

For a mean, enter an estimated standard deviation and the margin of error in the same units.

Optionally, enter the population size, and choose the confidence level.

The Formulas

  percentage:  n₀ = z² × p(1 − p) ÷ E²
  mean:        n₀ = (z × σ ÷ E)²

  finite population:  n = n₀ ÷ (1 + (n₀ − 1) ÷ N)

  z = 1.645 (90%),  1.960 (95%),  2.576 (99%)

Step-by-Step Example: A Survey

A ±5 point margin at 95% confidence, no prior estimate.

  n₀ = 1.96² × 0.5 × 0.5 ÷ 0.05²
     = 3.8415 × 0.25 ÷ 0.0025
     = 384.1  → 385

You need 385 completed responses. For a ±3 point margin the answer is 1,068, and for ±1 point it is over 9,600.

Step-by-Step Example: A Small Population

The same survey of a company with 2,000 employees.

  n = 384.1 ÷ (1 + 383.1 ÷ 2,000) = 384.1 ÷ 1.1916 = 322.4 → 323

Because the sample is a noticeable share of the population, 323 responses are enough. If you expect only 30 percent of those invited to reply, invite about 1,077.

Step-by-Step Example: A Mean

Estimating average spending, with SD about 15 and a desired margin of ±2.

  n₀ = (1.96 × 15 ÷ 2)² = 14.70² = 216.1 → 217

You need 217 measurements.

Why Population Size Barely Matters

It surprises many people that a survey of a country of 50 million needs no more respondents than a survey of a city of 500,000. For a ±5 point margin, the country needs 385 responses and the city 384. Precision depends on the number of people asked, not the fraction of the population they represent — just as a spoonful of soup tells you how salty the pot is, whatever the size of the pot. The correction only matters when the sample is more than about 5 percent of the population.

Choosing the Inputs

Margin of error: ±5 points is common for general surveys, ±3 for polls that need to detect modest changes. Halving the margin quadruples the sample.

Confidence level: 95 percent is the convention. Moving to 99 percent increases the sample by about 73 percent.

Expected percentage: if a previous survey found 20 percent, using 20 rather than 50 cuts the sample needed by more than a third, from 385 to 246 for ±5 points.

Standard deviation: for a mean, take it from a pilot study, previous research or the likely range divided by about four.

Allowing for Non-Response and Subgroups

The calculated size is the number of completed responses. Response rates for email and online surveys are often 10 to 30 percent, so the number invited must be much larger. If you plan to report results for subgroups, such as separate regions, each subgroup needs to be large enough on its own, which can multiply the total. And remember that a large sample does not fix a biased one: 10,000 responses from an unrepresentative group can be less accurate than 400 from a well-chosen random sample.

Sample Size for Experiments

Comparing two groups — a new treatment against a placebo, or two versions of a web page — needs a power calculation, which also depends on the smallest difference worth detecting and the chance of detecting it if it exists, usually 80 percent. Those calculations generally need larger samples than a simple survey, because the difference between two estimates is less precise than either estimate alone.

Understanding Your Result

The headline is the number of completed responses or measurements needed.

The what it gives line restates the precision that sample achieves.

The population effect line shows the size with or without the population correction.

The allowing for non-response line suggests how many to invite at a 30 percent response rate.

When Should You Use This Calculator?

Use it to plan customer, employee or market research surveys.

Use it to size pilot studies and quality checks.

Use it to justify a sample size in a research proposal.

Use it for coursework on sampling.

Common Mistakes

Confusing invited and completed responses. Allow for non-response.

Rounding down. Always round up to reach the target margin.

Ignoring subgroups. Each needs enough responses for its own estimate.

Assuming a big sample removes bias. Only random sampling does that.

Using an unrealistically small standard deviation. The sample will be too small.

Planning with the wrong confidence level. Decide on 90, 95 or 99 percent before collecting data, and report the level alongside the results.

Frequently Asked Questions

How many people do I need to survey for a 5 percent margin of error?

At 95 percent confidence and an expected 50 percent result, n = 1.96² × 0.25 ÷ 0.05² = 384.1, which rounds up to 385 responses. This figure holds for any large population, from a city to a whole country.

How many responses give a 3 percent margin of error?

About 1,068 at 95 percent confidence: 1.96² × 0.25 ÷ 0.03² = 1,067.1, rounded up. Cutting the margin from 5 to 3 points nearly triples the sample needed, because the size depends on the square of the margin.

Does population size matter?

Only when the sample is a noticeable share of the population. For 2,000 employees and a 5 percent margin, the correction reduces 385 to 323. For populations above about 100,000 the correction makes almost no difference.

How do I find the sample size for measuring an average?

Use n = (z × σ ÷ E)². With an estimated standard deviation of 15 and a desired margin of ±2 at 95 percent confidence, n = (1.96 × 15 ÷ 2)² = 216.1, so 217 measurements are needed.

Why use 50 percent as the expected proportion?

The sample size formula is largest when p is 50 percent, so this gives the most cautious answer when you have no reliable estimate. If you expect a result near 10 or 90 percent, a smaller sample gives the same margin.

How do I allow for people who do not respond?

Divide the required sample by the expected response rate. If you need 385 completed surveys and expect 30 percent to respond, invite about 385 ÷ 0.3 = 1,284 people. Non-response can also introduce bias if non-responders differ.

Last reviewed September 28, 2026 by the CalculatorPeak editorial team.