Confidence Interval Calculator

z-based confidence interval for a mean at 90%, 95% or 99% confidence.

Reviewed by the WorldCalcs team · Methodology · Last reviewed: June 2026

95% Confidence interval

(95.842212, 104.157788)

Margin of error

4.157788

Standard error

2.12132

z-value

1.96

Uses the z-distribution (best for large samples). For small samples, a t-interval is more accurate.

What is a confidence interval?

A confidence interval is a range of values, built from sample data, that is likely to contain the true population mean. A 95% confidence interval means that if you repeated the same sampling many times, about 95% of the intervals you calculated would capture the real mean. The interval is centred on your sample mean and stretches out by a margin of error on each side. A higher confidence level — say 99% instead of 95% — produces a wider interval, because being more certain of catching the true value means casting a wider net. This calculator builds a z-based interval for a mean at the 90%, 95% or 99% levels. It pairs naturally with our standard deviation calculator for finding s, the average calculator for the mean, and the z-score calculator for individual values.

How it's calculated

The interval is the sample mean plus or minus a margin of error: x̄ ± E. The margin of error is E = z × (s / √n), where s is the sample standard deviation, n is the sample size, and s / √n is the standard error of the mean. The z-value depends on the confidence level: 1.645 for 90%, 1.96 for 95%, and 2.576 for 99%. The lower bound is x̄ − E and the upper bound is x̄ + E. This uses the z-distribution, which suits large samples or a known population standard deviation; for small samples the t-distribution gives a more accurate interval.

Example

Suppose a sample of 50 measurements has a mean of 100 and a standard deviation of 15, and you want 95% confidence. The standard error is 15 / √50 = 2.121320. The margin of error is 1.96 × 2.121320 = 4.157788. The 95% confidence interval is 100 ± 4.157788, or about 95.842212 to 104.157788.

All calculations happen in your browser. Nothing is sent, stored, or tracked.

Results are estimates and may contain errors — for general information only, not professional advice. Always verify before relying on them. Disclaimer

How to use

Enter the sample mean, the sample standard deviation and the sample size, then choose a confidence level. The calculator returns the standard error, the margin of error and the confidence interval for the population mean.

The critical values used are z = 1.645 for 90%, 1.96 for 95% and 2.576 for 99%.

Frequently asked questions

What is a confidence interval?+

It is a range, calculated from a sample, that is likely to contain the true population value. It is reported with a confidence level, such as a 95% confidence interval for a mean.

What does a 95% confidence interval mean?+

If the same study were repeated many times, about 95% of the intervals produced would contain the true mean. It does not mean there is a 95% chance the true mean lies in this one particular interval.

How do you calculate a confidence interval for a mean?+

Take the sample mean and add and subtract the margin of error: x̄ ± z × (s / √n). The z-value is 1.96 for 95% confidence.

What is the margin of error?+

The margin of error is how far the interval reaches on each side of the mean: E = z × (s / √n). A larger sample or a lower confidence level makes it smaller.

What z-value should I use?+

Use 1.645 for 90% confidence, 1.96 for 95%, and 2.576 for 99%. These are the standard critical values from the normal (z) distribution.

Why does a higher confidence level give a wider interval?+

Greater confidence requires a larger z-value, which widens the interval. To be more sure of capturing the true mean, you accept a less precise range.

When should I use a t-interval instead?+

Use the t-distribution for small samples (roughly n under 30) when the population standard deviation is unknown. This calculator uses the z-distribution, which fits large samples.

Does a larger sample size help?+

Yes. Because the standard error divides by √n, a larger sample shrinks the margin of error and produces a tighter, more precise interval.