Confidence Interval Calculator
A confidence interval estimates a plausible range for the true population mean from your sample.
Enter Values
Before you rely on this: First-pass guide only. Verify safety-critical or regulated work against the relevant standards, your project requirements and a qualified professional.
How to use this calculator
- Enter your sample mean, sample standard deviation, and sample size.
- Enter the confidence level you want as a percentage (95 is the most common; try 90 or 99).
- Read off the confidence interval, its lower and upper bounds, and the margin of error.
How it works
A confidence interval estimates a plausible range for the true population mean from your sample. The calculator first finds the standard error, SE = s / √n, which measures how much the sample mean is expected to vary from the population mean. It then multiplies SE by a critical value z* to get the margin of error, ME = z* × SE.
The interval is x̄ ± ME. The critical value z* comes from the standard normal distribution for the chosen confidence level (for example 1.96 for 95%, 1.645 for 90%, 2.576 for 99%). This z-interval assumes the population standard deviation is known or the sample is large; for small samples with an estimated standard deviation a t-interval is more precise.
Worked example
95% confidence interval for a mean. A sample of n = 25 measurements has a mean x̄ = 100 and standard deviation s = 15. The standard error is SE = 15 / √25 = 3. At 95% confidence the critical value is z* = 1.96, so the margin of error is 1.96 × 3 = 5.8799. The confidence interval is 100 ± 5.8799, i.e. 94.1201 to 105.8799 — you can be 95% confident the true population mean lies in this range.
Common mistakes
- Confusing the standard deviation with the standard error. Divide the standard deviation by √n first — the interval uses the standard error, which shrinks as the sample grows.
- Entering the confidence level as a decimal (0.95) instead of a percentage (95). Use the whole-number percentage.
- Using a z-interval for a very small sample. With roughly n < 30 and an estimated standard deviation, a t-interval is wider and more appropriate; this tool uses the normal (z) approximation.
Frequently asked questions
What is the z value for a 95% confidence interval?
For a two-sided 95% confidence interval the critical value is z* = 1.96 (more precisely 1.959964). For 90% it is 1.645 and for 99% it is 2.576. The calculator uses these values automatically based on the confidence level you enter.
Should I use a z-interval or a t-interval?
Use a z-interval when the population standard deviation is known or the sample is large (roughly n ≥ 30). Use a t-interval for a small sample when you only have the sample standard deviation — it is a little wider to account for the extra uncertainty. This tool computes the z (normal) interval.
How does the margin of error change with sample size?
The margin of error is z* × s / √n, so it shrinks in proportion to 1/√n. To halve the margin of error you need about four times as many observations, all else equal.
Related tools
- Standard Error of the Mean Calculator
- Standard Deviation Calculator
- Z-Score Calculator
- Margin of Error Calculator
- Binomial Probability Calculator
- Conditional Probability Calculator
Explore more in Maths, Education & Science.
Tip: Enter any known values to calculate the remaining results.
All calculations run in your browser. Your inputs are never saved or transmitted.



