Use this sample size calculator to determine the minimum number of observations needed to estimate a population mean at a chosen confidence level and margin of error. Supports finite population correction for bounded populations.
Use template ->What is sample size?
Sample size is the number of observations required from a population to produce an estimate that falls within a specified margin of error at a chosen confidence level. It is one of the first decisions in any study or survey design, because too few observations produce unreliable estimates while collecting far more than necessary wastes resources.
For estimating a population mean, the required number depends on three things: how confident you want to be in the result, how precisely you want to measure it (the margin of error), and how much natural variation exists in the population (the standard deviation). Tightening any of those parameters pushes the required sample size up.
Sample size formula
Base formula: n₀ = (Z × σ / E)²
With finite population correction: n = n₀ / (1 + (n₀ − 1) / N)
Where n₀ is the initial required sample size assuming an infinitely large population, n is the adjusted sample size after applying the finite population correction, Z is the critical value for the chosen confidence level (1.645 for 90%, 1.96 for 95%, 2.576 for 99%), σ is the population standard deviation or a pilot-study estimate, E is the desired margin of error in the same units as σ, and N is the total finite population size.
How the sample size calculator works
The calculator takes confidence level (or a direct Z-value), margin of error, and standard deviation as inputs and returns the minimum required n. When population size N is provided, the finite population correction is applied, which reduces the required sample when the population is not large relative to the uncorrected estimate.
The sensitivity chart shows how required n changes as margin of error varies across a range. The relationship is quadratic: halving the margin of error roughly quadruples the required sample size. That trade-off between precision and collection cost is usually the central planning decision, and the chart makes it concrete.
How sample size is used in practice
Sample size calculation appears in survey design, clinical trials, A/B testing, and quality control sampling. The common practical challenge is estimating σ before the study begins. Common approaches include using results from a pilot study, drawing on prior research in the same domain, or using a conservative estimate to ensure the sample remains sufficient even if the true variability is higher than expected.
When the population is finite and fully enumerable (a company’s customer list, a specific product batch, a defined employee group), the finite population correction can meaningfully reduce the required sample while maintaining the same precision guarantees.