Skip to main content
Calcimator

Confidence Interval Calculator

Calculate the confidence interval for a population mean using sample data. Uses z-based approximation suitable for large samples.

About this calculator

This calculator builds a confidence interval around Sample Mean using the z-based formula Margin of Error = z × (Standard Deviation / √Sample Size) (lines 9, 15), where the z-value comes from inverting the standard normal CDF at the chosen Confidence Level (line 13). Margin of Error, Standard Error, Z-Value, and Interval Width are all completely unaffected by Sample Mean — none of their formulas ever reference it (lines 9-18); Sample Mean only shifts where the interval is centered, via Lower Bound and Upper Bound, which it dominates. Confidence Level, similarly, has zero effect on Standard Error, since Standard Error depends only on Standard Deviation and Sample Size — but it's the single input driving Z-Value, and by extension Margin of Error and Interval Width.

Interval Width is always exactly twice Margin of Error, since Upper Bound minus Lower Bound algebraically cancels Sample Mean and leaves 2 × Margin of Error (line 18) — a fixed relationship, not a separate calculation. This calculator does not switch to a t-distribution for small samples: it always uses the z-approximation regardless of Sample Size, even down to the field's allowed minimum of 2, where a t-based interval would normally be noticeably wider than what this calculator reports.

Inputs

Results

Lower Bound

48.04

Upper Bound

51.96

Margin of Error

1.96

Standard Error1
Z-Value1.96
Interval Width3.92
How to Use This Calculator
  1. Enter Sample Mean (x̄), Standard Deviation (σ or s), and Sample Size (n).
  2. Set Confidence Level (%).
  3. Review Lower Bound, Upper Bound, and Margin of Error.
  4. Use Standard Error and Z-Value to inform your decision.
  5. Use the chart to visualize the results and explore different scenarios by adjusting inputs.

How the result changes with Sample Mean (x̄)

Sample Mean (x̄)Lower BoundUpper BoundMargin of Error
2523.0426.961.96
3836.0439.961.96
7573.0476.961.96
125123.04126.961.96

What each input means

Sample Mean (x̄)
The arithmetic mean of your sample data.
Standard Deviation (σ or s)
Population or sample standard deviation. Use sample SD if population SD is unknown.
Sample Size (n)
Number of observations in the sample. Larger samples yield narrower intervals.
Confidence Level (%)
Desired confidence level as a percentage. Common choices: 90%, 95%, 99%.

How this is calculated

Worked example, using the default values

  1. Identify Input Parameters
    4 parameters
    Sample Mean (x̄) = 50, Standard Deviation (σ or s) = 10, Sample Size (n) = 100, Confidence Level (%) = 95 = 4 input(s) provided
  2. Calculate Lower Bound
    Lower Bound
    48.0396 = 48.0396
  3. Calculate Upper Bound
    Upper Bound
    51.9604 = 51.9604
  4. Calculate Margin of Error
    Margin of Error
    1.9604 = 1.9604
  5. Calculate Standard Error
    Standard Error
    1 = 1
  6. Calculate Z-Value
    Z-Value
    1.9604 = 1.9604

Engine last updated . Checked against 2 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.

Frequently Asked Questions

Does Sample Mean affect the Margin of Error?

No. Margin of Error is built purely from Standard Deviation, Sample Size, and Confidence Level (lines 9, 15) — Sample Mean never appears in that formula; it only shifts where the resulting interval is centered, through Lower Bound and Upper Bound.

Why is Interval Width always exactly double the Margin of Error?

Because Upper Bound and Lower Bound are Sample Mean plus and minus Margin of Error, so subtracting one from the other cancels Sample Mean and leaves exactly 2 × Margin of Error (line 18) — it's a fixed algebraic relationship, not a number computed separately.

Does Confidence Level affect the Standard Error shown?

No — Standard Error is computed purely as Standard Deviation divided by the square root of Sample Size (line 9), with no reference to Confidence Level at all; Confidence Level only affects the Z-Value used to convert that Standard Error into a Margin of Error.

Does this calculator use a t-distribution for a small sample size?

No — it always uses the z-based normal approximation (line 13), regardless of how small Sample Size is set, even at the field's allowed minimum of 2. A true small-sample interval would normally use a wider t-distribution-based critical value instead.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Math & Statistics.