Sample Size Calculator

The sample size formula n = (Z^2 * p * (1-p)) / E^2 determines the minimum number of observations needed to achieve a desired confidence level and margin of error. For finite populations, a correction factor adjusts the result downward. Enter your survey parameters below to calculate the required sample size for statistically valid results.

Quick Answer

For a 95% confidence level with a 5% margin of error and a 50% expected proportion, the required sample size is 385 respondents. If the total population is 10,000, the adjusted sample size is 370.

Use 50% if unknown (produces the largest, most conservative sample size)

Leave blank if the population is very large or unknown

Common Examples

Input Result
95% confidence, 5% margin, 50% proportion Sample size: 385
99% confidence, 5% margin, 50% proportion Sample size: 664
95% confidence, 3% margin, 50% proportion Sample size: 1,068
95% confidence, 5% margin, 50% proportion, pop. 10,000 Adjusted sample size: 370
90% confidence, 5% margin, 50% proportion Sample size: 271

How It Works

This calculator uses the standard sample size formula for estimating a population proportion:

n = (Z^2 x p x (1 - p)) / E^2

Where:

  • n = required sample size
  • Z = z-score corresponding to the desired confidence level (1.645 for 90%, 1.96 for 95%, 2.576 for 99%)
  • p = expected proportion of the attribute being measured (as a decimal; use 0.5 if unknown)
  • E = margin of error (as a decimal; e.g., 0.05 for 5%)

Why use p = 0.5?

The product p x (1 - p) is maximized when p = 0.5, which produces the largest (most conservative) sample size. If you have no prior estimate of the proportion, using 0.5 guarantees that your sample size is large enough regardless of the actual proportion.

Finite Population Correction

When the population is not infinitely large, the required sample size can be reduced using the finite population correction (FPC):

n_adj = n / (1 + (n - 1) / N)

Where N is the total population size. This adjustment is most significant when the calculated sample size is a large fraction of the population. For very large populations, the correction has minimal effect.

Confidence Level and Z-Score

The confidence level indicates the probability that the true population parameter falls within the margin of error of the sample estimate. A 95% confidence level means that if the same survey were conducted 100 times, approximately 95 of those surveys would capture the true value within the margin of error. Higher confidence levels require larger sample sizes.

Worked Example

A researcher wants to survey voters with 95% confidence and a 5% margin of error, with no prior estimate of the proportion. Z = 1.96 (for 95%). p = 0.5 (unknown proportion). E = 0.05 (5% margin). n = (1.96^2 x 0.5 x 0.5) / 0.05^2 = (3.8416 x 0.25) / 0.0025 = 0.9604 / 0.0025 = 384.16, rounded up to 385. If the voting population is 10,000, the adjusted sample size = 385 / (1 + (385 - 1) / 10,000) = 385 / 1.0384 = 370.8, rounded up to 371.

Related Calculators

Frequently Asked Questions

What is the minimum sample size for a survey?
There is no single minimum. The required sample size depends on your desired confidence level, acceptable margin of error, and expected variability. For a common setup of 95% confidence and 5% margin of error, 385 responses are needed when the population is large and the proportion is unknown.
Why does a larger population not always require a much larger sample?
Sample size is primarily driven by the desired precision (confidence level and margin of error), not the population size. A survey of 385 people provides 95% confidence with 5% margin whether the population is 100,000 or 10 million. The finite population correction only reduces the required sample when the population is relatively small.
What happens if I use a proportion other than 50%?
Using a proportion closer to 0% or 100% reduces the required sample size because there is less variability to measure. For example, if prior research suggests a proportion of 10%, the product p x (1-p) = 0.09 instead of 0.25, cutting the required sample by more than half. However, if that prior estimate is wrong, the margin of error may be wider than intended.
What is the difference between confidence level and margin of error?
The confidence level is the probability that the true population value falls within the margin of error. The margin of error defines how wide that interval is. A 95% confidence level with 3% margin means you are 95% confident the true value is within plus or minus 3 percentage points of the survey result. Tightening the margin or raising the confidence level both increase the required sample size.
Does this formula work for mean estimation or only proportions?
This calculator uses the formula for estimating a population proportion (percentage). Calculating sample size for estimating a mean requires a different formula that uses the population standard deviation instead of p x (1-p). The proportion formula is the standard approach for survey sample size calculations.