Statistics · Survey & Research Formula verified

Sample Size Calculator

Choose a confidence level, set your target margin of error and expected proportion, and optionally enter a population size to see the minimum sample size needed.

Confidence level
%
0.5%10%20%
%
1%50%99%
people
0500,0001,000,000
On-screen number pad
Tap to type into the highlighted field
Sample size needed
385
95% confidence, ±5%

Step-by-step proofCheck by hand
This estimates the sample size needed for a simple random sample estimating a single proportion. Other study designs (stratified sampling, comparing two groups, detecting a specific effect size) need different formulas — consult a statistician for anything beyond a straightforward survey estimate.

How sample size is calculated

Cochran's formula finds the sample size needed to estimate a population proportion within a stated margin of error, at a stated confidence level. Leaving the expected proportion at 50% is the most conservative choice — it produces the largest required sample for a given confidence level and margin of error. If a population size is given, the finite-population correction reduces the required sample once it's a meaningful fraction of the whole group.

The formula

n₀ = z² × p(1−p) ÷ e²  ·  n = n₀ ÷ (1 + (n₀−1) ÷ N)

Worked example

95% confidence (z = 1.96), ±5% margin of error, 50% expected proportion, no population limit: n₀ = 1.96² × 0.5 × 0.5 ÷ 0.05² = 384.16, rounded up to 385.

Frequently asked questions

What confidence level should I use?
95% is the standard default for most surveys and social-science research — it means that if you repeated the survey many times, about 95% of the resulting confidence intervals would contain the true population value. 99% gives a tighter guarantee but needs a larger sample; 90% needs a smaller one but a looser guarantee.
Why does the expected proportion matter?
The formula needs an estimate of how the answers will split. 50% (an even split) is the most conservative assumption — it produces the largest required sample size for a given confidence level and margin of error, since a proportion closer to 0% or 100% naturally has less variability to measure. If you have a reasonable prior estimate (e.g. from a past survey), using it can lower the required sample size.
When does population size matter?
For a very large or effectively unlimited population (all adults in a country, say), the population size barely changes the answer and can be left blank. It matters more for a small, well-defined population (all employees at a company, all members of a club) — the finite-population correction reduces the required sample size once you're sampling a meaningful fraction of the whole group.
Sources and method
  • Cochran, W.G. (1977). Sampling Techniques, 3rd ed. — the standard sample-size formula for estimating a proportion.
Last reviewed: 20 Sep 2026 Sources last verified: 20 Sep 2026 Results use the assumptions explained on this page. Report an error How we check calculations

Related calculators