# Sample Size Calculator

URL: https://speedycalculator.com/calculators/statistics/sample-size/
Last updated: 2026-10-25

> The sample size calculator finds how many survey responses you need for a chosen confidence level and margin of error. It uses Cochran’s formula for proportions, then applies the finite population correction so smaller populations need fewer responses.

## Inputs

- Confidence level
- Margin of error (%)
- Expected proportion (%) — Use 50% if unsure; it gives the largest, safest sample.
- Population size — Use a very large number for an effectively infinite population.

## Results

- Sample size (infinite population)
- Required sample size

## Formula

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

## Explanation

Bigger samples give more precise estimates, but with diminishing returns: halving the margin of error needs about four times as many responses.

### How to use it

- **Confidence level**: 95% is standard.
- **Margin of error**: ±5% is common for opinion surveys.
- **Expected proportion**: use 50% if unknown; it gives the safest, largest sample.
- **Population size**: the number of people you could survey.

### Response rates

This is the number of *completed* responses. If you expect 20% to respond, invite five times as many people.

### Inputs explained

FieldWhat to enterConfidence levelChoose one: 90%, 95%, 99%Margin of errorIn %Expected proportionIn %. Use 50% if unsure; it gives the largest, safest sample.Population sizeA number. Use a very large number for an effectively infinite population.

### What each result means

- **Sample size (infinite population)** = [Confidence level]^2 × ([Expected proportion]÷100) × (1 - [Expected proportion]÷100) ÷ ([Margin of error]÷100)^2
- **Required sample size** = ceil([Sample size (infinite population)] ÷ (1 + ([Sample size (infinite population)] - 1) ÷ [Population size]))

### Example values

How the main result changes when **Margin of error** changes and everything else stays at the example values above:

Margin of error (%)Required sample size2.51,4283.7566153776.252437.51701096

## Worked example

95% confidence, ±5% margin, p = 50%, population 20,000.

n₀ = 1.96² × 0.25 ÷ 0.05² = 384.16. n = 384.16 ÷ (1 + 383.16/20,000) → **377 responses**.

## Key terms

- **Margin of error**: Half the width of the confidence interval.
- **Confidence level**: How often intervals built this way contain the true value.
- **Finite population correction**: Adjustment that reduces sample size for small populations.

## FAQ

**Why does 50% give the largest sample?**
p(1 − p) is maximised at p = 0.5.

**Does population size matter much?**
Only for small populations; above about 100,000 the result barely changes.

**Does this apply to averages?**
No, it is for proportions. Means require an estimate of the standard deviation.

**What formula does the Sample Size Calculator use?**
n₀ = z² × p(1 − p) ÷ e².


## Sources

- Cochran WG. Sampling Techniques, 3rd ed. Wiley, 1977
- [NIST/SEMATECH e-Handbook – sample sizes](https://www.itl.nist.gov/div898/handbook/)
