ToolBark
Math

Confidence Interval Calculator

Calculate confidence intervals for a mean instantly — no stats software needed

Sample Parameters

Distribution

Result

95% Confidence Interval
64.5663to72.4337

x̄ ± 3.9337   |   t* = 2.0227, df = 39

Interval Visualisation

64.5768.50 (mean)72.43
Sample Mean (x̄)68.5000
Standard Deviation (s)12.3000
Sample Size (n)40
Degrees of Freedom (df)39
Critical Value (t*)2.0227
Standard Error (SE)1.9448
Margin of Error (ME)± 3.9337
Lower Bound64.5663
Upper Bound72.4337

Formula

CI = x̄ ± t* × (s / √n)

   = 68.5000 ± 2.0227 × (12.3000 / √40)

   = 68.5000 ± 2.0227 × 1.9448

   = 68.5000 ± 3.9337

   = [64.5663, 72.4337]

Compare Across Confidence Levels

Levelt*LowerUpper± ME
80%1.30465.96571.035±2.535
85%1.46865.64471.356±2.856
90%1.68565.22371.777±3.277
95%2.02364.56672.434±3.934
99%2.70863.23473.766±5.266

How It Works

Confidence Interval
A range of values that likely contains the true population mean. A 95% CI means: if we repeated the study many times, 95% of such intervals would capture the true mean.
Margin of Error (ME)
ME = critical value × standard error. It determines how wide the interval is around the sample mean.
Standard Error (SE)
SE = s / √n. Measures how much the sample mean is expected to vary from the population mean. A larger n gives a smaller SE.
t vs Z Distribution
Use the t-distribution when the population SD is unknown (the usual case). Use Z only when σ is known or n is very large (≥ 30+). t gives a wider, more conservative interval.
Critical Value
The number of standard errors needed to capture the desired probability in the tails. For 95% Z: z* ≈ 1.96. The t* is slightly larger for small samples.
Degrees of Freedom (df)
For a one-sample t-interval, df = n − 1. More degrees of freedom means the t-distribution is closer to the normal distribution.

Common Critical Values

Levelz*α/2
80%1.2820.100
85%1.4400.075
90%1.6450.050
95%1.9600.025
99%2.5760.005
About

A confidence interval calculator estimates the range that likely contains the true population mean based on your sample data. Enter the sample mean, standard deviation, and sample size, then choose a confidence level (80%–99%). The calculator uses the t-distribution for small samples (recommended when population SD is unknown) or the Z-distribution for large or known-variance situations, computing the margin of error and exact interval bounds.

FAQ
When should I use the t-distribution instead of Z?+

Use the t-distribution whenever the population standard deviation is unknown — which is almost always the case in practice. The t-distribution is slightly wider than Z, especially for small samples (n < 30), providing a more conservative and accurate interval. The Z-distribution is appropriate only when the population SD is known or the sample size is very large (n ≥ 200+).

What does a 95% confidence interval actually mean?+

A 95% CI means that if you repeated the sampling process many times and computed the interval each time, approximately 95% of those intervals would contain the true population mean. It does NOT mean there is a 95% probability that the true mean falls in this specific interval — the mean is a fixed (unknown) value, not a random variable.

How does sample size affect the confidence interval?+

Larger sample sizes produce narrower confidence intervals. The standard error (SE = s / √n) shrinks as n grows, which reduces the margin of error. Doubling your sample size narrows the interval by a factor of √2 ≈ 1.41. This is why precision comes at a steep cost: halving the interval width requires four times as many observations.

What inputs do I need for this calculator?+

You need three values: (1) the sample mean (x̄), the average of your observations; (2) the sample standard deviation (s), how spread out the data is; and (3) the sample size (n), the count of observations. You also choose a confidence level — 95% is the most common in research — and whether to use t or Z critical values.

Related tools