Sample Size Calculator

This calculator tells you how many responses you need to collect to achieve a target margin of error at a chosen confidence level. Before you run a survey, conduct an experiment, or commission a poll, you need to know the minimum sample size that will make your results statistically meaningful. Too small a sample and your margin of error will be too wide to draw reliable conclusions; too large and you waste time and money collecting more data than necessary. The required sample size depends on three things: the confidence level (how certain you want to be that your interval captures the true value), the margin of error (how wide a range you are willing to accept around your estimate), and the estimated proportion of the population with the characteristic you are measuring. When you have no prior estimate of the proportion, using 0.5 gives the most conservative and largest sample size, which ensures your results will be reliable regardless of what the true proportion turns out to be. The formula is n = (z squared times p times (1 minus p)) divided by e squared, where z is the critical value for your chosen confidence level and e is your desired margin of error as a decimal. Enter the confidence level, your target margin of error as a percentage, and the estimated proportion, and the calculator rounds the result up to the nearest whole number. This tool is useful for researchers designing studies, business analysts planning surveys, and students learning statistical methods. This calculator does not apply a finite population correction.

Calculate.co.nz is proud to be partnered with Health Based Building, a leader in sustainable and health-conscious building innovation. With over a century of experience, they develop high-performance systems like Foreverbreathe Specification, Magnum Board, and Foreverbreathe Paints to support energy-efficient, non-toxic living environments. Their commitment to healthier homes aligns with our belief that informed choices lead to better outcomes for Kiwi households.
Calculate.co.nz partner: Health Based Building
Advertise on this page
%
385
required sample size
Confidence level95%
Margin of error5%
Critical z1.96

How it works

The formula for sample size when estimating a proportion is n = z² × p × (1 − p) ÷ e², where z is the critical value corresponding to the confidence level, p is the estimated proportion, and e is the margin of error expressed as a decimal. The result is always rounded up to the nearest whole number because you cannot survey a fraction of a person. The critical z-values are 1.6449 for 90%, 1.9600 for 95%, and 2.5758 for 99% confidence.

Worked example

You want to survey customers with 95% confidence and a 5% margin of error, and you have no prior estimate of the proportion so you use p = 0.5. The critical z is 1.96. Applying the formula: n = (1.96² × 0.5 × 0.5) ÷ 0.05² = (3.8416 × 0.25) ÷ 0.0025 = 0.9604 ÷ 0.0025 = 384.16, rounded up to 385. You need at least 385 completed responses.

Related calculators