Confidence Interval Calculator

Build a confidence interval around a sample mean, with the margin of error and standard error shown.

Details

A whole number of 2 or more.

95% confidence interval

95.1 – 104.9

x̄ ± margin of error

Give or take4.9
Range95.1 to 104.9

This works out a confidence interval around a sample mean: the range your true value is likely to sit within.

Enter the sample mean, standard deviation, sample size and confidence level, and it returns the interval and the margin of error either side.

What a confidence interval is

A confidence interval is a range rather than a single number. Instead of claiming the average is exactly 50, it says the true average is probably somewhere between 48.04 and 51.96.

That honesty is the point. You measured a sample, not everyone, so the sample mean is an estimate. The interval says how much wobble that estimate carries.

Two things narrow it: a larger sample and less variable data. Sample size helps by the square root, so quadrupling your sample halves the interval, not the other way round.

Mean 50, standard deviation 10, sample of 100
10 ÷ √100standard error = 1
× 1.96z for 95% confidence
=
±1.96margin of error
→ 48.04 to 51.96the interval

Dividing by the square root of the sample size is what makes bigger samples help. Going from 100 to 400 responses halves the margin, from ±1.96 to ±0.98.

What to enter

Sample mean (x̄)
The average of the data you actually collected.
Sample standard deviation (s)
How spread out your sample is. The standard deviation calculator will work it out from raw numbers.
Sample size (n)
How many observations you have. This drives the width of the interval more than anything else you control.
Confidence level
Usually 95%. Higher confidence produces a wider interval, because being more certain means claiming less precision.

What changes the width

Larger sample
Narrows it, by the square root. Four times the data halves the margin.
More variable data
Widens it. A noisy measurement gives a vaguer estimate.
Higher confidence
Widens it. 99% confidence needs a bigger net than 95%.
z = 1.96
The multiplier for 95% confidence. For 99% it is 2.576, and for 90% it is 1.645.

What this assumes

The sample is genuinely random. A biased sample produces a confident interval around the wrong number.

For small samples the t-distribution is more appropriate than z, and it gives a slightly wider interval.

How to calculate a confidence interval

Work out the standard error, scale it by the confidence multiplier, then add and subtract from the mean.

interval = mean ± ( z × s ÷ √n )
s ÷ √n
The standard error: how much the sample mean itself wobbles
z
1.96 for 95% confidence
  1. Find the standard error. Divide the standard deviation by the square root of the sample size. 10 ÷ √100 = 1.

  2. Multiply by the confidence multiplier. 1 × 1.96 = 1.96. That is your margin of error.

  3. Add and subtract from the mean. 50 − 1.96 and 50 + 1.96 gives 48.04 to 51.96.

  4. Report the range, not just the middle. The interval is the finding. Quoting only the mean throws away the information about how reliable it is.

See a worked example: a sample of 100 with a mean of 50
Sample mean
50
Standard deviation
10
Sample size
100
Confidence
95%

Standard error: 10 ÷ √100 = 10 ÷ 10 = 1.

Margin of error: 1.96 × 1 = 1.96.

Interval: 50 ± 1.96, so 48.04 to 51.96.

Collecting 400 observations instead would halve the margin to ±0.98, giving 49.02 to 50.98.

48.04 to 51.96

Frequently asked questions

Problems people actually run into

Saying there is a 95% chance the true value is in this range

This is the classic misstatement, and it appears constantly in write-ups and news reports. The confidence belongs to the procedure, not to the one interval you happen to have produced.

The safe phrasing is: 'we are 95% confident the true value lies between X and Y', which describes the method's long-run reliability rather than claiming a probability about a fixed number.

Reporting the mean without the interval

A headline of 'average satisfaction was 7.2' hides whether that came from 12 people or 12,000, and whether the honest range was 6.9 to 7.5 or 4.1 to 10.

The interval is what tells a reader how much weight the number can carry. Dropping it makes a shaky estimate look identical to a solid one.

Results are estimates for general information only and are not professional financial, medical, or legal advice. Read our full disclaimer.

Last updated: September 4, 2026