Sample Size Calculator

Calculate the required sample size for surveys and experiments.

Calculate minimum sample size for a survey or study

What Is the Sample Size Calculator?

The Sample Size Calculator determines how many survey respondents or experimental subjects you need to achieve a statistically valid result. It accounts for the desired confidence level, acceptable margin of error, and estimated proportion. A finite population correction is applied when the population size is known.

Formula

Infinite population: n = (Z × σ / E)² = Z² × p(1−p) / E² Where: Z = z-score for confidence level (90%→1.645, 95%→1.960, 99%→2.576) p = estimated proportion (use 0.5 if unknown) E = margin of error (as decimal, e.g. 5% → 0.05) Finite population correction: n_adj = n / (1 + (n−1)/N) where N = total population size

How to Use

Select your confidence level (90%, 95%, or 99%). Enter the margin of error as a percentage (e.g., 5 for ±5%). Enter the proportion p — use 0.5 if unknown (maximizes sample size). Optionally enter the population size N for the finite correction. Click Calculate.

Example Calculation

Survey: 95% confidence, ±5% margin of error, p=0.5 Z = 1.960, E = 0.05, p = 0.5 n = (1.96)² × 0.5 × 0.5 / (0.05)² = 3.8416 × 0.25 / 0.0025 = 384.16 → 385 With finite population N = 1000: n_adj = 385/(1+(384/1000)) = 385/1.384 ≈ 278

Understanding Sample Size

Sample size calculation is a critical step in research design. Choosing a sample that is too small leads to underpowered studies that may miss true effects. Choosing one that is too large wastes resources.

The formula balances three competing factors: confidence level (how sure you want to be), margin of error (how precise you need the estimate), and the proportion's variability (p(1−p) measures how spread out responses are).

In polling, a sample of ~1,000 typically achieves ±3% margin of error at 95% confidence — which is why national polls routinely survey about 1,000 people, regardless of whether the population is 1 million or 300 million.

Frequently Asked Questions

What is a confidence level?

A confidence level (e.g., 95%) means that if you repeated the survey many times, 95% of the resulting confidence intervals would contain the true population parameter. It is NOT the probability that your specific interval contains the truth.

What is the margin of error?

The margin of error (e.g., ±3%) is the maximum expected difference between the sample estimate and the true population value. A smaller margin of error requires a larger sample.

Why use p = 0.5 when unknown?

The formula n = Z²p(1−p)/E² is maximized when p = 0.5, giving the most conservative (largest) sample size. This ensures the result is valid regardless of the true proportion.

Why does sample size barely change for very large populations?

The sample size needed is driven mainly by the desired precision (margin of error and confidence level), not the population size. A survey of 1,000 gives similar accuracy for a city of 100,000 or a country of 300 million.

What is the finite population correction?

When sampling a significant fraction of a finite population (say more than 5%), the required sample size is smaller than the infinite-population formula suggests. The correction factor adjusts for this.

Related Tools