Free online calculators & unit converters — no sign-up needed.
Free calculators & converters, with plain-English explanations.
Home › Calculator › Confidence Interval Calculator with Examples

Confidence Interval Calculator with Examples

Quick answer: A confidence interval calculator builds a range around your sample mean: CI = mean plus or minus z x (std dev / sqrt(n)). Example: mean 100, std dev 15, n = 36 at 95% confidence gives (95.1, 104.9).

Last reviewed: October 2026

Key facts

  • CI = mean ± z × (s ÷ √n).
  • z = 1.645 (90%), 1.96 (95%), 2.576 (99%).
  • Bigger samples give narrower intervals (error shrinks with √n).
  • A 95% CI means 95% of such intervals contain the true mean, not a 95% chance for this one.

A confidence interval calculator builds a range estimate for a population mean: margin of error = z × standard deviation ÷ square root of n, interval = sample mean ± margin of error. This free calculator supports 90%, 95% and 99% confidence levels using z critical values.

Enter your sample mean, standard deviation and sample size, then pick a confidence level. The calculator shows the interval bounds, the margin of error and the standard error.

How to use

  1. Enter the sample mean.
  2. Enter the standard deviation of the sample.
  3. Enter the sample size (n).
  4. Pick a confidence level and click Calculate.

Confidence interval formulas

CI = x̄ ± z × (s ÷ √n)
TermMeaning
x̄ (mean)Sample mean, the center of the interval.
zCritical value: 1.645 (90%), 1.96 (95%), 2.576 (99%).
s ÷ √nStandard error of the mean.
Margin of errorz × standard error; half the interval width.

Worked examples

Test scores at 95%

Mean 100, std dev 15, n = 36, 95% confidence: standard error = 15 ÷ 6 = 2.5; margin of error = 1.96 × 2.5 = 4.9; 95% CI = (95.1, 104.9).

Same data at 99%

Mean 100, std dev 15, n = 36, 99% confidence: margin of error = 2.576 × 2.5 = 6.44; 99% CI = (93.56, 106.44). More confidence means a wider interval.

z critical values

Confidence levelz valueMeaning
90%1.645Narrowest common interval
95%1.96The standard choice
99%2.576Widest, most cautious

Frequently asked questions

What does a 95% confidence interval actually mean?

If you repeated the sampling 100 times, about 95 of the resulting intervals would contain the true population mean. It does not mean there is a 95% probability this specific interval contains it.

When should I use z vs t values?

Use z when the population standard deviation is known or n is large (30+). For small samples with an estimated standard deviation, t critical values are more accurate. This calculator uses z, which suits large-sample work.

How do I get a narrower interval?

Increase the sample size: the margin of error shrinks with the square root of n, so quadrupling n halves the width. Lowering the confidence level also narrows it.

What if my data is not normal?

For n of 30 or more, the Central Limit Theorem makes the mean approximately normal regardless of the data's shape, so the z interval works. Small, skewed samples need different methods.

Can the interval include impossible values?

Mathematically yes (e.g. negative counts). If your quantity cannot be negative, that signals the normal approximation is strained; consider a transformation or a different interval method.

Sources

Key takeaways

  • CI = mean plus or minus z times the standard error (s/sqrt(n)).
  • Quadrupling the sample size halves the margin of error.
  • Higher confidence = wider interval; 95% is the standard choice.

Explore more tools

All calculators  |  Unit converters  |  Scientific tools

How do I calculate a confidence interval for a proportion?

Use p-hat plus or minus z times the square root of (p-hat x (1 - p-hat) / n). Example: a poll of 400 voters with 50% support gives a standard error of the square root of (0.25 / 400) = 0.025, a margin of error of 1.96 x 0.025 = 0.049, and a 95% interval of (0.451, 0.549), reported as 50% plus or minus 4.9 percentage points.

How big a sample do I need for a given margin of error?

For a proportion, n = z-squared times p times (1 - p) divided by E-squared, where E is the margin of error as a decimal and p = 0.5 if unknown (the conservative choice). At 95% confidence with a 5% margin of error, n = 1.96-squared x 0.25 / 0.05-squared = 384.16, so round up to 385 respondents. Halving the margin of error quadruples the required sample.

Related: P-Value Calculator · Average Calculator · Standard Deviation Calculator

Related tools

Comments

Leave a comment