Confidence Interval Calculator

MATH · STATISTICS

Sample statistics & confidence level

Calculated on this device
Enter the sample mean x-bar.
Enter a non-negative standard deviation.
Enter a positive whole number for sample size n.
Enter a confidence level percentage strictly between 0 and 100, such as 95.
%

95% CONFIDENCE INTERVAL

[19.713, 21.487]

20.6 ± 0.887 (z* = 1.96, SE = 0.4525)

Formula: x̄ ± z* × (s ÷ √n)

Margin of Error (±)±0.887z* = 1.96
Standard Error (SE)0.4525n = 50

Confidence intervals across standard levels

Confidence levelz*Margin of errorInterval
80%1.2816±0.58[20.02, 21.18]
85%1.4395±0.6515[19.9485, 21.2515]
90%1.6449±0.7444[19.8556, 21.3444]
95% (Selected)1.96±0.887[19.713, 21.487]
99%2.5758±1.1657[19.4343, 21.7657]
99.9%3.2905±1.4891[19.1109, 22.0891]

HOW IT WORKS

Normal confidence interval for the mean

A confidence interval gives a plausible range for the true population mean μ based on your sample mean, sample spread, and sample size.

01

Standard Error of the Mean (SE)

Divide standard deviation by the square root of sample size:

SE = s ÷ √n
02

Margin of Error (ME)

Multiply the standard error by the two-tailed critical z-score z* = Φ⁻¹(1 − α/2):

ME = z* × SE
03

Confidence Interval Bounds

Add and subtract the margin of error from the sample mean:

[ x̄ − ME , x̄ + ME ]

INFERENCE GUIDE

What controls confidence interval width?

Sample size, variability, and confidence trade-offs

A narrower interval means higher precision. Because margin of error shrinks with 1 / √n, cutting the interval width in half requires quadrupling your sample size. Conversely, raising confidence from 95% to 99% widens the interval. To plan sample sizes before collecting data, use our Sample Size Calculator, or compute sample SD from raw data in the Standard Deviation Calculator.

Frequently asked questions

Does a 95% confidence interval mean there is a 95% chance μ is inside?

Strictly, 95% of intervals constructed this way from repeated random samples will contain the true fixed population mean μ.

How do I narrow a confidence interval?

Increase the sample size n or accept a slightly lower confidence level (e.g. 90% instead of 99%).

What happens when standard deviation is 0?

If every observation is identical (SD = 0), standard error and margin of error are 0, so the interval collapses to [x̄, x̄].

Can I enter a custom confidence level like 97.5%?

Yes. Any confidence level strictly between 0% and 100% is supported via the inverse normal CDF.

Your statistics are computed locally in your browser.