Math
Confidence Interval Calculator
Enter your sample mean, standard deviation, and sample size to get the margin of error and confidence interval bounds.
Confidence Interval
Interval (x̄ ± E)
—
Interval [lower, upper]
—
Lower Bound
—
Upper Bound
—
Calculation Details
Standard Error
—
Margin of Error (E)
—
z Critical Value
—
Confidence Level
—
Formulas
Standard Error (SE)
SE = s / √n
Estimated variability of the sample mean
Margin of Error (E)
E = z × SE
Half-width of the confidence interval
Confidence Interval
x̄ ± E
Lower and upper bounds around the sample mean
z (95%)
1.960
Most common critical value for confidence intervals
z (99%)
2.576
Wider interval, higher assurance
z Critical Values
Standard confidence levels
80% → 1.282 · 90% → 1.645 · 95% → 1.960 · 99% → 2.576 · 99.9% → 3.291
Why these numbers?
Each z value marks how many standard errors from the mean capture the stated percentage of a standard normal distribution — e.g. 95% of the area under the curve lies within ±1.960 standard errors.
This calculator uses the z-distribution, which is most accurate for n ≥ 30 or when the population standard deviation is known.
Interpreting Results
Confidence level: Describes how often the method produces an interval containing the true mean over many repeated samples — not the probability for this single interval.
Sample size: Larger n shrinks the standard error and narrows the interval, all else being equal.
Small samples: For n < 30 with an unknown population standard deviation, a t-distribution based interval is more accurate than this z-based estimate.
FAQ
Frequently asked questions.
What is a confidence interval?
A confidence interval is a range of values, calculated from sample data, that is likely to contain the true population parameter — such as the population mean. Instead of reporting a single estimate (like a sample mean of 100), a confidence interval reports a range (like 95.1 to 104.9) along with a confidence level that describes how reliable the estimation procedure is. It is one of the most widely used tools in statistics for expressing uncertainty around an estimate.
What does a 95% confidence level actually mean?
A 95% confidence level means that if you repeated the same sampling process many times and built a confidence interval each time, about 95% of those intervals would contain the true population mean. It does NOT mean there is a 95% probability that the true mean falls within this one specific interval you calculated — the true mean is a fixed value, and a given interval either contains it or it doesn't. The 95% figure describes the long-run reliability of the method, not the probability for a single result.
How is the margin of error calculated?
The margin of error (E) is calculated by multiplying a critical value (z) by the standard error of the mean (SE). The standard error is the sample standard deviation divided by the square root of the sample size: SE = s / √n. The margin of error is then E = z × SE, and the confidence interval is the sample mean plus or minus that margin: x̄ ± E. A larger critical value (for a higher confidence level) or a larger standard error (from more variable data) both widen the margin of error.
Why does a larger sample size narrow the confidence interval?
Increasing the sample size (n) reduces the standard error because SE = s / √n — dividing by a larger square root shrinks the result. A smaller standard error directly produces a smaller margin of error, and therefore a narrower, more precise confidence interval. This is why researchers often increase sample size when they need a tighter estimate: quadrupling the sample size roughly halves the width of the confidence interval, all else being equal.
When should I use the z-distribution versus the t-distribution?
The z-distribution is appropriate when the sample size is large (typically n ≥ 30) or when the population standard deviation is already known, since the sampling distribution of the mean approximates a normal distribution in those cases. For smaller samples with an unknown population standard deviation, the t-distribution is more accurate because it accounts for the extra uncertainty introduced by estimating the standard deviation from limited data — it has fatter tails that widen the interval appropriately. This calculator uses the z-score approach, which is a reasonable approximation for n ≥ 30 but may understate the true interval width for small samples.
How do I choose the right confidence level?
The most common confidence level is 95%, which balances precision with reliability for most research and business applications. A 99% or 99.9% confidence level produces a wider interval but gives you greater assurance that the interval captures the true value, which is useful in high-stakes fields like medicine or manufacturing quality control. A lower confidence level such as 80% or 90% produces a narrower, more precise-looking interval but comes with a higher chance that the interval misses the true population mean.
Last updated: August 17, 2026