Skip to content
Conyso.
Free tools · Statistics

Confidence interval calculator.

Build a confidence interval for a mean or a proportion, or size the sample you need, with a live view of the interval, the exact t or z, and a plain-English read of what it means.

—95% confidence interval
—margin of error
—standard error
—critical value
What it means

Enter values to calculate.

Get the exact interval.

Bench computes t-based intervals, hypothesis tests, and capability from your real data, free.

Open in Bench →

How it works

The method.

A confidence interval puts a range around an estimate that, at the stated confidence, is likely to contain the true population value. Three jobs live here. Interval for a mean takes the sample mean, standard deviation, and size, and returns the margin of error and bounds. Interval for a proportion takes successes and sample size and bounds a rate or percentage. Sample size works backward: give a target margin and it tells you how many observations you need. The margin widens with more spread or higher confidence, and narrows as the sample grows.

The mean interval uses the t-distribution (df = n − 1), the correct choice when the standard deviation is estimated from the sample; it converges to z as n grows, so there is no separate "z mode" to get wrong. The proportion interval uses the normal (Wald) approximation.

Two distinctions worth keeping straight: this is an interval for the mean or a proportion (a confidence interval for the standard deviation or variance uses a chi-square method, which Bench computes), and it is a confidence interval, not a tolerance interval, which instead bounds a proportion of individual values.

x = 1.2σ
Where an estimate sits in its distribution.

The formula

The maths, in the open.

mean: margin = t × SD / √n  ·  proportion: margin = z × √(p̂(1−p̂)/n)  ·  sample size: n = (z × SD / E)²

Worked example. Mean 50, SD 8, n 40 at 95%: t with 39 degrees of freedom is 2.023, so margin = 2.023 × 8 / √40 = ±2.56, giving 47.44 to 52.56. (An approximate z-interval would give ±2.48; the t-interval is the correct, slightly wider answer.)


Watch out

Common pitfalls.

A 95% interval does not mean a 95% chance the true mean is in this one interval, it means 95% of such intervals would capture it. The mean interval here already uses the correct t-distribution, so small samples are handled. For a proportion, the normal approximation gets shaky when there are fewer than about five successes or failures, use an exact interval there.


FAQ

Confidence intervals, answered.

What is a confidence interval?

A range that, at the stated confidence, is likely to contain the true population mean. A 95% interval means 95% of such intervals would capture the true value.

How do you find a confidence interval from the mean and standard deviation?

Margin of error = z-score for your confidence level, times the standard deviation, divided by the square root of the sample size. The interval is the mean plus or minus that margin.

Does it give the lower and upper confidence bounds?

Yes. It returns the margin of error and both the lower and upper bounds, also called the confidence limits, for the confidence level you pick.

Can I change the confidence level?

Yes, choose 90%, 95%, or 99%. The interval widens as the confidence level rises, because higher confidence needs a larger margin of error.

Is this a confidence interval for the standard deviation?

No. This builds the interval for the mean, using the standard deviation as an input. A confidence interval for the standard deviation or variance uses a chi-square method, which Bench computes.

Confidence interval or tolerance interval?

They answer different questions. A confidence interval bounds the population mean; a tolerance interval bounds a proportion of individual values. For tolerance intervals, use Bench.

Should I use z or t?

For large samples the z-interval here is fine; for small samples a t-interval is slightly wider. Bench computes the exact t-interval.



Embed this calculator

Put it on your site, free.

A clean, responsive widget that runs in your visitor's browser, no signup. Pick an accent to match your brand, then copy the snippet. The Conyso mark stays on the widget.

Accent
Powered by Conyso.