Free sample size calculator
Work out how many responses you need for a survey or test to hit a given confidence level and margin of error. Runs in your browser; nothing leaves your device.
How it works
No black box — here's exactly what the calculator does.
Choose your confidence level (how sure you want to be) and your margin of error (how precise the result needs to be). Tighter values need a larger sample.
A 50% response distribution gives the largest, most conservative sample, so it's the safe default when you don't know how responses will split.
It computes the base sample as n0 = z² × p(1 − p) / e², where z is the z-score for your confidence level, p is the distribution as a fraction and e is the margin of error as a fraction.
If you enter a population, the finite-population correction shrinks the number — small groups need fewer responses to represent the whole.
FAQ
How do I calculate sample size?
Use n = z² × p × (1 − p) / e², where z is the z-score for your confidence level, p is the expected response proportion (0.5 is the safest default) and e is your margin of error as a decimal. If your population is small, apply the finite-population correction to reduce the number.
What sample size do I need for 95% confidence and a 5% margin of error?
For a large population, about 385 responses. That comes from a z-score of 1.96, a 50% response distribution and a 0.05 margin of error. A smaller population needs fewer responses.
What is margin of error?
The margin of error is how far your sample result might differ from the true population value. A 5% margin means the real figure is likely within 5 percentage points of what your sample shows, at your chosen confidence level.
Got the responses in a spreadsheet?
DataHub Pro analyses survey and test data and writes the report — from your spreadsheet, in minutes.
Try DataHub Pro free →