Confidence Interval Calculator

Enter your sample size, sample mean, standard deviation, and confidence level to calculate the confidence interval for a population mean. Choose whether you're working with a known population SD (z-distribution) or unknown sample SD (t-distribution). You'll get the lower bound, upper bound, and margin of error — with a visual breakdown of the interval range.

Number of observations in your sample.

The average value of your sample.

Choose population SD if σ is known; otherwise use sample SD.

Enter either the population (σ) or sample (s) standard deviation.

The probability that the true parameter falls within the interval.

Results

Confidence Interval

--

Lower Bound

--

Upper Bound

--

Margin of Error (±)

--

Standard Error

--

Critical Value (z* or t*)

--

Confidence Interval Range

Frequently Asked Questions

What is a confidence interval?

A confidence interval is a range of values, derived from sample data, that is likely to contain the true population parameter (such as the mean). For example, a 95% confidence interval means that if you repeated the sampling process 100 times, approximately 95 of those intervals would contain the true population mean. It reflects estimation uncertainty, not the probability that a specific interval contains the true value.

What is a confidence level?

The confidence level (e.g., 90%, 95%, 99%) is the long-run proportion of confidence intervals that would contain the true parameter value if the study were repeated many times. A higher confidence level produces a wider interval, as you need to cast a broader net to be more certain. The 95% confidence level is most commonly used in practice.

What is a 95% confidence interval?

A 95% confidence interval means that if you drew 100 random samples and built an interval from each, about 95 of those intervals would contain the true population mean. It does NOT mean there is a 95% chance the true mean lies in your specific computed interval — the true mean either is or isn't in any given interval. The 95% CI uses a critical z-value of ±1.96 (for large samples or known σ).

When should I use a z-distribution versus a t-distribution?

Use the z-distribution (normal distribution) when the population standard deviation (σ) is known. Use the t-distribution when only the sample standard deviation (s) is available, which is the more common scenario. The t-distribution has heavier tails than the normal distribution, producing wider intervals for small samples. As sample size grows, the t-distribution converges to the z-distribution.

What is the margin of error?

The margin of error is the half-width of the confidence interval — the value added and subtracted from the sample mean to form the interval bounds. It is calculated as the critical value multiplied by the standard error (SD / √n). A smaller margin of error means a more precise estimate, which can be achieved by increasing sample size or accepting a lower confidence level.

What is the confidence interval formula for the mean?

The formula is: CI = x̄ ± (critical value × SE), where SE (standard error) = σ/√n (using population SD) or s/√n (using sample SD). For known σ, the critical value is a z-score (e.g., 1.96 for 95%). For unknown σ, the critical value is a t-score from the t-distribution with n−1 degrees of freedom. The result gives you the lower bound (x̄ − ME) and upper bound (x̄ + ME).

How does sample size affect the confidence interval?

Larger sample sizes produce narrower (more precise) confidence intervals. Since the standard error equals SD/√n, increasing n reduces the standard error, which in turn reduces the margin of error. For instance, quadrupling your sample size cuts the margin of error in half. This is why larger studies are generally preferred — they provide more reliable estimates of population parameters.

What is standard error and how is it different from standard deviation?

Standard deviation (SD) measures the spread of individual data points around the sample mean. Standard error (SE) measures the precision of the sample mean as an estimate of the population mean, calculated as SD/√n. While SD describes variability within a dataset, SE describes how much sample means would vary across repeated samples. The confidence interval is built around the standard error, not the standard deviation directly.

More Statistics Tools