Confidence Interval Calculator tool

Confidence Interval Calculator

A confidence interval answers: if we repeated our survey many times, what range would contain the true average most of the time?

What is a confidence interval calculator?

A confidence interval calculator builds a range around your sample mean that should contain the true population mean most of the time. You enter the sample mean, sample standard deviation, sample size n, and a confidence level. It returns the lower bound, upper bound, and margin of error using the normal z critical value.

How to use the Confidence Interval Calculator

  1. Enter the sample mean from your data.
  2. Enter the sample standard deviation (s).
  3. Type sample size n (at least 2).
  4. Pick 90%, 95%, or 99% confidence.
  5. Read lower bound, upper bound, and margin of error.

About this calculator

A confidence interval answers: if we repeated our survey many times, what range would contain the true average most of the time? Pollsters reporting \"52% ± 3%\" are showing a confidence interval around a proportion. Factory QC teams use the same idea for average batch weight or voltage.

Enter your sample mean, sample standard deviation, sample size n, and pick 90%, 95%, or 99% confidence. The calculator returns the lower bound, upper bound, and margin of error using the normal z critical value (1.645, 1.96, or 2.576). For small samples under 30, a t-distribution is technically more accurate, but the z approximation is fine for quick estimates.

Example: 40 students average 72 marks with SD 8. The 95% CI is roughly 72 ± 1.96 × (8/√40) = 72 ± 2.48, so we expect the true class mean to fall between 69.5 and 74.5.

Pair this with the [[sample-size]] calculator to decide how many responses you need before collecting data, the [[z-score]] calculator to standardise individual values, and [[mean-median-mode]] to compute mean and SD from raw numbers.

How the math works

CI=xˉ±z⋅snCI = \bar{x} \pm z \cdot \frac{s}{\sqrt{n}}
  • xˉ\bar{x}: Sample mean
  • ss: Sample standard deviation
  • nn: Number of observations
  • zz: Critical z-value for confidence level

Worked examples

40 students, mean 72, SD 8

95% CI: 72 ± 1.96 × (8/√40) = 72 ± 2.48.

True class mean likely falls between 69.5 and 74.5.

Larger n tightens this range — at n = 100 the margin drops to about 1.57.

When to use 99% confidence

Medical thresholds, safety specs, or legal claims need 99% confidence. The interval is wider but you miss the true value less often across repeated studies.

Common uses

  • Report a range around average exam or survey scores instead of a single point
  • Set acceptable limits for factory batch measurements with known variation
  • Summarise A/B test results with a margin of error for conversion rate
  • Present research findings with 95% confidence bounds in reports
  • Check whether a claimed average falls inside your computed interval

Frequently asked questions

What does a 95% confidence interval mean?

It means that if you repeated the sampling process many times, about 95% of the intervals you build would contain the true population mean. It does not mean there is a 95% chance the mean is inside this one specific interval.

How do you calculate a confidence interval for the mean?

CI = sample mean ± z × (SD / √n). For 95% confidence, z = 1.96. Multiply the standard error (SD over root n) by z, then add and subtract from the mean.

Why does a larger sample size narrow the interval?

The standard error is SD divided by root n. As n grows, the standard error shrinks, so the margin of error gets smaller and the interval tightens around the sample mean.

When should I use 99% instead of 95% confidence?

Use 99% when missing the true value is costly — medical thresholds, safety specs, or legal claims. The interval will be wider. Use 95% for general reporting and surveys.

What is margin of error in a confidence interval?

Margin of error is half the width of the interval — the ± part added to and subtracted from the sample mean. It equals z times the standard error.

Deep dive

What a confidence interval actually means

Repeated sampling, not single-interval probability.

Why standard error shrinks with sample size

More data, tighter estimate.

Related calculators

Maintained by J Jaya Prakash · Last updated: October 2026