About the sample size calculator
The sample size calculator tells you how many people you need to survey to measure a proportion with a chosen confidence level and margin of error, optionally adjusting for a finite population. It can also run the other way: given a sample size, it shows the margin of error you can expect.
It helps you decide whether a planned survey is big enough to be meaningful before you collect any data.
Who should use the sample size calculator
- Researchers, marketers and students planning surveys.
- Teams deciding how many responses are enough.
- Anyone reading poll results who wants to understand the margin of error.
How to use the sample size calculator: what each input means
- Confidence level
- How sure you want to be that the true value lies within the margin: commonly 95%.
- Margin of error
- How far, in percentage points, your result may differ from the truth.
- Expected proportion
- Your best guess of the percentage who will answer a certain way. Use 50% if unsure, because it gives the largest, safest sample size.
- Population size
- Optional. Leave blank for a very large or unknown population.
How the sample size calculator works: method and formula
The required sample size for a large population is n₀ = z² × p(1 − p) ÷ e², where z is the critical value for the confidence level, p the expected proportion and e the margin of error. For a finite population N, this is adjusted: n = n₀ ÷ (1 + (n₀ − 1) ÷ N), then rounded up to a whole person.
- Large population
- n₀ = z² × p(1 − p) ÷ e²
- Finite population
- n = n₀ ÷ (1 + (n₀ − 1) ÷ N)
- Margin of error
- e = z × √(p(1 − p) ÷ n)
How to read your sample size calculator result
The result is the number of completed responses you need, not invitations. Divide by your expected response rate to find how many people to contact. Halving the margin of error needs about four times as many responses.
Sample Size Calculator worked example
95% confidence, ±5% margin of error, expected proportion 50%.
- z for 95% confidence is 1.9600.
- n₀ = 1.9600² × 0.5 × 0.5 ÷ 0.05² = 384.15, rounded up to 385.
- If the population is only 1,000 people, the adjusted size is 278.
- Checking the other way: a sample of 385 gives a margin of error of ±4.99%.
385 responses are needed for a large population, or 278 for a population of 1,000.
Practical uses of the sample size calculator
- Planning customer or employee surveys.
- Judging how reliable a poll result is.
- Justifying a sample size in a proposal.
Assumptions and limitations of this calculator
- Assumes a simple random sample and independent responses. Clustering, weighting or low response rates need further adjustment.
- For proportions only. Estimating a mean requires an estimate of the standard deviation and a different formula.
- Confidence level and margin describe sampling error only, not bias from poor questions or non-response.
