Statistical Calculators › Means: One and Two Groups › Confidence Interval for One Mean: Sample Size
← All Calculators

Means: One and Two Groups

Confidence Interval for One Mean: Sample Size

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.

Confidence Interval Design

Specify the desired precision and variability to determine the required evaluable sample size.
For a two-sided interval, this is the half-width of the CI.
Use a planning estimate from prior or pilot data.
Enter a finite population size only when sampling without replacement from a limited population.

Required Sample Size

The minimum integer sample size whose calculated confidence-limit distance does not exceed the target.
Enter the design parameters and click Calculate Sample Size.

Methodology

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.

Known Standard Deviation

When the population standard deviation is known, the normal distribution is used. For a two-sided confidence interval:

D = z1−α/2 × σ / √n

Therefore: n = (z1−α/2 × σ / D)2

For a one-sided interval, α/2 is replaced by α, so the critical value is z1−α.

Unknown Standard Deviation

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.

D = t1−α/2,n−1 × s / √n

Find the smallest integer n for which: t1−α/2,n−1 × s / √n ≤ D

For a one-sided interval, α/2 is replaced by α.

Finite Population Correction

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.

D = critical value × SD / √n × √(1 − n/N)

Interpretation

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.

Important Assumption

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.

References

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.