Confidence Interval Calculator for a Mean (t or z) with Margin of Error
Enter the sample mean, standard deviation, sample size and confidence level. You get the interval, margin of error, critical value and standard error.
- Nothing you type is stored
- Free
- No signup
Confidence interval
(49.8408, 54.9592)
- Margin of error
- ± 2.5592
- Critical value
- 2.0639
- Standard error
- 1.24
- Degrees of freedom
- 24
t critical value with n − 1 degrees of freedom: right when the SD is estimated from the sample.
Show working
- SE = s / √n = 6.2 / √25 = 1.24
- α = 1 − 95% = 0.05, t(0.975, df = 24) = 2.063899
- ME = 2.063899 × 1.24 = 2.559234
- CI = 52.4 ± 2.559234 = (49.840766, 54.959234)
How to use
- Enter the sample mean, standard deviation and sample size n.
- Choose the confidence level (95% is common).
- Pick t (σ unknown, the usual case) or z (σ known) and read the interval.
Good to know
Formula: mean ± critical value × SD/√n. With the t method the critical value is t(1 − α/2, n − 1), computed exactly from the t distribution (e.g. t = 2.228 for 95% with 10 df); with z it is 1.960 for 95%.
Use t when the SD comes from the sample itself, which is almost always. Use z only when the population SD is truly known. For large n (over about 100) the two give nearly the same answer.
Meaning: if you repeated the study many times, about 95% of the 95% intervals built this way would contain the true mean. It is not a 95% chance that this particular interval contains it.
Questions
What is the 95% confidence interval for mean 52.4, SD 6.2, n = 25?
SE = 6.2/5 = 1.24, t(0.975, 24) = 2.064, margin = 2.559, so the interval is about 49.84 to 54.96.
Should I use t or z?
t when σ is estimated from your sample (the normal case); z when the population σ is known in advance.
How do I make the interval narrower?
Collect a larger sample (the margin shrinks with √n) or accept a lower confidence level.
Does the data need to be normal?
For small samples, roughly yes. For larger samples (n ≥ 30) the interval is usually fine even if the data is a bit skewed.
Is my data stored or sent anywhere?
No. The calculation runs entirely in your browser; nothing you type leaves your device.