DATA - stays on your device
AI Assistant

Confidence Interval Calculator

Compute 90%, 95%, or 99% confidence intervals — visualize margin of error instantly

A confidence interval (CI) gives a range of plausible values for a population parameter based on sample data. A 95% CI means: if you repeated the study many times, 95% of the intervals computed would contain the true population mean.

The margin of error is half the width of the interval — it shrinks as sample size grows and widens as variability increases. The standard 95% level balances precision with the cost of collecting data; 99% intervals are wider but give more confidence, while 90% intervals are narrower but miss the true value more often.

Enter your sample mean, standard deviation, and sample size, then ask the AI to compute the interval and plot it as an error bar.

Graph

FAQ

What is a confidence interval?
A confidence interval is a range of values, computed from sample data, that is likely to contain the true population parameter. A 95% CI does not mean there is a 95% probability the true mean is in this specific interval — it means the procedure produces intervals that contain the true mean 95% of the time across repeated samples.
What does "95% confidence" actually mean?
It means the method is correct 95% of the time. If you drew 100 different random samples and computed a CI for each, about 95 of those intervals would contain the true population mean. The remaining 5 would miss it. For any single interval you compute, the true mean either is or is not inside it.
Why are some confidence intervals wider than others?
Three factors control the width: (1) confidence level — higher confidence (99% vs 90%) requires a wider interval; (2) standard deviation — more variable data produces wider intervals; (3) sample size — larger samples narrow the interval. Width = 2 × z* × (σ / √n).
How does sample size affect a confidence interval?
Sample size appears under a square root in the margin-of-error formula: ME = z* × σ / √n. Quadrupling your sample size cuts the margin of error in half. Doubling the sample size only reduces the margin by about 30%. Large initial investments in sample size have diminishing returns.
What is the difference between a confidence interval and a p-value?
A p-value answers "is this effect statistically significant?" with a yes/no threshold. A confidence interval answers "how large is the effect and how precisely do we know it?" CIs are generally more informative — a significant p-value with a wide CI means the effect exists but is poorly estimated.
When should I use a t-interval instead of a z-interval?
Use the t-distribution when the population standard deviation is unknown and your sample size is small (n < 30). Use the z-distribution when σ is known or when n ≥ 30 (by the central limit theorem, the t and z values converge). For most practical cases with n ≥ 30, either works.