Means: One and Two Groups
Determine the minimum sample size needed to estimate a single population mean with a specified confidence level and maximum margin of error. Supports both known and unknown standard deviations, one-sided or two-sided confidence intervals, and finite-population correction.
This calculator follows the Confidence Intervals for One Mean procedure documented in PASS by NCSS. The goal is to determine the sample size required for a confidence interval around a single population mean to have a specified distance from the sample mean to its confidence limit. For a two-sided interval, that distance is the confidence interval half-width, also called the precision or margin of error.
When the population standard deviation is known, the normal distribution is used. For a two-sided confidence interval:
For a one-sided interval, α/2 is replaced by α, so the critical value is z1−α.
When the population standard deviation is unknown and is estimated by the sample standard deviation, the t distribution is used. Because the critical value depends on the sample size through the degrees of freedom, the required sample size is found iteratively.
For a one-sided interval, α/2 is replaced by α.
When a finite population size is specified, the calculation applies the finite population adjustment documented by PASS. The standard error is multiplied by √(1 − n/N), where N is the population size.
The resulting sample size is the minimum integer sample size for which the calculated distance from the sample mean to the confidence limit is no greater than the requested target. The calculator reports the actual distance achieved at that sample size, which may be slightly smaller than the target because sample size must be an integer.
PASS notes that this procedure assumes the standard deviation of the future sample will be the same as the standard deviation specified for planning. When the standard deviation is estimated from a previous sample and uncertainty in that estimate should be incorporated into the probability of achieving the desired precision, PASS recommends its separate Confidence Intervals for One Mean with Tolerance Probability procedure.
Hahn, G. J. & Meeker, W. Q. (1991). Statistical Intervals: A Guide for Practitioners. John Wiley & Sons, New York.
NCSS, LLC. (2026). PASS Sample Size Software: Confidence Intervals for One Mean, Chapter 420. NCSS.com.
Moore, D. S. & McCabe, G. P. (1999). Introduction to the Practice of Statistics. W. H. Freeman. The PASS validation example reports the 95% known-SD example with σ = 3 and margin of error 2, producing N = 9.
nQuery / Statsols. Confidence Interval for One Mean using Normal Distribution. nQuery sample-size software.