Confidence Interval Calculator

Calculate a two-sided confidence interval for a population mean with either a sample standard deviation or a known population standard deviation.

Confidence interval for a population mean

95% confidence interval

49.0022512 to 58.3977488

Margin of error
+/- 4.6977488
Standard error
2.07666774
Critical value
2.26215716
Distribution
Student t, df = 9

Confidence interval calculator guide

A confidence interval combines a sample mean with a margin of error. Its width reflects the standard error, the selected confidence level, and whether the variability is estimated from the sample or known for the population.

Use the Student t option when the entered standard deviation is the sample statistic s. Use the standard normal option only when the population standard deviation sigma is genuinely known. The earlier calculator always used z critical values, which understated uncertainty for small samples with an estimated standard deviation.

How to calculate a confidence interval for a mean

  1. Enter the summary statistics: Provide the sample mean, standard deviation, and whole-number sample size.
  2. Identify the standard deviation: Choose sample standard deviation for the usual t interval, or population standard deviation only when sigma is known.
  3. Choose a confidence level: Select 90%, 95%, or 99%. Higher confidence produces a wider interval from the same data.
  4. Read the interval: Report both endpoints, the confidence level, method, and assumptions rather than reporting only the margin of error.

Formula and variables

The margin of error is the critical value multiplied by the standard error. A t critical value uses n - 1 degrees of freedom and is wider than the matching normal critical value for finite samples.

Unknown sigma: x-bar +/- t* (s / sqrt(n)); known sigma: x-bar +/- z* (sigma / sqrt(n))
x-barSample mean
Point estimate of the population mean.
sSample standard deviation
Estimated variability used with Student t.
sigmaPopulation standard deviation
Known population variability used with the normal distribution.
nSample size
Number of independent observations.

NIST particle-count example

A sample of 10 wafers has mean 53.7 and sample standard deviation 6.567. Calculate a 95% t interval.

Sample mean
53.7
Sample standard deviation
6.567
Sample size
10
  1. Degrees of freedom = 10 - 1 = 9
  2. t* is approximately 2.262
  3. Margin of error = 2.262 x 6.567 / sqrt(10)

Result: The 95% confidence interval is approximately 49.0 to 58.4.

Across repeated samples analyzed by this method, about 95% of the resulting intervals would contain the fixed population mean when the assumptions hold.

Understanding your results

Interval endpoints

The endpoints define the range of population-mean values compatible with the selected procedure and data. They do not describe the range of individual observations.

Margin of error

The margin of error is half the interval width. It decreases as sample size grows and increases with variability or a higher confidence level.

Assumptions

  • Observations are independent and come from the target population through an appropriate sampling or study design.
  • For small samples, the population distribution is approximately normal without severe outliers.
  • The standard deviation source is identified correctly as sample s or known population sigma.
  • The sample mean and standard deviation were computed from the same observations.

Limitations

  • The calculator covers two-sided intervals for one population mean, not proportions, paired differences, two means, medians, or regression parameters.
  • A confidence interval does not correct selection bias, measurement error, dependence, or a nonrepresentative sample.
  • For strongly skewed small samples, a t interval can have poor coverage.
  • A narrow interval can still be centered on a biased estimate.

Common mistakes

  • Using a z interval merely because the sample size exceeds 30 when population sigma is unknown.
  • Interpreting 95% confidence as a 95% probability statement about the fixed mean after the interval is observed.
  • Entering the standard error in the standard deviation field.
  • Using n rather than n - 1 degrees of freedom for a one-sample t interval.
  • Treating the interval as a prediction interval for individual observations.

Practical use cases

Research summaries

Report the estimated population mean together with a transparent measure of sampling precision.

Quality and process studies

Estimate a process mean when observations are independent and the method assumptions are defensible.

Planning and decision guide

Choose the method before seeing the result

Decide whether sigma is truly known, select the confidence level, and document the sampling design before calculating. Use a method suited to clustering, weighting, skewness, or complex survey designs when those features are present.

Frequently asked questions

Should I use t or z for a confidence interval?

Use Student t when the standard deviation is estimated from the sample. Use z when the population standard deviation is known.

What does a 95% confidence interval mean?

It means the interval-producing procedure captures the true mean in about 95% of repeated samples under its assumptions.

Why does a higher confidence level make the interval wider?

Capturing the parameter more often requires a larger critical value and therefore a larger margin of error.

How does sample size affect the interval?

The standard error divides the standard deviation by the square root of n, so larger samples generally produce narrower intervals.

Can I use this calculator for a proportion?

No. A proportion has a different standard-error formula and may require a Wilson, exact, or other binomial interval.

Sources and review

Reviewed 2026-08-29.

Continue with calculators that answer nearby questions and help compare the next step.