How this calculation works
Choose the parameter and the interval procedure deliberately. For means, keep known-population-spread z intervals separate from estimated-spread t intervals; a labeled legacy comparison retains the original n=30 method switch. For binary proportions, compare Wilson with the original Wald approximation. Inspect the interval ingredients, degrees of freedom and standardized critical-value SVG.
Mean: x̄ ± critical×spread/√n; Wald: p̂ ± z√[p̂(1−p̂)/n]; Wilson uses a score-inversion center and half-widthA worked example
Mean 100, known standard deviation 15 and n = 100 gives a 95% interval of approximately 97.060054 to 102.939946.
Good to know
Independent suitable random sampling is required. A confidence level describes a repeated-sampling procedure, not a posterior probability for a fixed parameter or an interval for an individual future outcome. Wald can leave [0,1] or collapse at boundary counts. Wilson is approximate rather than exact binomial. No weighted, clustered or finite-population survey correction. Student t requires a normal model or a justified approximation.
Reference: NIST: confidence limits for the mean (opens in a new tab) ↗
Decide which population quantity the interval describes
A mean interval estimates a population average using a sample mean and a spread measure. A proportion interval estimates a common success probability using counts of binary outcomes. Their standard errors use different information, and changing a label does not turn one calculation into the other. Choose the parameter before entering the corresponding summary values.
The result table keeps the estimate, standard error, critical multiplier, interval center and limits separate. In a mean interval the center is the entered sample mean. A Wilson proportion interval generally has a center shifted away from the observed sample fraction. Its displayed margin is a half-width about that method-specific center, rather than an assertion that every confidence interval is symmetric about the original estimate.
The One sample mean equivalence TOST calculator uses a matching interval and two one-sided tests to examine practical equivalence, rather than treating a nonsignificant difference as equality.
Keep known population spread separate from an estimated spread
The original known-spread tool remains available as normal z mode. It requires a population standard deviation σ that is actually known, along with an appropriate independent normal or large-sample model for the sample mean. The standard error is σ/√n, and a two-sided critical z value multiplies that standard error to obtain the margin.
When the population spread is unknown and the input is a sample standard deviation s, Student t mode uses n−1 degrees of freedom. Under independent normal sampling, that procedure accounts for estimating the spread. The statistics calculator can help compute s from raw observations, but the correct denominator and sampling assumptions still matter. A large sample does not make s literally equal to a known σ.
A separate legacy comparison retains the old page’s t-below-30 and z-from-30 switch. It is labeled as a comparison convention rather than automatically recommended from sample size alone. Student t remains selectable at any supported n of at least two. Its critical multiplier approaches the corresponding normal multiplier as the degrees of freedom become large.
Work through a mean example and compare its assumptions
For a sample mean of 100, known σ=15 and n=100, the standard error is 1.5. At 95% confidence, the normal multiplier is about 1.959964, giving a margin of about 2.939946. The resulting interval is approximately [97.060054,102.939946]. These are the same arithmetic inputs as the existing known-SD example.
If 15 instead represents the sample standard deviation s, choose Student t and 99 degrees of freedom. Its multiplier is slightly larger, so the interval is slightly wider. For a small sample, that difference can be substantial. Neither option corrects a nonrandom convenience sample, biased measurement or dependent observations. Choosing a distribution does not by itself establish the conditions needed to use it.
Compare Wilson with the original Wald proportion approximation
For x successes in n independent binary trials, the observed proportion is p̂=x/n. The original Wald method uses standard error √[p̂(1−p̂)/n] and adds or subtracts z times that value. Its simple symmetric construction can give impossible negative limits, limits above one, or a zero-width interval when every observed result has the same outcome. The tool retains those raw Wald limits and warns about small success or failure counts.
Wilson score mode uses a different center and half-width derived from the score-test equation. It keeps the limits in the probability range and avoids the boundary collapse of the Wald formula. For zero successes in ten trials at 95%, the Wilson interval extends from zero to approximately 0.277533, whereas the Wald calculation produces [0,0]. Observing no successes in a small sample is not proof that the underlying success probability is exactly zero.
Wilson is not an exact binomial interval and does not guarantee nominal coverage for every possible probability and sample size. The NIST proportion-interval reference explains its score-based construction. This page also reports proportion limits as percentages in the table while retaining the 0–1 scale for its main calculation, so 0.25 and 25% are not mistaken for different probabilities.
Interpret confidence through the procedure rather than a posterior claim
The confidence level belongs to a sampling procedure. Across repeated samples generated under the assumptions, intervals from a well-calibrated procedure cover the fixed parameter with its stated long-run interpretation. After observing one sample and calculating its interval, the fixed parameter is either inside it or outside it; the page does not assign a posterior probability to that event.
The diagram is a standardized reference density with two critical cutoffs. It explains which distribution calibrates the multiplier. Its horizontal axis is a standardized statistic, not a range of possible population means or probabilities. Exporting that SVG therefore does not produce a posterior distribution, a prediction interval for one person, or a validation of the sampling design.
Record what the simple summary model leaves out
Independence and suitable sampling matter as much as the displayed formula. Clustered surveys, repeated measurements, weighted sampling and finite-population sampling can need different standard errors. The calculator does not silently infer those adjustments from a sample size. A zero entered spread also gives zero computed width without proving that the population itself has no variability.
Increasing n typically narrows an interval when the other assumptions and summary values are held fixed. Increasing the confidence level widens it. The sample size calculator addresses a separate planning question under its own stated proportion model. It is useful for comparing assumptions, but it does not repair deficiencies in an already collected dataset.
A few questions, answered
Should I always switch to z at n=30?
No. The original rule is available as a labeled legacy comparison. Use the spread information and sampling model to choose the procedure; unknown population SD can use Student t at large n too.
Is this a 95% probability that my fixed mean is inside the interval?
No. Frequentist confidence describes the repeated-sampling procedure, not a posterior probability for the fixed parameter.
Why can Wald limits leave the probability range?
Its symmetric normal approximation is not constrained to [0,1]. Raw limits are displayed rather than silently clipped.
Is Wilson an exact binomial procedure?
No. It is a score-based approximate interval and has a different construction from an exact binomial interval.
Does the reference curve show uncertainty directly in my population parameter?
No. Its horizontal axis is a standardized statistic used for critical-value calibration.