HomeCalculatorsStatisticsConfidence Interval Calculator

Confidence Interval Calculator

Statistics

Calculate a confidence interval from a sample mean, standard deviation, and sample size in seconds. Get the lower bound, upper bound, and margin of error instantly.

95% Confidence Interval

[0, 0]

Margin of Error

± 0

Z-Score

1.96

Interpretation

We are 95% confident the true population mean lies between 0 and 0.

What is a Confidence Interval?

The Confidence Interval Calculator computes a range of plausible values for a population mean, based on your sample mean, standard deviation, sample size, and chosen confidence level (90%, 95%, or 99%). Instead of reporting a single number, it gives you a lower bound and upper bound — the honest way to communicate how precise your estimate really is.

Confidence intervals are the standard tool statisticians, researchers, and analysts use to express uncertainty. A sample mean on its own tells you nothing about how reliable it is; a confidence interval tells you the range within which the true population value likely falls, given the variability and size of your sample. This calculator handles the full computation — standard error, z-score selection, and margin of error — instantly.

For a deeper look at the underlying variability in your data, pair this calculator with the Standard Deviation Calculator to compute σ from a raw dataset first, then bring that value here to build your interval.

How to use this Confidence Interval calculator

  1. Enter your sample mean — the average value computed from your sample data (e.g., average test score, average height, average transaction value).

  2. Enter the standard deviation — either the known population standard deviation, or your best sample-based estimate. Use the Standard Deviation Calculator first if you only have raw data.

  3. Enter your sample size (n) — the number of observations in your sample. Larger samples produce narrower, more precise intervals.

  4. Select your confidence level — 90% for a narrower interval with less certainty, 95% for the most common standard, or 99% for maximum certainty at the cost of a wider range.

  5. Read the margin of error and interval bounds — the result card shows the margin of error prominently, along with the lower and upper bounds of your confidence interval.

  6. Check the step-by-step breakdown — expand the calculation steps to see exactly how the standard error, z-score, and margin of error were combined to produce your final interval.

Formula & Methodology

Standard error:
SE = σ / √n

Margin of error:
E = z × SE

Confidence interval:
[x̄ − E, x̄ + E]

Variable definitions:
-  — sample mean
- σ — standard deviation (population or estimated sample standard deviation)
- n — sample size
- z — z-score for the chosen confidence level (1.645 for 90%, 1.96 for 95%, 2.576 for 99%)

Worked example:

A researcher measures the average commute time for 40 randomly sampled office workers: sample mean = 32 minutes, standard deviation = 8 minutes, at 95% confidence.

Step 1 — Standard error: SE = 8 / √40 = 8 / 6.3246 ≈ 1.265

Step 2 — Margin of error: E = 1.96 × 1.265 ≈ 2.48

Step 3 — Confidence interval: [32 − 2.48, 32 + 2.48] = [29.52, 34.48] minutes

The researcher can report: "We are 95% confident the true average commute time for this population is between 29.52 and 34.48 minutes."

Assumption: This calculator uses the z-based formula, which assumes the sampling distribution of the mean is approximately normal — a safe assumption when n ≥ 30, or when the underlying population itself is roughly normal. For small samples with unknown population variance, a t-distribution based interval (see the T-Test Calculator for the related t-distribution logic) is technically more precise.

Frequently Asked Questions

A confidence interval is a range of values, calculated from sample data, that is likely to contain the true population value (like a mean) with a stated level of confidence. For example, a 95% confidence interval of [72, 78] for average test scores means that if you repeated the sampling process many times, about 95% of the intervals you'd construct would contain the true population mean. It is not the probability that this specific interval contains the true value — it's a statement about the long-run reliability of the method.
Compute the standard error (sample standard deviation divided by the square root of sample size), multiply it by the z-score for 95% confidence (1.96), and add/subtract that margin of error from the sample mean. For example, with a mean of 100, standard deviation of 15, and n = 40: standard error = 15/√40 ≈ 2.372, margin of error = 1.96 × 2.372 ≈ 4.65, giving a confidence interval of approximately [95.35, 104.65].
The standard z-scores are 1.645 for 90% confidence, 1.96 for 95% confidence, and 2.576 for 99% confidence. These come from the standard normal distribution and represent the number of standard errors needed on each side of the mean to capture the stated percentage of the distribution. Higher confidence levels require larger z-scores, which widen the interval.
A higher confidence level means you want to be more certain that the interval contains the true population value, which requires casting a wider net. Moving from 90% to 99% confidence increases the z-score from 1.645 to 2.576 — roughly 56% larger — which directly widens the margin of error and the resulting interval. There is always a trade-off between confidence and precision: a narrower interval is more useful but less certain to be correct.
The margin of error is the ± amount added to and subtracted from the sample mean or proportion. The confidence interval is the resulting range: [mean − margin of error, mean + margin of error]. Use the [Margin of Error Calculator](/margin-of-error-calculator/) if you only need the ± value, or this calculator if you want the full lower and upper bounds.
Yes — larger sample sizes produce narrower confidence intervals because the standard error (σ/√n) shrinks as n grows. Quadrupling your sample size halves the standard error and therefore roughly halves the margin of error, assuming the standard deviation stays the same. This is why researchers use the [Sample Size Calculator](/sample-size-calculator/) to determine how many observations are needed to hit a target margin of error.
This calculator is built for continuous data using a known or estimated standard deviation. For a proportion (like a percentage of respondents who agree with a statement), the standard error formula is different: √[p(1−p)/n], where p is the sample proportion. You can approximate a proportion-based interval by treating p(1−p) as a variance-like quantity, but for exact proportion confidence intervals, a dedicated proportion-based tool or the normal approximation formula should be used.
This calculator uses the z-based confidence interval formula, which assumes the sampling distribution of the mean is approximately normal. This holds either when the underlying population is normally distributed, or when the sample size is reasonably large (commonly n ≥ 30) due to the Central Limit Theorem. For small samples from a non-normal population with an unknown population standard deviation, a t-distribution based interval is more appropriate.
A wide confidence interval signals high uncertainty about the true population value — usually caused by a small sample size, high data variability (large standard deviation), or both. If your interval is too wide to be practically useful (for example, [50, 150] when you need precision to within ±10), you'll need to increase your sample size. Use the [Sample Size Calculator](/sample-size-calculator/) to find out how large a sample you'd need for a narrower, more decision-useful interval.
Confidence intervals let you report not just a single estimate but a plausible range, which communicates the precision of your data. In A/B testing, a confidence interval around the difference in conversion rates tells you whether zero (no effect) falls inside the range — if it doesn't, the result is likely meaningful. In manufacturing, confidence intervals around average product measurements (like fill weight) are used to verify a process meets a specification with a stated reliability.
They are two views of the same underlying statistical logic. If a confidence interval for the difference between two groups excludes zero, you would also reject the null hypothesis of 'no difference' in a corresponding two-tailed hypothesis test at the complementary significance level (e.g., a 95% confidence interval corresponds to a 5% significance level test). The [T-Test Calculator](/t-test-calculator/) performs the equivalent hypothesis test directly when comparing two group means.
A confidence interval is always symmetric around the sample mean you entered, not around any unknown true population value — because the true value is what you're trying to estimate, not a fixed input. If your sample mean is 100 and margin of error is 4.65, the interval [95.35, 104.65] is symmetric around 100 by construction. Any apparent asymmetry in real-world reporting usually comes from using a skewed distribution or a different interval-construction method (like bootstrapping), not from this z-based formula.
Also known as
confidence intervalCI calculatorconfidence interval formula95 confidence interval calculatorstatistics confidence interval