Skip to main content

Confidence Interval Calculator

Calculate a confidence interval for a sample mean or a sample proportion. Enter your sample statistics and confidence level to get the point estimate, margin of error and interval bounds.

Input

Number of observations in your sample.

Average value computed from your sample.

Sample standard deviation (not the population σ).

Output

Result
MetricValue
No data yet
Was this helpful?

Guides

What does this calculator do?

A confidence interval (CI) is a range built around a sample statistic that expresses how much uncertainty there is in using that sample to estimate a whole population. This tool computes a CI for either of the two most common cases:

  • Sample mean (continuous data — weight, response time, test score): CI = x̄ ± z × (s / √n), where is the sample mean, s is the sample standard deviation, and n is the sample size.
  • Sample proportion (yes/no data — conversion rate, approval rate): CI = p̂ ± z × √(p̂(1−p̂) / n), where is the observed proportion of successes.

In both cases z is the critical value for your chosen confidence level, taken from the standard normal distribution: 1.645 for 90%, 1.960 for 95%, and 2.576 for 99%. The result table shows the point estimate, the margin of error (z × standard error), and the resulting interval.

Worked example: a sample of 25 items has a mean of 100 and a standard deviation of 15. At 95% confidence, the standard error is 15 / √25 = 3, the margin of error is 1.960 × 3 = 5.88, and the interval is [94.12, 105.88].

How to use it

  1. Choose what you're estimating — a mean or a proportion.
  2. Enter your sample size, plus either your sample mean and standard deviation (mean mode) or your number of successes (proportion mode).
  3. Pick a confidence level — 90%, 95% (the common default), or 99%.
  4. Read the point estimate, margin of error, and interval in the result table, which updates as you type. Copy or download it as CSV.

What a confidence interval actually means (and a common misreading)

It's tempting to read a "95% confidence interval" as "there's a 95% probability the true value falls in this specific range." That's not quite right in the standard (frequentist) sense used here: the true population mean or proportion is a fixed, if unknown, number — it either is or isn't in this particular interval, with no probability attached once the interval is computed. The 95% describes the procedure: if you repeated the sampling process many times and built a new interval each time, about 95% of those intervals would contain the true value. Any single interval you calculate is just one draw from that process. This distinction rarely matters in everyday use, but it's worth knowing before quoting a CI as a probability statement.

Which distribution does this use?

Both formulas use the Z (normal) distribution, which is the standard choice for large samples and for proportions. For very small samples (rough rule of thumb: under ~30) with an unknown population standard deviation, a t-distribution produces a slightly wider, more conservative interval — if you need that level of precision on a small mean-based sample, a dedicated t-interval calculator or statistics package is a better fit.

Why does a wider sample size shrink the interval?

Both formulas divide the spread by √n, so quadrupling your sample size only halves the margin of error — sampling more data narrows the interval, but with diminishing returns. This is why polls and experiments need surprisingly large samples to shrink the CI from, say, ±5% to ±1%.

Can margin of error exceed the interval bounds?

For proportions, the interval is clamped to [0%, 100%] since a proportion can't go negative or exceed 100% — with small samples and a proportion near 0 or 1, you may see the lower or upper bound pinned exactly at that limit.

Privacy

All calculations run locally in your browser — your sample data is never sent to a server.

confidence intervalstatisticsmargin of errorsample meanproportionz-scorecalculator

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.