Confidence Interval Calculator

Math Tools

Confidence Interval Calculator

Calculate confidence intervals and margin of error for a sample mean.

Confidence Interval Calculator

Calculate confidence intervals, margin of error, lower and upper bounds, and z-scores for a sample mean.

Formula

x̄ ± z × (σ / √n)

Results

Lower bound

48.04

Upper bound

51.96

Margin of error

1.96

Z-score used

1.96

Recommended Statistics Resource

Working through statistics problems?

A statistics calculator, study guide, or data analysis notebook can help you work through confidence intervals, z-scores, standard deviation, and probability problems more comfortably.

View Statistics Resource

This section may contain affiliate links.

Rectangular banner showing a statistics study setup with calculator, charts, and notes

What this calculator does

This calculator estimates a confidence interval around a sample mean using a z-score, the sample standard deviation, and the sample size. It also shows the margin of error and the z-score used for the selected confidence level.

What is a confidence interval calculator?

A confidence interval calculator helps estimate the range in which a population mean is likely to fall based on sample data. Instead of doing the full statistics formula manually, you can enter the sample mean, standard deviation, sample size, and confidence level to get the lower bound, upper bound, margin of error, and z-score instantly.

This is useful in statistics, data analysis, surveys, experiments, research reports, quality control, and classroom assignments where confidence intervals are used to measure uncertainty around sample results.

Confidence interval formula explained

The standard confidence interval formula for a sample mean is:

x̄ ± z × (σ / √n)

In this formula, x̄ is the sample mean, z is the z-score linked to the selected confidence level, σ is the standard deviation, and n is the sample size. The term z × (σ / √n) is the margin of error.

Confidence interval examples for 95% confidence

These sample calculations show what a confidence interval looks like at the selected confidence level.

Sample valuesConfidence interval
mean 50, sd 10, n 10048.04 to 51.96
mean 72, sd 12, n 6469.06 to 74.94
mean 120, sd 20, n 49114.64 to 125.36

Confidence level and z-score table

Use this quick table to compare common confidence levels, z-scores, and typical use cases.

Confidence levelZ-scoreTypical use
90%1.645Useful for wider practical estimates with less strict certainty.
95%1.96The most common default confidence level in many statistics tasks.
99%2.576Useful when a higher confidence level is required.

How to calculate a confidence interval step by step

First, enter the sample mean, the sample standard deviation, and the sample size. Then choose a confidence level such as 90%, 95%, or 99%.

The calculator uses the matching z-score, computes the standard error by dividing the standard deviation by the square root of the sample size, and then multiplies that by the z-score to find the margin of error.

Finally, it subtracts and adds the margin of error from the sample mean to produce the lower and upper bounds of the confidence interval.

What margin of error means

Margin of error is the amount added to and subtracted from the sample mean to create the confidence interval. A smaller margin of error means the interval is narrower, while a larger margin of error means the interval is wider.

Margin of error is affected by the confidence level, standard deviation, and sample size. Higher confidence levels usually widen the interval, while larger sample sizes usually make it narrower.

How sample size affects confidence intervals

Sample size has a major effect on the width of a confidence interval. When sample size increases, the standard error usually decreases because the standard deviation is divided by the square root of a larger number.

This is why larger samples often produce narrower confidence intervals when the standard deviation and confidence level stay the same. A narrower interval usually means the estimate is more precise.

When a confidence interval calculator is useful

A confidence interval calculator is useful in surveys, polling, manufacturing, medical research, quality testing, economics, and academic statistics. It helps you understand how precise a sample result may be before making conclusions about a larger population.

It is also useful for students studying confidence intervals, z-scores, standard error, and inferential statistics because it provides a fast way to verify calculations and understand how each variable changes the final interval.

Confidence interval calculator FAQ and common questions

What is a confidence interval in statistics?

A confidence interval is a range of values that estimates where a population parameter, such as a population mean, is likely to fall based on sample data.

How do you calculate a confidence interval?

You calculate it by taking the sample mean and adding and subtracting the margin of error, where the margin of error equals the z-score multiplied by the standard deviation divided by the square root of the sample size.

What is the z-score for a 95% confidence interval?

The z-score commonly used for a 95% confidence interval is 1.96.

What happens when sample size increases?

When sample size increases, the standard error usually gets smaller, which makes the confidence interval narrower if other values stay the same.

What is margin of error in a confidence interval?

Margin of error is the amount around the sample mean that defines the width of the interval. It shows how much uncertainty is built into the estimate.