Confidence Interval Calculator
Enter a sample mean, a standard deviation and a sample size for a normal (z) interval, or enter successes and n for a Wald z interval for a proportion. Choose 90%, 95%, 99%, or a custom confidence level. The critical value z is the standard-normal quantile for that level, computed from the same error-function approximation as the z-score calculator. This page does not compute a Student-t interval, a Wilson interval, or a prediction interval for a new observation. When n is small, a warning is shown so you do not treat a z interval as a t interval.
Confidence interval calculator
On this calculator: Ctrl+Enter copies the result, Shift+Alt+L copies a link to the current inputs, Shift+Alt+R resets, Shift+Alt+P opens Print / Save PDF. These shortcuts do not run while you type in a field, except Ctrl+Enter.
Saved results on this device
Stored only in this browser, not on our servers.
How to use the confidence interval calculator – mean and proportion (z)
- Choose a mean or a proportion. A mean needs the sample mean, a standard deviation and n. A proportion needs the number of successes and n.
- Pick a confidence level. 90%, 95%, 99%, or a custom percent strictly between 0 and 100.
- Read the interval as a z interval. The bounds are mean ± z × (s/√n), or p̂ ± z √(p̂(1−p̂)/n) capped at 0 and 1. If n is under 30, a t interval is often preferred; the page says so rather than inventing t critical values.
Formulas on this page
For a mean, the normal (z) interval is
mean ± z × (s / √n),
where s is the (population or planning) standard deviation you type and n is the sample size, n ≥ 2. The margin of error is z × (s/√n) and the standard error is s/√n.
For a proportion, the Wald interval is
p̂ ± z √(p̂(1 − p̂)/n),
with p̂ = successes / n, then capped so the bounds stay inside [0, 1].
z is the standard-normal critical value for the chosen two-sided level: about 1.645 at 90%, 1.960 at 95%, and 2.576 at 99%. A custom level uses the inverse of Φ, the same CDF as the z-score calculator (Abramowitz and Stegun 7.1.26 plus bisection).
A z interval for a mean with a sample s and a small n is only an approximation to the t interval. This page will not invent t tables. It reports the z interval and, when n is under 30, a visible warning.
How this sits next to sample size and z-scores
If you are planning n for a chosen margin of error, use the sample-size calculator — that page inverts the same identities. If you only need z or a p-value for one observation, use the z-score calculator. The average and standard-deviation calculators can produce the mean and s from a list if you have the raw figures.
Worked figures
- Mean 50, s = 10, n = 25, 95%: SE = 2, z ≈ 1.960, interval ≈ 46.080 to 53.920.
- 40 successes in 100 trials, 95%: p̂ = 0.4, SE ≈ 0.0490, interval ≈ 0.304 to 0.496.
Those identities are unit-tested against the same TypeScript functions the browser runs. There is no live statistical API. Copy result, Copy link and Reset work as on the other GenericCalc tools. Report a mistake from the about box if a figure disagrees with a hand check.
Frequently asked questions
What is a 95% z interval for a mean of 50, SD 10, n = 25?
The standard error is 10/√25 = 2. z ≈ 1.960, so the margin is about 3.920 and the interval is about 46.080 to 53.920. Because n is under 30, the page also warns that a t interval is often preferred. That is the default example.
Is this a Student-t interval?
No. It always uses a normal z critical value. A t interval needs degrees of freedom and a t quantile, which are not computed here.
What is a Wald interval?
The simple proportion interval p̂ ± z √(p̂(1−p̂)/n). It is an approximation. If np or n(1−p) is under 5, a warning is shown. Wilson or exact binomial intervals are not computed.
Where does z come from?
It is Φ⁻¹(1 − α/2) for a 100(1−α)% level, found by bisection on the same Φ used for p-values on the z-score page.
Does 95% mean the mean lies in this interval with probability 95%?
The usual teaching interpretation is about the method: in repeated samples, about 95% of such intervals would contain the population value, if the model is right. A single interval either covers or it does not.
Can I use a sample s in place of σ?
You can type it, and the algebra is the same, but the exact small-sample interval for a mean is a t interval. The warning for n < 30 is there for that reason.
Is this a prediction interval?
No. A prediction interval for a new observation is wider. This page only reports a confidence interval for a mean or a proportion.
Related calculators
Z-Score Calculator – Standard Score and Normal p-Value
Z-score from a value, a value from z, or a standard-normal p-value.
Sample Size Calculator – Mean or Proportion, z Approximation
Planning sample size for a mean or a proportion, using a z approximation and a target margin.
Standard Deviation Calculator – Sample and Population
Sample and population standard deviation, variance, mean and standard error.
Average Calculator – Mean, Median, Mode and Range
Mean, median, mode, range and more for any list of numbers.
Probability Calculator – Complement, Independent Events, nPr and nCr
Complement and odds, independent and/or, at least one in n trials, and nPr / nCr.
Sources and references
About this calculator
Written and maintained by Rashid Mehmood, founder of CalcTen. The formulas are unit-tested against hand-worked examples, and the content is reviewed whenever product sizes or guidance change. Last updated and reviewed 15 November 2026. See our editorial policy. If you spot a mistake, report it.
Results are calculated from the numbers you enter and shown with the working. Rounding is applied only when displaying results. Grade and GPA scales, and weighting rules, vary by school, so confirm with your institution. Read the disclaimer.