Sample Size Calculator
Determine the minimum sample size needed for a statistically valid survey or study.
🔢
Sample Size Calculator
Use the formula and worked example below to calculate manually.
Overview
The sample size calculator tells you how many respondents or observations you need for a statistically valid survey, poll, or experiment, based on the confidence level, margin of error, and population size.
How to use this calculator
- Enter the population size (or leave it for an infinite population).
- Select the desired confidence level (commonly 95%).
- Set the margin of error (typically ±5%).
- Set the expected response distribution (use 50% if unknown — it gives the largest, most conservative sample).
- The calculator shows the required sample size.
Understanding the inputs & results
Population size
The total number of people or observations in the group you are studying.
Confidence level
How certain you want to be that the sample results reflect the population. 95% is standard.
Margin of error (MoE)
The maximum acceptable difference between the sample result and the true population value. ±5% is common.
Response distribution (p)
The expected proportion with a given characteristic. Use 50% for the most conservative (largest) sample size estimate.
Z-score
The number of standard deviations corresponding to the chosen confidence level (e.g., 1.96 for 95%).
The formula
Sample size formula
n = Z² × p × (1−p) / e² (for large population); adjust for finite population: n_adj = n / (1 + (n−1)/N)
Z = Z-score for confidence level, p = response distribution (0.5), e = margin of error. For finite populations, divide by the finite population correction factor.
Worked example
Population 10,000, 95% confidence, ±5% margin of error, 50% distribution.
- n = (1.96² × 0.5 × 0.5) / 0.05² = 3.8416 × 0.25 / 0.0025 = 384.16 ≈ 385.
- Finite adjustment: n_adj = 385 / (1 + 384/10000) ≈ 371.
✓ Minimum sample size ≈ 371 respondents.