Skip to main content

Statistics · Sample Size

Sample Size Calculator

Estimate the sample size needed for a study.

Sample Size Calculator

Choose a confidence level, enter the margin of error and expected proportion, then select Calculate.

Margin of Error

Already have a sample size? Find the margin of error it implies.

How this is calculated

The base sample size is n₀ = z² × p × (1 − p) ⁄ e² where z is the critical value for your confidence level, p is the expected population proportion, and e is the margin of error. If you provide a population size, a finite-population correction reduces the sample size accordingly. The result is always rounded up — you can't survey a fraction of a person. Margin of error works the same formula in reverse: given a sample size n (and the same finite-population correction when a population is given), the margin of error is z × √(p × (1 − p) ÷ n).

Examples

A 95% confidence level, ±5% margin of error, and 50% proportion with no population size needs 385 respondents. With a population of 1,000, that drops to 278. A sample of 400 people, at 95% confidence and a 50% proportion, has a margin of error of about 4.9%.

About this calculation

This is the standard survey sample-size formula from introductory statistics, using the standard normal distribution's critical values (z-scores) for each confidence level.

Frequently asked questions

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

Use 50% — it produces the largest, most conservative sample size estimate, which is the safe choice when you don't have a prior estimate.

Do I need to enter a population size?

No — leave it blank for an effectively unlimited population. Only enter it if you're sampling from a specific, finite group (for example, a company's 1,000 employees), since it can reduce the required sample size.

How is this different from the sample-size calculator above?

They're inverses of each other. The calculator above finds the sample size needed for a target margin of error; this one finds the margin of error you get from a sample size you already have.