What This Calculator Does
This tool tells you how many observations (the sample size, \(n\)) you need in order to estimate a population mean with a desired level of precision. You supply how confident you want to be, an estimate of the population standard deviation, and how close you want your sample mean to be to the true mean (the margin of error). The calculator returns the minimum sample size, rounded up to a whole number.
How to Use It
Choose your confidence level (90%, 95%, or 99%). Enter the population standard deviation (\(\sigma\)) — often taken from a pilot study, prior research, or a reasonable estimate. Then enter the margin of error (\(E\)), the maximum distance you are willing to accept between your estimate and the true mean, in the same units as \(\sigma\). The result is the number of participants or measurements you should collect.
The Formula Explained
The formula is $$n = \left( \frac{z \cdot \sigma}{E} \right)^{2}$$ Here \(z\) is the critical value from the standard normal distribution for your confidence level, \(\sigma\) is the population standard deviation, and \(E\) is the margin of error. Because a fractional person cannot be sampled, \(n\) is always rounded up to the next whole number. Notice that halving the margin of error quadruples the required sample size, since \(E\) is squared in the denominator.
Worked Example
Suppose you want 95% confidence (\(z = 1.96\)), the standard deviation is \(\sigma = 15\), and you want a margin of error of \(E = 2\). Then $$n = \left( \frac{1.96 \times 15}{2} \right)^{2} = \left( \frac{29.4}{2} \right)^{2} = 14.7^{2} = 216.09,$$ which rounds up to 217 observations.
FAQ
What if I don't know the standard deviation? Use an estimate from a pilot study or similar past research. If only a range is known, a rough rule is \(\sigma \approx \text{range} / 4\).
Why round up? Rounding down would leave you with slightly less precision than required, so the convention is always to round up to guarantee the target margin of error.
Does this need a population size? No. This formula assumes a large or infinite population. For small finite populations you would apply a finite population correction, which reduces the required sample size.