★ STATISTICS · CONFIDENCE INTERVALS · MEAN & PROPORTION

Confidence Interval Calculator: Mean, 90/95/99% CI

On the defaults — sample mean 100, sample standard deviation 15, sample size 25, 95% confidence — the critical value is 2.0639, the standard error is 3.00, the margin of error is 6.19, and the confidence interval is [93.81, 106.19]. Put in a sample mean, a standard deviation and a sample size and the calculator finds the confidence interval for the population mean — t-distribution for a sample standard deviation, z for a known population standard deviation, or a proportion. This one finds the interval in one place: the p-value-calculator page is the P-VALUE — the significance of a test statistic — not the range a mean probably sits in; the z-score-calculator page is the Z-SCORE — how many standard deviations one value is from the mean — not the interval for the mean itself; the standard-deviation-calculator page is the SPREAD — how far the numbers sit from the mean — not how precisely the mean is known; and the mean-median-mode-calculator page is the AVERAGE — the mean, median and mode of a dataset — not the uncertainty around that average. No confidence interval calculator exists on this site — this one is the first.

1337

Confidence Interval calculator

A confidence interval is the sample mean plus or minus a margin of error: the critical value from the t or z curve, times the standard error. On the defaults — mean 100, sample standard deviation 15, sample size 25, 95% confidence — the critical value is 2.0639, the standard error is 3.00, the margin of error is 6.19, and the interval is [93.81, 106.19]. A 95% interval means that if you repeated the sampling many times, about 95% of the intervals built this way would contain the true mean — it is not a 95% chance that this one interval contains it, and it is not the range that 95% of the data falls in. The calculator shows all of it with notes, never hides it.

The sample mean — the average of your sample — the default is 100.

The sample standard deviation — the spread — the default is 15. It cannot be negative.

The sample size — how many observations — the default is 25. Two or above for a t interval.

The confidence level — 90, 95 or 99 percent. Higher confidence means a wider interval.

t uses the sample standard deviation; z uses a known population standard deviation; proportion uses a sample proportion.

The sample proportion — only used in proportion mode — the default is 0.50.

95% CI [93.81, 106.19]; margin of error 6.19; critical value 2.0639; SE 3.0095% CI [93.81, 106.19]; margin of error 6.19; critical value 2.0639; SE 3.0095% CI [93.81, 106.19]; margin of error 6.19; critical value 2.0639; SE 3.00. The critical value is 2.0639 (unrounded 2.063898562), the standard error is 3.00, and the margin of error is 6.19 (unrounded 6.191695685).

Sample mean: 100.00

Sample SD: 15.00

Sample size (n): 25

Confidence: 95%

Mode: t (sample SD)

Critical value: 2.0639

Critical value (unrounded): 2.063898562

Standard error: 3.00

Margin of error: 6.19

Lower limit: 93.81

Upper limit: 106.19

Verdict: 95% CI [93.81, 106.19] — with 95% confidence the true mean lies between 93.81 and 106.19

Branch: 90% confidence: 90% CI [94.87, 105.13]; margin of error 5.13; critical value 1.7109; SE 3.00

Branch: 99% confidence: 99% CI [91.61, 108.39]; margin of error 8.39; critical value 2.7969; SE 3.00

Branch: n = 100: 95% CI [97.02, 102.98]; margin of error 2.98; critical value 1.9842; SE 1.50

Branch: sd = 10: 95% CI [95.87, 104.13]; margin of error 4.13; critical value 2.0639; SE 2.00

Branch: mean = 50: 95% CI [43.81, 56.19]; margin of error 6.19; critical value 2.0639; SE 3.00

Branch: z mode (population SD): 95% CI [94.12, 105.88]; margin of error 5.88; critical value 1.9600; SE 3.00

Branch: n = 10: 95% CI [89.27, 110.73]; margin of error 10.73; critical value 2.2622; SE 4.74

Branch: 90%, n = 400, sd = 20, mean = 250: 90% CI [248.35, 251.65]; margin of error 1.65; critical value 1.6487; SE 1.00

Branch: proportion 0.60, n = 400: 95% CI [0.55, 0.65]; margin of error 0.05; critical value 1.9600; SE 0.02

Branch: proportion 0.50, n = 100, 99%: 99% CI [0.37, 0.63]; margin of error 0.13; critical value 2.5758; SE 0.05

Reverse: Smallest sample size for the margin of error to be at most 5: 38

Reverse: Smallest sample size for the margin of error to be at most 5 (rounded): 38

At 38 the figures are: 95% CI [95.07, 104.93]; margin of error 4.93; critical value 2.0262; SE 2.43 (unrounded lower 95.069623, upper 104.930377, margin of error 4.930377, critical value 2.026192, SE 2.433321)

At the lower neighbor the figures are: 95% CI [95.00, 105.00]; margin of error 5.00; critical value 2.0281; SE 2.47 (unrounded lower 94.998751, upper 105.001249, margin of error 5.001249, critical value 2.028094, SE 2.465985)

At the upper neighbor the figures are: 95% CI [95.14, 104.86]; margin of error 4.86; critical value 2.0244; SE 2.40 (unrounded lower 95.137562, upper 104.862438, margin of error 4.862438, critical value 2.024394, SE 2.401922)

Reverse verdict: STEP

Reverse: Largest standard deviation for the margin of error to be at most 5: 12

Reverse: Largest standard deviation for the margin of error to be at most 5 (rounded): 12

At 12 the figures are: 95% CI [95.05, 104.95]; margin of error 4.95; critical value 2.0639; SE 2.40 (unrounded lower 95.046643, upper 104.953357, margin of error 4.953357, critical value 2.063899, SE 2.400000)

At the upper neighbor the figures are: 95% CI [94.84, 105.16]; margin of error 5.16; critical value 2.0639; SE 2.50 (unrounded lower 94.840254, upper 105.159746, margin of error 5.159746, critical value 2.063899, SE 2.500000)

At the lower neighbor the figures are: 95% CI [95.25, 104.75]; margin of error 4.75; critical value 2.0639; SE 2.30 (unrounded lower 95.253033, upper 104.746967, margin of error 4.746967, critical value 2.063899, SE 2.300000)

Reverse verdict: STEP

Reverse: Largest sample size for the margin of error to stay at least 6: 26

Reverse: Largest sample size for the margin of error to stay at least 6 (rounded): 26

At 26 the figures are: 95% CI [93.94, 106.06]; margin of error 6.06; critical value 2.0595; SE 2.94 (unrounded lower 93.941369, upper 106.058631, margin of error 6.058631, critical value 2.059539, SE 2.941742)

At the upper neighbor the figures are: 95% CI [94.07, 105.93]; margin of error 5.93; critical value 2.0555; SE 2.89 (unrounded lower 94.066198, upper 105.933802, margin of error 5.933802, critical value 2.055529, SE 2.886751)

At the lower neighbor the figures are: 95% CI [93.81, 106.19]; margin of error 6.19; critical value 2.0639; SE 3.00 (unrounded lower 93.808304, upper 106.191696, margin of error 6.191696, critical value 2.063899, SE 3.000000)

Reverse verdict: STEP

Reverse: Smallest standard deviation for the margin of error to be at least 8: 19.5

Reverse: Smallest standard deviation for the margin of error to be at least 8 (rounded): 19.5

At 19.5 the figures are: 95% CI [91.95, 108.05]; margin of error 8.05; critical value 2.0639; SE 3.90 (unrounded lower 91.950796, upper 108.049204, margin of error 8.049204, critical value 2.063899, SE 3.900000)

At the lower neighbor the figures are: 95% CI [92.16, 107.84]; margin of error 7.84; critical value 2.0639; SE 3.80 (unrounded lower 92.157185, upper 107.842815, margin of error 7.842815, critical value 2.063899, SE 3.800000)

At the upper neighbor the figures are: 95% CI [91.74, 108.26]; margin of error 8.26; critical value 2.0639; SE 4.00 (unrounded lower 91.744406, upper 108.255594, margin of error 8.255594, critical value 2.063899, SE 4.000000)

Reverse verdict: STEP

Reverse: Smallest sample size for a proportion margin of error of at most 0.05: 385

Reverse: Smallest sample size for a proportion margin of error of at most 0.05 (rounded): 385

At 385 the figures are: 95% CI [0.45, 0.55]; margin of error 0.05; critical value 1.9600; SE 0.03 (unrounded lower 0.450055, upper 0.549945, margin of error 0.049945, critical value 1.959964, SE 0.025482)

At the lower neighbor the figures are: 95% CI [0.45, 0.55]; margin of error 0.05; critical value 1.9600; SE 0.03 (unrounded lower 0.449991, upper 0.550009, margin of error 0.050009, critical value 1.959964, SE 0.025516)

At the upper neighbor the figures are: 95% CI [0.45, 0.55]; margin of error 0.05; critical value 1.9600; SE 0.03 (unrounded lower 0.450120, upper 0.549880, margin of error 0.049880, critical value 1.959964, SE 0.025449)

Reverse verdict: STEP

Reverse: Smallest mean for the lower limit to be at least 90: 96.5

Reverse: Smallest mean for the lower limit to be at least 90 (rounded): 96.5

At 96.5 the figures are: 95% CI [90.31, 102.69]; margin of error 6.19; critical value 2.0639; SE 3.00 (unrounded lower 90.308304, upper 102.691696, margin of error 6.191696, critical value 2.063899, SE 3.000000)

At the lower neighbor the figures are: 95% CI [89.81, 102.19]; margin of error 6.19; critical value 2.0639; SE 3.00 (unrounded lower 89.808304, upper 102.191696, margin of error 6.191696, critical value 2.063899, SE 3.000000)

At the upper neighbor the figures are: 95% CI [90.81, 103.19]; margin of error 6.19; critical value 2.0639; SE 3.00 (unrounded lower 90.808304, upper 103.191696, margin of error 6.191696, critical value 2.063899, SE 3.000000)

Reverse verdict: STEP

Edge: Sample size 1: Sample size — 2 or above.

Edge: Sample size 2: 95% CI [−34.77, 234.77]; margin of error 134.77; critical value 12.7062; SE 10.61 (unrounded lower −34.769653, upper 234.769653, margin of error 134.769653, critical value 12.706205, SE 10.606602)

Edge: Standard deviation 0: 95% CI [100.00, 100.00]; margin of error 0.00; critical value 2.0639; SE 0.00 (unrounded lower 100.000000, upper 100.000000, margin of error 0.000000, critical value 2.063899, SE 0.000000)

Edge: 99% confidence: 99% CI [91.61, 108.39]; margin of error 8.39; critical value 2.7969; SE 3.00 (unrounded lower 91.609181, upper 108.390819, margin of error 8.390819, critical value 2.796940, SE 3.000000)

Edge: z mode, n = 1: 95% CI [70.60, 129.40]; margin of error 29.40; critical value 1.9600; SE 15.00 (unrounded lower 70.600540, upper 129.399460, margin of error 29.399460, critical value 1.959964, SE 15.000000)

Edge: Mean -50: 95% CI [−56.19, −43.81]; margin of error 6.19; critical value 2.0639; SE 3.00 (unrounded lower −56.191696, upper −43.808304, margin of error 6.191696, critical value 2.063899, SE 3.000000)

Edge: Proportion 0: 95% CI [0.00, 0.00]; margin of error 0.00; critical value 1.9600; SE 0.00 (unrounded lower 0.000000, upper 0.000000, margin of error 0.000000, critical value 1.959964, SE 0.000000)

Edge: Proportion 1: 95% CI [1.00, 1.00]; margin of error 0.00; critical value 1.9600; SE 0.00 (unrounded lower 1.000000, upper 1.000000, margin of error 0.000000, critical value 1.959964, SE 0.000000)

Edge: Sample size 10,000: 95% CI [99.71, 100.29]; margin of error 0.29; critical value 1.9602; SE 0.15 (unrounded lower 99.705970, upper 100.294030, margin of error 0.294030, critical value 1.960201, SE 0.150000)

Edge: z mode, 90%: 90% CI [95.07, 104.93]; margin of error 4.93; critical value 1.6449; SE 3.00 (unrounded lower 95.065439, upper 104.934561, margin of error 4.934561, critical value 1.644854, SE 3.000000)

Edge: Mean 100.5, sd 15.25, n = 30: 95% CI [94.81, 106.19]; margin of error 5.69; critical value 2.0452; SE 2.78 (unrounded lower 94.805556, upper 106.194444, margin of error 5.694444, critical value 2.045230, SE 2.784256)

95% CI [93.81, 106.19]; margin of error 6.19; critical value 2.0639; SE 3.00. On the defaults the 95% interval is [93.81, 106.19]. The smallest sample size for a margin of error of at most 5 is 38 — and at 37 the margin of error is 5.00.

90% confidence: 90% CI [94.87, 105.13]; margin of error 5.13; critical value 1.7109; SE 3.00.

99% confidence: 99% CI [91.61, 108.39]; margin of error 8.39; critical value 2.7969; SE 3.00.

n = 100: 95% CI [97.02, 102.98]; margin of error 2.98; critical value 1.9842; SE 1.50.

sd = 10: 95% CI [95.87, 104.13]; margin of error 4.13; critical value 2.0639; SE 2.00.

mean = 50: 95% CI [43.81, 56.19]; margin of error 6.19; critical value 2.0639; SE 3.00.

z mode (population SD): 95% CI [94.12, 105.88]; margin of error 5.88; critical value 1.9600; SE 3.00.

n = 10: 95% CI [89.27, 110.73]; margin of error 10.73; critical value 2.2622; SE 4.74.

90%, n = 400, sd = 20, mean = 250: 90% CI [248.35, 251.65]; margin of error 1.65; critical value 1.6487; SE 1.00.

proportion 0.60, n = 400: 95% CI [0.55, 0.65]; margin of error 0.05; critical value 1.9600; SE 0.02.

proportion 0.50, n = 100, 99%: 99% CI [0.37, 0.63]; margin of error 0.13; critical value 2.5758; SE 0.05.

Reverse: The smallest sample size for the margin of error to be no more than 5 is 38; at 38 the figures are 95% CI [95.07, 104.93]; margin of error 4.93; critical value 2.0262; SE 2.43 (unrounded lower 95.069623, upper 104.930377, margin of error 4.930377, critical value 2.026192, SE 2.433321); at the lower neighbor the figures are 95% CI [95.00, 105.00]; margin of error 5.00; critical value 2.0281; SE 2.47 (unrounded lower 94.998751, upper 105.001249, margin of error 5.001249, critical value 2.028094, SE 2.465985) — verdict: STEP. Reverse: The largest standard deviation for the margin of error to be no more than 5 is 12; at 12 the figures are 95% CI [95.05, 104.95]; margin of error 4.95; critical value 2.0639; SE 2.40 (unrounded lower 95.046643, upper 104.953357, margin of error 4.953357, critical value 2.063899, SE 2.400000); at the upper neighbor the figures are 95% CI [94.84, 105.16]; margin of error 5.16; critical value 2.0639; SE 2.50 (unrounded lower 94.840254, upper 105.159746, margin of error 5.159746, critical value 2.063899, SE 2.500000) — verdict: STEP. Reverse: The largest sample size for the margin of error to stay at or above 6 is 26; at 26 the figures are 95% CI [93.94, 106.06]; margin of error 6.06; critical value 2.0595; SE 2.94 (unrounded lower 93.941369, upper 106.058631, margin of error 6.058631, critical value 2.059539, SE 2.941742); at the upper neighbor the figures are 95% CI [94.07, 105.93]; margin of error 5.93; critical value 2.0555; SE 2.89 (unrounded lower 94.066198, upper 105.933802, margin of error 5.933802, critical value 2.055529, SE 2.886751) — verdict: STEP. Reverse: The smallest standard deviation for the margin of error to reach at least 8 is 19.5; at 19.5 the figures are 95% CI [91.95, 108.05]; margin of error 8.05; critical value 2.0639; SE 3.90 (unrounded lower 91.950796, upper 108.049204, margin of error 8.049204, critical value 2.063899, SE 3.900000); at the lower neighbor the figures are 95% CI [92.16, 107.84]; margin of error 7.84; critical value 2.0639; SE 3.80 (unrounded lower 92.157185, upper 107.842815, margin of error 7.842815, critical value 2.063899, SE 3.800000) — verdict: STEP. Reverse: The smallest sample size for a proportion margin of error of no more than 0.05 is 385; at 385 the figures are 95% CI [0.45, 0.55]; margin of error 0.05; critical value 1.9600; SE 0.03 (unrounded lower 0.450055, upper 0.549945, margin of error 0.049945, critical value 1.959964, SE 0.025482); at the lower neighbor the figures are 95% CI [0.45, 0.55]; margin of error 0.05; critical value 1.9600; SE 0.03 (unrounded lower 0.449991, upper 0.550009, margin of error 0.050009, critical value 1.959964, SE 0.025516) — verdict: STEP. Reverse: The smallest mean for the lower bound to reach at least 90 is 96.5; at 96.5 the figures are 95% CI [90.31, 102.69]; margin of error 6.19; critical value 2.0639; SE 3.00 (unrounded lower 90.308304, upper 102.691696, margin of error 6.191696, critical value 2.063899, SE 3.000000); at the lower neighbor the figures are 95% CI [89.81, 102.19]; margin of error 6.19; critical value 2.0639; SE 3.00 (unrounded lower 89.808304, upper 102.191696, margin of error 6.191696, critical value 2.063899, SE 3.000000) — verdict: STEP.

Edges: Sample size 1 gives Sample size — 2 or above.. Sample size 2 gives 95% CI [−34.77, 234.77]; margin of error 134.77; critical value 12.7062; SE 10.61 (unrounded lower −34.769653, upper 234.769653, margin of error 134.769653, critical value 12.706205, SE 10.606602). Standard deviation 0 gives 95% CI [100.00, 100.00]; margin of error 0.00; critical value 2.0639; SE 0.00 (unrounded lower 100.000000, upper 100.000000, margin of error 0.000000, critical value 2.063899, SE 0.000000). 99% confidence gives 99% CI [91.61, 108.39]; margin of error 8.39; critical value 2.7969; SE 3.00 (unrounded lower 91.609181, upper 108.390819, margin of error 8.390819, critical value 2.796940, SE 3.000000). z mode with n = 1 gives 95% CI [70.60, 129.40]; margin of error 29.40; critical value 1.9600; SE 15.00 (unrounded lower 70.600540, upper 129.399460, margin of error 29.399460, critical value 1.959964, SE 15.000000). Mean -50 gives 95% CI [−56.19, −43.81]; margin of error 6.19; critical value 2.0639; SE 3.00 (unrounded lower −56.191696, upper −43.808304, margin of error 6.191696, critical value 2.063899, SE 3.000000). Proportion 0 gives 95% CI [0.00, 0.00]; margin of error 0.00; critical value 1.9600; SE 0.00 (unrounded lower 0.000000, upper 0.000000, margin of error 0.000000, critical value 1.959964, SE 0.000000). Proportion 1 gives 95% CI [1.00, 1.00]; margin of error 0.00; critical value 1.9600; SE 0.00 (unrounded lower 1.000000, upper 1.000000, margin of error 0.000000, critical value 1.959964, SE 0.000000). Sample size 10,000 gives 95% CI [99.71, 100.29]; margin of error 0.29; critical value 1.9602; SE 0.15 (unrounded lower 99.705970, upper 100.294030, margin of error 0.294030, critical value 1.960201, SE 0.150000). z mode at 90% gives 90% CI [95.07, 104.93]; margin of error 4.93; critical value 1.6449; SE 3.00 (unrounded lower 95.065439, upper 104.934561, margin of error 4.934561, critical value 1.644854, SE 3.000000). Mean 100.5, SD 15.25, n 30 gives 95% CI [94.81, 106.19]; margin of error 5.69; critical value 2.0452; SE 2.78 (unrounded lower 94.805556, upper 106.194444, margin of error 5.694444, critical value 2.045230, SE 2.784256).

What does [93.81, 106.19] mean?

It means the sample mean is 100, and the true population mean probably sits somewhere between 93.81 and 106.19 — the interval is the sample mean plus or minus a margin of error of 6.19, and 6.19 is the critical value of 2.0639 times the standard error of 3.00. A 95% interval means that if you repeated the sampling many times, about 95% of the intervals built this way would contain the true mean. It does not mean there is a 95% chance this one interval contains it, and it does not mean 95% of the data falls inside it — the data spreads wider than the interval, because the interval is about the mean, not about the observations.

Three things to check before you trust the number

t or z, and which standard deviation you have. The t-distribution is for a sample standard deviation, with 24 degrees of freedom on the defaults — n minus 1 — and the critical value is 2.0639. The z-distribution is for a known population standard deviation, and the critical value is 1.9600. Using z with a sample standard deviation understates the uncertainty, and the gap matters most when the sample is small: at n = 10 the t critical value is 2.2622 against z at 1.9600.

The width comes from three places, and only one of them is free. The margin of error is the critical value times the standard error, and the standard error is the standard deviation over the square root of n. A bigger sample shrinks it — four times the sample halves the error — a tighter spread shrinks it, and a higher confidence level widens it. The cheapest way to narrow an interval is usually more data, not more confidence.

95% is a property of the method, not of this interval. Saying the interval is [93.81, 106.19] at 95% confidence does not say the true mean is inside it with 95% probability — the true mean is either inside or it is not. What 95% says is that the method gets it right about 95 times out of 100. Report the interval itself — [93.81, 106.19], unrounded [93.808304315, 106.191695685] — not just the confidence level.

Worked example

On the defaults: sample mean 100, sample standard deviation 15, sample size 25, 95% confidence.

  1. Degrees of freedom: 25 − 1 = 24.
  2. Critical value: t(24, 0.975) = 2.0639 (unrounded 2.063898562).
  3. Standard error: 15 ÷ √25 = 15 ÷ 5 = 3.00.
  4. Margin of error: 2.0639 × 3.00 = 6.19 (unrounded 6.191695685).
  5. Lower limit: 100 − 6.19 = 93.81 (unrounded 93.808304315).
  6. Upper limit: 100 + 6.19 = 106.19 (unrounded 106.191695685).
  7. Smallest sample size for a margin of error of at most 5: 38 — at 38 the margin of error is 4.93 (unrounded 4.930377), and at 37 it is 5.00 (unrounded 5.001249).
  8. Largest standard deviation for a margin of error of at most 5: 12 — at 12 the margin of error is 4.95 (unrounded 4.953357), and at 12.5 it is 5.16 (unrounded 5.159746).

Every branch, checked

The reverses, worked backwards

What the defaults assume

The defaults are a sample mean of 100, a sample standard deviation of 15, a sample size of 25, at 95% confidence — a small survey or a lab batch, the classic textbook case — and the interval is [93.81, 106.19], the margin of error 6.19, the critical value 2.0639. They are a starting point, not a benchmark: your sample may be 400 observations with a spread of 20, or a proportion of 0.60 from 400 people, and the right answer for you is the one your numbers describe. Change the mean, the spread, the size, the confidence and the mode to your own and the calculator recomputes instantly. Take the critical value, times the standard error, plus and minus the mean.

These notes repeat in every explainer section because this page is built to be read start to finish: the defaults are one sample, not a standard; t or z, and which standard deviation you have; the width comes from three places, and only one of them is free; and 95% is a property of the method, not of this interval.

Output · formula · meaning

OutputFormulaWhat it means
Sample meaninput100.00.
Sample SDinput15.00.
Sample size (n)input25.
Confidenceinput95%.
Modeinputt (sample SD).
Critical valuet(24, 0.975)2.0639.
Critical value (unrounded)9dp2.063898562.
Standard errorSD / √n3.00.
Margin of errorcritical value × SE6.19.
Lower limitmean − margin of error93.81.
Upper limitmean + margin of error106.19.
Verdictin words95% CI [93.81, 106.19] — with 95% confidence the true mean lies between 93.81 and 106.19.
Reverse: Smallest sample size for the margin of error to be at most 5step38: 95% CI [95.07, 104.93]; margin of error 4.93; critical value 2.0262; SE 2.43 (unrounded lower 95.069623, upper 104.930377, margin of error 4.930377, critical value 2.026192, SE 2.433321).
Reverse: Largest standard deviation for the margin of error to be at most 5step12: 95% CI [95.05, 104.95]; margin of error 4.95; critical value 2.0639; SE 2.40 (unrounded lower 95.046643, upper 104.953357, margin of error 4.953357, critical value 2.063899, SE 2.400000).
Reverse: Largest sample size for the margin of error to stay at least 6step26: 95% CI [93.94, 106.06]; margin of error 6.06; critical value 2.0595; SE 2.94 (unrounded lower 93.941369, upper 106.058631, margin of error 6.058631, critical value 2.059539, SE 2.941742).
Reverse: Smallest standard deviation for the margin of error to be at least 8step19.5: 95% CI [91.95, 108.05]; margin of error 8.05; critical value 2.0639; SE 3.90 (unrounded lower 91.950796, upper 108.049204, margin of error 8.049204, critical value 2.063899, SE 3.900000).
Reverse: Smallest sample size for a proportion margin of error of at most 0.05step385: 95% CI [0.45, 0.55]; margin of error 0.05; critical value 1.9600; SE 0.03 (unrounded lower 0.450055, upper 0.549945, margin of error 0.049945, critical value 1.959964, SE 0.025482).
Reverse: Smallest mean for the lower limit to be at least 90step96.5: 95% CI [90.31, 102.69]; margin of error 6.19; critical value 2.0639; SE 3.00 (unrounded lower 90.308304, upper 102.691696, margin of error 6.191696, critical value 2.063899, SE 3.000000).
90% confidencesame model90% CI [94.87, 105.13]; margin of error 5.13; critical value 1.7109; SE 3.00.
99% confidencesame model99% CI [91.61, 108.39]; margin of error 8.39; critical value 2.7969; SE 3.00.
n = 100same model95% CI [97.02, 102.98]; margin of error 2.98; critical value 1.9842; SE 1.50.
sd = 10same model95% CI [95.87, 104.13]; margin of error 4.13; critical value 2.0639; SE 2.00.
mean = 50same model95% CI [43.81, 56.19]; margin of error 6.19; critical value 2.0639; SE 3.00.
z mode (population SD)same model95% CI [94.12, 105.88]; margin of error 5.88; critical value 1.9600; SE 3.00.
n = 10same model95% CI [89.27, 110.73]; margin of error 10.73; critical value 2.2622; SE 4.74.
90%, n = 400, sd = 20, mean = 250same model90% CI [248.35, 251.65]; margin of error 1.65; critical value 1.6487; SE 1.00.
proportion 0.60, n = 400same model95% CI [0.55, 0.65]; margin of error 0.05; critical value 1.9600; SE 0.02.
proportion 0.50, n = 100, 99%same model99% CI [0.37, 0.63]; margin of error 0.13; critical value 2.5758; SE 0.05.
Sample size 1same modelSample size — 2 or above..
Sample size 2same model95% CI [−34.77, 234.77]; margin of error 134.77; critical value 12.7062; SE 10.61 (unrounded lower −34.769653, upper 234.769653, margin of error 134.769653, critical value 12.706205, SE 10.606602).
Standard deviation 0same model95% CI [100.00, 100.00]; margin of error 0.00; critical value 2.0639; SE 0.00 (unrounded lower 100.000000, upper 100.000000, margin of error 0.000000, critical value 2.063899, SE 0.000000).
99% confidencesame model99% CI [91.61, 108.39]; margin of error 8.39; critical value 2.7969; SE 3.00 (unrounded lower 91.609181, upper 108.390819, margin of error 8.390819, critical value 2.796940, SE 3.000000).
z mode, n = 1same model95% CI [70.60, 129.40]; margin of error 29.40; critical value 1.9600; SE 15.00 (unrounded lower 70.600540, upper 129.399460, margin of error 29.399460, critical value 1.959964, SE 15.000000).
Mean -50same model95% CI [−56.19, −43.81]; margin of error 6.19; critical value 2.0639; SE 3.00 (unrounded lower −56.191696, upper −43.808304, margin of error 6.191696, critical value 2.063899, SE 3.000000).
Proportion 0same model95% CI [0.00, 0.00]; margin of error 0.00; critical value 1.9600; SE 0.00 (unrounded lower 0.000000, upper 0.000000, margin of error 0.000000, critical value 1.959964, SE 0.000000).
Proportion 1same model95% CI [1.00, 1.00]; margin of error 0.00; critical value 1.9600; SE 0.00 (unrounded lower 1.000000, upper 1.000000, margin of error 0.000000, critical value 1.959964, SE 0.000000).
Sample size 10,000same model95% CI [99.71, 100.29]; margin of error 0.29; critical value 1.9602; SE 0.15 (unrounded lower 99.705970, upper 100.294030, margin of error 0.294030, critical value 1.960201, SE 0.150000).
z mode, 90%same model90% CI [95.07, 104.93]; margin of error 4.93; critical value 1.6449; SE 3.00 (unrounded lower 95.065439, upper 104.934561, margin of error 4.934561, critical value 1.644854, SE 3.000000).
Mean 100.5, sd 15.25, n = 30same model95% CI [94.81, 106.19]; margin of error 5.69; critical value 2.0452; SE 2.78 (unrounded lower 94.805556, upper 106.194444, margin of error 5.694444, critical value 2.045230, SE 2.784256).

Who uses this

Accuracy & limitations

The calculator finds the t critical value by bisection on the t curve, good to about 1e-10, and the z critical value by Acklam's inverse normal, good to about 2e-9 — every critical value on this page rounds to the same 6 decimals as the exact value, and every figure is checked against an independent model. What it cannot do is check that your sample is random or your data roughly normal: the interval assumes the sample mean is near-normal, so on a heavily skewed distribution or a tiny sample the coverage is approximate, not exact, and a proportion interval near 0 or 1 is better served by a Wilson interval than this Wald one. It also takes summary numbers, not raw data — a whole dataset needs the mean-median-mode-calculator page or the standard-deviation-calculator page first. And the page prints the unrounded figures so the rounding does not mislead you — the critical value is 2.0639, unrounded 2.063898562, and the interval is [93.81, 106.19], unrounded [93.808304315, 106.191695685].

Cite this calculator

A confidence interval is the sample mean plus or minus a margin of error: the critical value from the t or z curve, times the standard error. On the defaults — mean 100, sample standard deviation 15, sample size 25, 95% confidence — the critical value is 2.0639, the standard error is 3.00, the margin of error is 6.19, and the interval is [93.81, 106.19]. Smallest sample size for the margin of error to be at most 5: 38. Largest standard deviation for the margin of error to be at most 5: 12. Largest sample size for the margin of error to stay at least 6: 26. Smallest standard deviation for the margin of error to be at least 8: 19.5. Smallest sample size for a proportion margin of error of at most 0.05: 385. Smallest mean for the lower limit to be at least 90: 96.5. Source: Bright Side Kit, brightoolbox.com.

Embed this calculator

Frequently asked questions

How do I calculate a confidence interval?

Take the sample mean, add and subtract the margin of error — the critical value times the standard error. On the defaults, mean 100, sd 15, n 25 at 95%: the critical value is 2.0639, the standard error is 3.00, the margin of error is 6.19, and the interval is [93.81, 106.19]. Put your own numbers into the calculator above and it works out the interval, the critical value and the margin of error.

What is a 95% confidence interval?

It is the range the sample mean plus or minus the margin of error gives — [93.81, 106.19] on the defaults — built so that about 95% of intervals from repeated sampling contain the true mean. It is not a 95% chance this one interval contains it, and it is not the range 95% of the data falls in.

When do I use t and when do I use z?

Use t when you have a sample standard deviation — the default, with n minus 1 degrees of freedom — and z when the population standard deviation is known. At n = 25 the t critical value is 2.0639 against z at 1.9600, and the gap is biggest for small samples: at n = 10, t is 2.2622.

How does sample size change the confidence interval?

The standard error is the standard deviation over the square root of n, so four times the sample halves the error. At n = 25 the margin of error is 6.19; at n = 100 it is 2.98, and the interval narrows from [93.81, 106.19] to [97.02, 102.98].

What is the margin of error?

The margin of error is the half-width of the interval — the critical value times the standard error. On the defaults it is 6.19, so the interval is 100 ± 6.19. A smaller margin of error means a more precise estimate, and it shrinks with a bigger sample or a tighter spread.

How do I calculate a confidence interval for a proportion?

Use the sample proportion and the standard error of a proportion — the square root of p̂(1 − p̂) over n — times the z critical value. A proportion of 0.60 from 400 people gives [0.55, 0.65] at 95%. Switch the calculator above to proportion mode and it does it for any p̂ and n.

How big a sample do I need for a margin of error of 5?

On the defaults — sd 15 at 95% — the smallest sample size for a margin of error of at most 5 is 38: at 38 the margin of error is 4.93, and at 37 it is 5.00. The calculator's reverses list the sample size for each common target.

What does the critical value mean?

It is the point on the t or z curve that cuts off the tails beyond your confidence level — t(24, 0.975) = 2.0639 for 95% with 24 degrees of freedom. A higher confidence level needs a larger critical value, and a larger critical value means a wider interval.