Confidence Interval Calculator

%
Math Updated 30 Oct 2026

Calculates a confidence interval for a population mean or a population proportion from sample data. For a mean, enter the sample mean, the standard deviation (or the standard error) and the sample size; for a proportion, the number of successes or the sample proportion and the sample size. Choose the confidence level, such as 90%, 95% or 99%, to get the critical z-value, the standard error, the margin of error and the lower and upper bounds of the interval.

  • Random, independent sampling; z critical values from the standard normal distribution.

Formula

CI = estimate ± z × SE; mean: SE = s ÷ √n; proportion: SE = √(p̂(1 − p̂) ÷ n); z = Φ⁻¹(1 − (1 − confidence) ÷ 2)
  • Common critical values: 90% → 1.6449, 95% → 1.9600, 99% → 2.5758.
  • The z-based interval is appropriate for large samples or a known population standard deviation; for small samples from a normal population a t-interval is wider.
  • The proportion interval is the Wald (normal approximation) interval.

Mean 50, standard deviation 10, n = 100, 95% confidence

Inputs
  • Confidence interval for a: mean
  • I know the: sd
  • Sample mean (x̄): 50
  • Standard deviation (s): 10
  • Standard error: 1
  • Number of successes (x): 540
  • Sample size (n): 100
  • Sample size (n): 1000
  • Confidence level: 95 %

SE = 10 ÷ √100 = 1. z for 95% is 1.96, so the margin of error is 1.96 and the interval runs from 48.04 to 51.96.

Sources & references

Frequently asked questions

What does a 95% confidence interval mean?
If you repeated the sampling many times and built an interval each time, about 95% of those intervals would contain the true population value. It does not mean there is a 95% chance this particular interval contains it.
How can I make the interval narrower?
Increase the sample size (the margin of error shrinks with √n) or accept a lower confidence level. Quadrupling n halves the margin of error.
What is the margin of error in polls?
For a proportion near 50% with n = 1,000 at 95% confidence, the margin of error is about 1.96 × √(0.25 ÷ 1000) = 3.1 percentage points.

Related calculators