Statistics • Core Flagship Pillar

Confidence Interval Calculator

Calculate confidence intervals for population means and sample proportions with custom confidence levels ($90\%, 95\%, 99\%$), critical values ($z^*, t^*$), standard errors, and interactive shaded normal bell curves.

|
Last Updated: September 2026
|
Central Limit Theorem & Student-t Standards Verified
Quick-Select Confidence Interval Scenarios Standard Benchmarks

Sample Parameters

Normal Distribution & Shaded Confidence Band
Confidence Interval
[96.32, 103.68]
x̄ ± Margin of Error
Margin of Error (ME)
± 3.675
Half-width of interval
Critical Value (z* / t*)
1.9600
Normal standard score
Standard Error (SE)
1.8750
s / √n
CI

Step-by-Step Margin of Error & Boundary Proof

Direct Answer & Overview
Verified Educational Guide

How to Calculate a Confidence Interval

To find a confidence interval: 1. Calculate Standard Error: SE = s / √n (or √[p(1-p)/n]). 2. Look up critical value for chosen confidence level (e.g. z* = 1.96 for 95%). 3. Compute Margin of Error: ME = Critical Value × SE. 4. Confidence Interval = [Point Estimate − ME, Point Estimate + ME].

Primary Mathematical Formula Standard Mathematical Model
Standard Equation
ƒ(x)
Q.E.D.
CI=xˉ±z∗⋅(σn),Proportion CI=p^±z∗⋅p^(1−p^)n\text{CI} = \bar{x} \pm z^* \cdot \left( \frac{\sigma}{\sqrt{n}} \right), \quad \text{Proportion CI} = \hat{p} \pm z^* \cdot \sqrt{\frac{\hat{p}(1 - \hat{p})}{n}}
Evaluated with exact mathematical formulation • Rigorously verified
Exact Formula
Input Parameters
Required
1
Sample Mean (x̄) or Sample Proportion (p̂)
2
Standard deviation (s or σ), sample size (n), and confidence level (90%, 95%, 99%)
Expected Outputs
Calculated
Lower & Upper confidence bounds [LCL, UCL], Margin of Error (ME)
Critical value (z* or t*), Standard Error (SE), and shaded Gaussian curve canvas
Worked Numerical Example
Instant Verification
Sample mean x̄ = 100, s = 15, n = 64, 95% Confidence
→ SE = 15 / √64 = 1.875; z* = 1.960; ME = 1.960 × 1.875 = 3.675; CI = 100 ± 3.675
95% Confidence Interval: [96.325, 103.675] | ME = ± 3.675

Confidence Interval Definition & Frequentist Interpretation

In inferential statistics, a Confidence Interval (CI) provides an estimated range likely to contain an unknown population parameter with a quantifiable degree of certainty:

Point Estimate (Center)
x̄ (Sample Mean) or p̂ (Sample Proportion)

The single best empirical guess of the true population parameter from your sample.

Margin of Error (Radius)
ME = Critical Value × Standard Error

The maximum expected sampling discrepancy bounded by the chosen confidence level.

Z-Interval vs. Student’s t-Interval Comparison

Interval Type When Applicable Critical Value Metric
Z-IntervalPopulation σ is known, or large sample size n ≥ 30z* (Standard Normal distribution)
Student's t-IntervalPopulation σ unknown (use sample s), small n < 30t* (Student-t with df = n − 1)
Proportion IntervalBinomial survey data (np ≥ 10 and n(1-p) ≥ 10)z* with SE = √[p̂(1−p̂)/n]

Real-World Applications of Confidence Intervals

Political Election Polling

Polling agencies report candidate support as 52% ± 3.1% (95% CI: [48.9%, 55.1%]), showing whether the lead is statistically significant.

Pharmaceutical Clinical Trials

FDA regulators require 95% confidence intervals for drug efficacy to prove cholesterol reductions outperform placebo baselines.

A/B Testing in Software

Tech companies calculate conversion rate confidence intervals to ensure UI redesign revenue lifts are not random variance.

Step-by-Step Worked Numerical Solutions

Example 1: 95% Confidence Interval for IQ Sample n = 64, σ = 15

Problem: A random sample of 64 students has mean IQ x̄ = 104 with population SD σ = 15. Find the 95% confidence interval.

1. Standard Error SE = σ / √n = 15 / √64 = 15 / 8 = 1.875.
2. 95% Critical Value z* = 1.960.
3. Margin of Error ME = 1.960 × 1.875 = 3.675.
4. Lower Bound = 104 − 3.675 = 100.325.
5. Upper Bound = 104 + 3.675 = 107.675.
Result: 95% CI = [100.33, 107.68]

Common Pitfalls & Mistakes

Misinterpreting 95% Probability

The 95% applies to the sampling procedure across repeated studies, NOT the probability of the fixed population mean.

Using Z Instead of t on Small Samples

When σ is unknown and n < 30, using z* instead of t* underestimates the margin of error and produces overly narrow intervals.

Dividing by n Instead of √n

Standard error requires the square root of sample size √n in the denominator, not n.

Fact-Checked & Verified • Computational Accuracy Standards
Updated August 2026 • Editorial Policy
Authored By
Sanjay Samanta

Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

Reviewed & Verified By
Academic Review Board

Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

Found an error or have an improvement suggestion? Report a calculation issue

Frequently Asked Questions

What is a Confidence Interval (CI) in statistics?
A Confidence Interval is a range of plausible values for an unknown population parameter (such as mean μ or proportion p), computed from sample data at a specified confidence level (e.g. 95%). If the sampling experiment were repeated 100 times, 95 of the resulting intervals would contain the true population parameter.
When should you use a Z-interval vs. a Student's t-interval?
Use a Z-interval when the population standard deviation σ is known, or when the sample size is large (n ≥ 30) via the Central Limit Theorem. Use a Student's t-interval when σ is unknown and estimated using sample standard deviation s from small samples (n < 30).
What is the mathematical formula for the Margin of Error (ME)?
For a population mean: ME = Critical Value × Standard Error = z* × (σ / √n) or t* × (s / √n). For a sample proportion: ME = z* × √[p̂(1 − p̂) / n].
What are standard critical values (z*) for 90%, 95%, and 99% confidence?
For a two-tailed standard normal distribution: 90% Confidence -> z* = 1.645; 95% Confidence -> z* = 1.960; 99% Confidence -> z* = 2.576; 99.9% Confidence -> z* = 3.291.
Why does increasing the sample size (n) narrow the confidence interval?
Because sample size appears in the denominator of the standard error formula (SE = s / √n). Quadrupling the sample size (e.g. from 100 to 400) cuts the standard error and margin of error in half.
What is the most common misconception regarding a 95% confidence interval?
The common error is stating "there is a 95% probability that the true mean lies inside this specific interval." In frequentist statistics, the true mean is a fixed constant, not a random variable. The 95% refers to the long-run capture rate of the statistical procedure.