Confidence Interval Calculator
Compute Z- and T-based confidence intervals with margin of error, critical value, and an interactive visualization.
Sample details
Updates as you typeStart with an example (optional)
Interval type
Which interval fits your sample? ?
Your sample
Sample mean (x̄) ?
—
Population standard deviation (σ)
?
—
Sample size (n) ?
—
Confidence level
How confident do you want to be? ?
Custom confidence level
—
%
Formula
CI
=
x̄
±
z*
·
σ
√n
CI
=
x̄
±
t*df
·
s
√n
- x̄
- Sample mean
- σ / s
- Population (Z) or sample (T) standard deviation
- n
- Sample size
- z* / t*
- Critical value for the chosen confidence level
- df
- Degrees of freedom = n − 1 (T-interval only)
Worked example — your numbers
- Critical value: —
- Standard error: SE = — = —
- Margin of error: E = — = —
- Interval: —
- CI = —
Common z* critical values
| Confidence level | z* |
|---|---|
| 90% | 1.645 |
| 95% | 1.960 |
| 99% | 2.576 |
The Z-interval assumes you know the population σ or have a large sample (n ≥ 30 is the usual cutoff). When σ is unknown and n is small, the T-interval is more honest — it uses a wider critical value that accounts for the extra uncertainty in estimating σ from the sample itself.