Skip to content
LunaCalc

Statistics

Confidence Interval Calculator

Compute a confidence interval for a mean with known or sample SD.

Calculator

About this calculator

This confidence interval calculator builds a z-based interval around a sample mean using the sample standard deviation and size.

Formula notes

CI = x̄ ± z·(s / √n). For 95% confidence, z ≈ 1.96.

Worked examples

  1. Example: mean 100, SD 15, n = 100 gives 100 ± 1.96·(15/10) = 100 ± 2.94, i.e. 97.06 to 102.94.
  2. For a sample mean of 50, standard deviation 12, and n = 100, a normal-approximation 95% interval is about 50 +/- 2.35, or 47.65 to 52.35.

How to use it

  1. Enter the sample mean and sample standard deviation.
  2. Enter the sample size and pick the confidence level.
  3. Read the margin of error and both interval bounds.

Frequently asked questions

Why does a bigger sample narrow the interval?

The standard error s/√n shrinks as n grows, so the margin of error tightens.

When should I use a t-interval instead?

With small samples (roughly n < 30) and unknown population SD, a t-interval is more accurate.

Limits and interpretation

  • The interval relies on the selected standard-error model, confidence level, sampling design, independence, and distribution assumptions.
  • A 95% confidence interval does not mean a fixed parameter has a 95% probability of lying inside this one computed interval.

References