Confidence Interval Calculator
This calculator estimates a two-sided interval for either a mean with known population standard deviation or a binary population proportion. The mean uses a normal z interval; the proportion uses the Wilson score method without continuity correction, at 90%, 95%, or 99% confidence.
By Dr. Hassan Khames EliwaLast updated
Result
- Margin of error
- 1.959964
- Standard error
- 1
- Method
- Two-sided z interval; population sigma known
How it works
Mean: population sigma must actually be known
For a sample mean m, known population standard deviation sigma, and sample size n, standard error = sigma / √n. Margin of error = z × standard error. The endpoints are m minus the margin and m plus the margin. The z critical values used internally are approximately 1.644854, 1.959964, and 2.575829 for 90%, 95%, and 99% confidence respectively.
This is not a Student t calculator. A standard deviation estimated from the same sample is not a known population sigma. Use a t interval when sigma is unknown and the assumptions for that method are reasonable. For an exact small-sample z interpretation, the sampled population should be normal; larger samples can support an approximation, but severe skew and dependence need further assessment.
Proportion: Wilson, not the simple Wald interval
Enter integer successes x and integer trials n. With p = x/n and d = 1 + z²/n, the Wilson center is (p + z²/(2n))/d. Its half-width is z × √(p(1−p)/n + z²/(4n²))/d. Subtract and add that half-width to the center. The center generally differs from the observed proportion, especially near zero or one.
NIST describes Wilson intervals as an alternative to the elementary normal approximation. Wilson remains bounded within zero and one and behaves more sensibly with extreme counts. Its coverage is still approximate, not a universal guarantee. Both modes assume a defensible sampling design and independent observations. No finite population correction, weighting, clustering adjustment, or missing-data correction is applied here.
Worked example
Scenario 1: a calibrated process mean
Suppose a random sample of 100 measurements has mean 50, and independent process knowledge establishes population sigma as 10. Choose mean mode and 95% confidence. Standard error is 10/√100 = 1. The margin is 1.959964 after display rounding. The reported interval is 48.040036 to 51.959964. It estimates the population mean, not the range containing 95% of individual measurements.
Scenario 2: forty positive responses
Choose proportion mode with 40 successes in 100 independent responses at 95% confidence. The observed proportion is 40%. Wilson shifts the center to 40.369935%, and the reported endpoints are 30.940129% and 49.799741%. The unequal distances from 40% are expected. Do not replace the Wilson center with the observed proportion and retain the same half-width; that would be a different interval.
Expert tips
Common mistakes
- Do not insert the sample standard deviation into the known-sigma field just because it is available. The uncertainty in estimating sigma is precisely what a t method addresses.
- Do not treat repeated readings of the same item as independent people or units. Correlation between observations can make the nominal sample size substantially overstate the available information.
- Do not interpret a mean interval as a prediction interval for the next observation. Individual outcomes vary more than the estimated mean, and prediction needs additional variance terms.
Frequently asked questions
What does 95% confidence mean?
It describes long-run performance of the interval procedure under its assumptions. Across repeated comparable random samples, about 95% of intervals would contain the fixed parameter. It does not assign a 95% probability to the fixed parameter after observing this particular interval.
Can I use zero successes?
Yes. Wilson accepts counts from zero through n, including all failures and all successes. It produces a nonzero uncertainty range at the boundaries rather than asserting that the true proportion is known exactly.
Which confidence levels are available?
The supported levels are exactly 90%, 95%, and 99%, all two-sided. Other levels and one-sided bounds are intentionally not inferred from arbitrary text. Select a supported level rather than entering a significance percentage.
Does Wilson fix selection bias?
No. A mathematically improved interval cannot correct a biased recruitment process, inaccurate measurement, or systematic nonresponse. Those problems concern what the observations represent, not just the width of the sampling interval.
Why require positive sigma?
A zero sigma asserts that every population measurement is identical. That degenerate situation does not need this inferential tool. Positive sigma up to one trillion is required; the mean may be negative, zero, or positive within the stated bounds.
Related calculators
Related guides
MathSample size and confidence intervals without the jargonSeparate sample planning from interval estimation, and make the assumptions visible before reporting a margin of error.15 November 2026 · 8 min read
MathStandard deviation without the jargonThe average tells you the centre. Standard deviation helps describe the spread, provided you know what the data represents.14 November 2026 · 7 min read
MathPercentages people get wrong: change, difference and pointsThe denominator determines the answer. Learn to distinguish percentage change, symmetric difference and percentage-point movements.14 November 2026 · 7 min readSources and standards
About the author
Dr. Hassan Khames Eliwa holds a PhD in Construction & Built Environment and has more than 20 years of international project controls experience. He is Director of Eliwa Project Controls Limited in Auckland and founder of PMMilestone.org and PMMilestone.com.
Buy me a coffee