Confidence Interval Calculator
- Standard error SE = σ / √n = 15 / √25 = 3
- Critical value t* (95%) = 2.064
- Margin of error ME = t* × SE = 2.064 × 3 = 6.192
- Confidence interval = (93.808, 106.192)
| Statistic | Value |
|---|---|
| Standard error | 3 |
| t* | 2.064 |
| Margin of error | 6.192 |
| Lower bound | 93.808 |
| Upper bound | 106.192 |
| Distribution | t-distribution (n < 30) |
CI = x̄ ± z*·SE
How Confidence Intervals Work
A confidence interval is a range of plausible values for an unknown population parameter, typically the mean μ. Instead of reporting a single sample mean as "the answer," statisticians report an interval plus a confidence level such as 95%. A 95% confidence interval means that if you repeated sampling many times and built an interval each time, about 95% of those intervals would contain the true population mean. It does not mean there is a 95% probability the true mean lies in one specific interval — the parameter is fixed; the interval is random.
The general formula for a mean confidence interval is: CI = x̄ ± (critical value) × SE, where x̄ is the sample mean and SE is the standard error. When the population standard deviation σ is known (rare in practice), SE = σ / √n and the critical value comes from the z distribution. When σ is estimated by the sample standard deviation s (the usual case), SE = s / √n. For small samples (typically n < 30), the t distribution with n − 1 degrees of freedom replaces z because estimating σ adds uncertainty — the t curve has heavier tails.
Critical values at common levels: z* = 1.645 for 90%, z* = 1.96 for 95%, z* = 2.576 for 99%. The margin of error ME = critical × SE is half the interval width. Wider intervals are more likely to capture μ but less precise. Narrow intervals require larger n or lower confidence. Doubling the sample size shrinks SE by √2, not by half — sample size has diminishing returns on precision.
Worked example: sample mean x̄ = 50, sample SD s = 10, n = 25, 95% confidence. SE = 10 / √25 = 2. Since n = 25 ≥ 30 threshold is borderline; with n = 25 many texts still use t with df = 24. t* ≈ 2.064, ME ≈ 2.064 × 2 = 4.128, CI ≈ (45.87, 54.13). This calculator auto-selects t vs z based on sample size and shows each arithmetic step.
Confidence intervals complement hypothesis tests: if a 95% CI excludes a hypothesized mean, a two-sided test at α = 0.05 would reject that value. Link to the sample size calculator to plan n before collecting data, and to the z-score calculator for the critical values involved. Descriptive summaries from the statistics calculator supply x̄ and s as inputs.
Assumptions matter: random sampling, independent observations, and approximate normality of the underlying data (or sufficiently large n via the Central Limit Theorem for means). For proportions, a different formula applies — this tool focuses on mean intervals. Report intervals as (lower, upper) with the confidence level stated explicitly, e.g. "95% CI: (45.9, 54.1)."
Examples
| Example | Result |
|---|---|
| x̄=50, s=10, n=100, 95% CI | ≈ (48.04, 51.96) |
| x̄=100, s=15, n=25, 95% CI | ≈ (93.8, 106.2) |
| x̄=0, s=1, n=30, 95% CI | ≈ (−0.36, 0.36) |
| ME with z*=1.96, SE=2 | ME = 3.92 |
| x̄=75, s=5, n=36, 99% CI | wider than 95% |
| SE = 12 / √144 | SE = 1 |
| x̄=200, s=40, n=16, 90% CI | uses t with df=15 |
Frequently asked questions
When sample size n is below 30 and the population standard deviation is estimated from the sample, t critical values with n − 1 degrees of freedom are used.
About 95% of similarly constructed intervals from repeated sampling would contain the true population mean.
Increase sample size, reduce variability, or accept a lower confidence level such as 90% instead of 95%.