Sample Size Calculator

Find the minimum number of responses you need for a survey at your chosen confidence level and margin of error.

Reviewed by the WorldCalcs team · Methodology · Last reviewed: July 2026

Use 50% if unsure — it gives the largest, safest sample.

Leave blank for a very large or unknown population.

Required sample size

385

What is a sample size calculator?

Before you run a survey or study, you need to know how many people to include. Ask too few and your results are unreliable; ask too many and you waste time and money. This sample size calculator finds the minimum number of responses needed to estimate a proportion — such as the share of customers who prefer a product — within a margin of error you set, at the confidence level you choose. Pair it with the confidence interval calculator once your data is collected.

How the sample size is calculated

For estimating a proportion, the sample size formula is n = z² × p × (1 − p) / E². Here z is the confidence multiplier (1.96 for 95% confidence), p is the expected proportion, and E is the margin of error as a decimal. When you don't know p, use 50% — it maximises p × (1 − p) and therefore gives the largest, safest sample. If your population is small and finite, the correction n′ = n / (1 + (n − 1) / N) trims the requirement, because sampling a big fraction of a small group carries more information. Sample sizes are always rounded up. For the sampling variability underneath the formula, see the standard deviation calculator, and to test hypotheses after collection, the p-value calculator.

Example

For 95% confidence, a 5% margin of error, and an unknown proportion (50%), the formula gives n = 1.96² × 0.5 × 0.5 / 0.05² = 384.16, so you need 385 responses. If your entire population is only 10,000 people, the finite-population correction lowers that to 370. Tightening the margin of error to 3% instead would push the requirement well above a thousand, because sample size grows with the square of the precision you demand.

All calculations happen in your browser. Nothing is sent, stored, or tracked.

Results are estimates and may contain errors — for general information only, not professional advice. Always verify before relying on them. Disclaimer

How to use

Pick your confidence level, enter the margin of error you can accept and your best guess for the proportion (use 50% if you're unsure). Optionally enter a population size to apply the finite-population correction.

The formula is n = z² × p × (1 − p) / E², rounded up. z is 1.645, 1.96 or 2.576 for 90%, 95% and 99% confidence.

Frequently asked questions

What sample size do I need for 95% confidence and a 5% margin of error?+

About 385 responses when the proportion is unknown (using 50%). That's the well-known rule of thumb for national-style surveys.

Why use 50% as the expected proportion?+

Because p × (1 − p) is largest at 50%, using it gives the biggest, most conservative sample. If you already have a good estimate of the proportion, using it lowers the required size.

What is the margin of error?+

It's how far your sample result may reasonably sit from the true value — a ±5% margin means the real figure is likely within five percentage points of your estimate.

What does the confidence level mean?+

It's how often the true value would fall inside your margin of error if you repeated the survey many times. 95% confidence uses a multiplier of 1.96.

Does population size affect the sample size?+

Only when the population is small. For large populations the required sample barely changes, which is why a national survey and a global one need similar sample sizes.

How does a smaller margin of error change the sample?+

Sample size grows with the square of precision, so halving the margin of error roughly quadruples the number of responses you need.

What is a good sample size for a survey?+

It depends on your margin and confidence, but around 385 is a common target for ±5% at 95% confidence. Tighter margins or higher confidence need more.

Can I use this for any population size?+

Yes. Leave the population field blank for a very large or unknown population, or enter it to apply the finite-population correction for smaller groups.