Sample Size Calculator
Find how many people or measurements you need to estimate a proportion or a mean to a chosen margin of error and confidence level.
These tools are for study and quick checking. A result is only as good as the numbers you enter and the simplifying assumptions in the formula. For published, regulated or safety-critical work, check it against a trusted source or an instrument.
How it works
- Enter your values in the boxes. Where a box has a unit beside it, check the unit before you read the answer.
- The answer updates as you type, so there is no button to press.
- Use Copy results to keep the answer. Check the formula and its limits below if the result will go into a report or an experiment.
The formula
n = z^2 p (1 - p) / e^2 for a proportion; n = (z s / e)^2 for a mean
Frequently asked questions
What proportion should I use?
Use 0.5 if you do not know. It gives the largest, safest sample size.
What is a finite population correction?
When your sample is a large share of a small population, you need fewer people than the formula says.
Is what I enter sent anywhere?
No. The calculation is done in your browser, so your numbers are not sent to a server or saved.
Related tools
Statistical Power Calculator
Find the power of a two-group comparison from the effect size and group size, or the group size needed for a target power.
Confidence Interval Calculator
Find the confidence interval for a mean from the sample mean, standard deviation and size, using the t distribution for any confidence level.
Random Sampling Tool
Draw a random sample from your list of items, with or without replacement, or shuffle the whole list.