Audited 06 Jun 2026·Last updated 27 Jul 2026·5 citations·Tier 1·0 uses

Confidence Interval Calculator

Calculate confidence intervals for a population mean. Enter sample mean, standard deviation, sample size, and confidence level for precise bounds.

Confidence Interval Calculator

The average of your sample observations
Number of observations, must be at least 2
Standard deviation of the sample
Confidence level
Margin of error
0.3734
Half-width of the confidence interval
Lower bound
-0.3734
Upper bound
0.3734
Critical value
2.0452

Background.

The confidence interval is the canonical tool for expressing uncertainty around a sample estimate. Unlike a point estimate, which provides a single number and conveys no information about precision, a confidence interval gives a range of plausible values for the unknown population parameter. This calculator computes the interval for a population mean when the population standard deviation is unknown, which is the standard situation in experimental science, quality control, survey research, and clinical trials. The output includes the lower bound, upper bound, margin of error, and critical value, enabling researchers to assess both the location and the width of the uncertainty region.

The theoretical basis for the confidence interval was established by Jerzy Neyman in 1937, though the conceptual groundwork had been laid earlier by Laplace and Gauss in the context of error theory. Neyman defined a confidence interval as a random interval constructed from sample data such that, under repeated sampling, a specified proportion of such intervals would contain the true parameter value. This frequentist interpretation is subtle: the probability statement applies to the procedure, not to any particular interval. A computed 95 percent confidence interval either contains the true mean or it does not; the 95 percent refers to the long-run coverage rate of the method.

In practice, confidence intervals are computed using the t-distribution when the population variance is estimated from the sample, and the normal distribution when the population variance is known. The distinction matters most for small samples. With fewer than 30 observations, the t-distribution has substantially heavier tails than the normal, producing wider intervals and larger critical values. As sample size increases, the t-distribution converges to the standard normal, and the difference between the two methods becomes negligible. Many statistical software packages default to the t-distribution for all sample sizes because it is exact under the assumption of normally distributed data and conservative otherwise.

What is confidence interval calculator?

A confidence interval is a range of values, derived from sample data, that is likely to contain the value of an unknown population parameter. The interval is constructed so that, under repeated random sampling, a specified percentage of intervals will cover the true parameter. This percentage is called the confidence level and is typically set at 90, 95, or 99 percent. The confidence interval does not state the probability that the true parameter lies within a specific computed interval; that interpretation belongs to Bayesian credible intervals. For a single population mean with unknown variance, the confidence interval takes the form x̄ ± t*(α/2, ν) × (s/√n), where x̄ is the sample mean, s is the sample standard deviation, n is the sample size, and t*(α/2, ν) is the critical value from the t-distribution with ν = n − 1 degrees of freedom such that the area in each tail is α/2. The quantity s/√n is the standard error of the mean, and the product t* × SE is the margin of error. The lower bound is x̄ − ME and the upper bound is x̄ + ME. The confidence interval is valid under the assumption that the sample is drawn from a normally distributed population or that the sample size is large enough for the Central Limit Theorem to ensure approximate normality of the sample mean.

How to use this calculator.

  1. Enter the sample mean from your data in the Sample mean field.
  2. Enter the number of observations in the Sample size field (must be at least 2).
  3. Enter the sample standard deviation in the Sample standard deviation field.
  4. Select the desired confidence level (90%, 95%, or 99%) from the dropdown.
  5. Click Calculate to obtain the confidence interval, margin of error, and critical value.
  6. Interpret the lower and upper bounds as the range of plausible values for the population mean.
  7. Use the margin of error to assess the precision of your estimate and to plan future sample sizes.

The formula.

ME = t* × s ⁄ √n

The one-sample confidence interval for a population mean rests on the sampling distribution of the standardized sample mean. When the underlying population is normal with unknown variance, the quantity (x̄ − μ) / (s/√n) follows a Student t-distribution with ν = n − 1 degrees of freedom. This result, first proved by William Gosset writing under the pseudonym Student in 1908, replaces the unknown population standard deviation σ with its sample estimator s and adjusts the reference distribution to account for the additional uncertainty introduced by estimation. To construct a (1 − α) confidence interval, we find the critical value t*(α/2, ν) such that P(T > t*) = α/2, where T denotes a t-distributed random variable. By symmetry, P(T < −t*) = α/2 as well, so the total tail probability is α and the central probability is 1 − α. Rearranging the probability statement P(−t* ≤ (x̄ − μ)/(s/√n) ≤ t*) = 1 − α yields P(x̄ − t* × s/√n ≤ μ ≤ x̄ + t* × s/√n) = 1 − α. This shows that the random interval [x̄ − ME, x̄ + ME] has coverage probability 1 − α under the model assumptions. The standard error SE = s/√n measures the variability of the sample mean across repeated samples. It decreases as the square root of sample size, meaning that quadrupling the sample size halves the standard error and approximately halves the margin of error if the critical value remains stable. The margin of error ME = t* × SE is the maximum likely distance between the sample mean and the population mean at the stated confidence level.

A worked example.

Example

A quality engineer measures the tensile strength of 25 randomly selected aluminum specimens and obtains a sample mean of 100 megapascals with a sample standard deviation of 10 megapascals. To construct a 95 percent confidence interval for the true mean tensile strength, the calculator first computes the standard error: SE = 10 / √25 = 10 / 5 = 2.0 megapascals. With n = 25, the degrees of freedom are ν = 24. From standard t-tables, the critical value for α/2 = 0.025 and 24 degrees of freedom is t* = 2.064. The margin of error is ME = 2.064 × 2.0 = 4.128 megapascals. The lower bound is 100 − 4.128 = 95.872 megapascals, and the upper bound is 100 + 4.128 = 104.128 megapascals. The engineer can report that the 95 percent confidence interval for the population mean tensile strength is 95.9 to 104.1 megapascals. This interval means that if the sampling procedure were repeated many times, approximately 95 percent of the computed intervals would contain the true mean. The width of 8.256 megapascals reflects the precision achievable with 25 observations and a standard deviation of 10 megapascals.

confidence Level95
sample Mean100
sample Size25
sample Std Dev10

Frequently asked questions.

Why does the calculator use the t-distribution instead of the normal distribution?
The t-distribution is exact when the data are normally distributed and the population standard deviation is unknown, which is the typical case in practice. When σ is replaced by the sample standard deviation s, the ratio (x̄ − μ)/(s/√n) follows a t-distribution, not a normal distribution. Using the normal z critical value would produce intervals that are too narrow, with actual coverage below the nominal confidence level. The discrepancy is largest for small sample sizes: with n = 5, the t critical value for 95 percent confidence is 2.776, compared to the z value of 1.96, a difference of 42 percent. As sample size increases beyond 30, the t-distribution converges rapidly to the normal, and the difference becomes negligible. For this reason, some textbooks permit z-intervals for large samples, but the t-interval is universally valid and never less accurate, so this calculator employs it for all sample sizes.
What happens to the interval width if I increase the sample size?
The width decreases proportionally to the inverse square root of the sample size, assuming the standard deviation remains constant. Doubling the sample size reduces the standard error by a factor of √2 ≈ 1.414, which reduces the margin of error and the total interval width by the same factor. Quadrupling the sample size halves the width. This square-root relationship is a fundamental property of averaging independent observations and derives from the fact that the variance of the sample mean equals the population variance divided by n. In experimental design, this relationship is used to compute the sample size required to achieve a target margin of error.
Can the confidence interval contain negative values?
Yes, if the sample mean is small relative to the margin of error. This occurs naturally when estimating means that are close to zero or when the sample size is small and the variability is high. For quantities that are physically constrained to be non-negative, such as concentrations, weights, or counts, a confidence interval that extends below zero may indicate model misspecification. In such cases, a log-transformation of the data can produce an interval on the positive real line, which is then back-transformed to the original scale. Alternatively, bootstrap percentile intervals respect the bounds of the data. However, for general use, the standard t-interval is mathematically correct for the mean of the sampled distribution, even if that mean is near a boundary.
What is the difference between a confidence interval and a prediction interval?
A confidence interval estimates the range of plausible values for a population parameter, such as the mean. A prediction interval estimates the range of plausible values for a single future observation from the same population. The prediction interval is always wider than the confidence interval because it must account for both the uncertainty in estimating the mean and the natural variability of individual observations around that mean. For normally distributed data, a 95 percent prediction interval for a single future observation is approximately x̄ ± t*(0.025, ν) × s × √(1 + 1/n), whereas the confidence interval is x̄ ± t*(0.025, ν) × s/√n.
Why does the confidence level affect the interval width?
The confidence level determines the critical value t* from the t-distribution. A higher confidence level requires a larger critical value because the interval must capture the true parameter more frequently under repeated sampling. For example, with 24 degrees of freedom, the critical value for 90 percent confidence is 1.711, for 95 percent it is 2.064, and for 99 percent it is 2.797. The ratio of the 99 percent margin of error to the 95 percent margin of error is 2.797/2.064 ≈ 1.355, meaning the 99 percent interval is 35.5 percent wider. This trade-off is unavoidable: greater certainty requires greater imprecision.
What assumptions are required for the t-interval to be valid?
The classical one-sample t-interval assumes that the observations are independent and identically distributed draws from a normal population. Independence means that one observation provides no information about another; this is violated in clustered, paired, or time-series data. Identical distribution means that every observation comes from the same population with the same mean and variance. Normality of the population ensures that the sample mean is exactly normal and the ratio (x̄ − μ)/(s/√n) is exactly t-distributed. For moderate sample sizes, say n > 30, the Central Limit Theorem ensures approximate normality of the sample mean even when the population is non-normal, though extreme skewness or heavy tails can still degrade coverage.
How do I interpret a 95 percent confidence interval of [50, 60]?
The correct frequentist interpretation is that the interval was generated by a procedure that, under repeated sampling, produces intervals containing the true population mean 95 percent of the time. It is incorrect to say there is a 95 percent probability that the true mean lies between 50 and 60; the true mean is fixed, and the interval either contains it or does not. A more intuitive but still accurate interpretation is that the interval contains the plausible values for the true mean given the observed data and the model assumptions. Values outside the interval are relatively incompatible with the data at the 5 percent significance level.
Can I use this calculator for proportions or regression coefficients?
No, this calculator is designed specifically for a single population mean with unknown variance. Proportions require different formulas: the Wald interval uses the normal approximation to the binomial, and more accurate intervals such as the Clopper-Pearson or Wilson score intervals are preferred for small samples or extreme proportions. Regression coefficients have standard errors that depend on the design matrix and residual variance, and their confidence intervals are computed from the t-distribution with residual degrees of freedom. While the underlying t-distribution is the same, the standard error formula differs. Using the one-sample mean calculator for proportions or regression coefficients would produce incorrect intervals.
What is the margin of error in a confidence interval?
The margin of error is the half-width of the confidence interval, equal to the critical value multiplied by the standard error. It represents the farthest the sample mean is likely to deviate from the population mean at the stated confidence level. In survey research, the term margin of error is commonly reported alone, without the full interval, because the sample mean is the point estimate and the margin of error quantifies its uncertainty. For example, a poll reporting 52 percent support with a margin of error of 3 percent implies a 95 percent confidence interval of 49 to 55 percent.
Why does the calculator output a critical value?
The critical value is the quantile from the t-distribution that determines the width of the confidence interval. Reporting it separately allows researchers to verify the computation and to understand how the sample size and confidence level influence the interval. The critical value is dimensionless and depends only on the degrees of freedom and the tail probability. For a 95 percent interval, the tail probability is 0.025 in each tail, and the critical value is the 0.975 quantile. Comparing critical values across different sample sizes reveals how quickly the t-distribution approaches the normal distribution.

References& sources.

  1. [1]Student (1908). "The Probable Error of a Mean." Biometrika 6(1):1–25.
  2. [2]Neyman, J. (1937). "Outline of a Theory of Statistical Estimation Based on the Classical Theory of Probability." Philosophical Transactions of the Royal Society A 236:333–380.
  3. [3]NIST/SEMATECH (2012). e-Handbook of Statistical Methods, Section 7.1.4.
  4. [4]Cochran, W.G. (1977). Sampling Techniques, 3rd ed. Wiley.
  5. [5]Montgomery, D.C. (2017). Design and Analysis of Experiments, 9th ed. Wiley.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 313 calculators remain free
  • No billing is enabled
Coming soon