Sigma Calculator — 543+ Free Calculator Tools
Compute the margin of error and 90%, 95% or 99% confidence interval from sample mean, standard deviation and sample size.
Enter your sample mean, standard deviation and sample size, then pick a confidence level (90%, 95% or 99%). The calculator finds the z-score for that level, computes the standard error, and returns the margin of error plus the lower and upper bounds of the interval.
A confidence interval turns a single sample statistic into a range of plausible values for the true population value, together with a stated level of confidence. Whether you are estimating the average battery life of a production batch, the mean score of a student cohort, or the conversion rate of a marketing campaign, the interval tells you how much precision your data actually supports. This guide explains how to use the calculator above, what a confidence interval really means, the exact formula with two fully worked numerical examples, two extended practical examples, and the five most common mistakes people make when interpreting intervals.
Follow these steps to compute a confidence interval for a population mean with the calculator above:
Tip: the calculator uses the z-distribution (normal approximation), which is most reliable when n is 30 or more. For smaller samples with an unknown population standard deviation, a t-distribution is technically more appropriate, as discussed in the FAQ section.
Before you trust any interval, double-check the three inputs that drive it. A misplaced decimal in the standard deviation (entering 9 instead of 90) shrinks the interval tenfold and creates false precision. Entering the variance (8,100) instead of the standard deviation (90) blows the interval up enormously. And entering the population size (say, 50,000 cartons produced) instead of the sample size (100 cartons measured) collapses the standard error to nearly zero. The calculator cannot catch these slips, so confirm that the mean sits near the middle of your raw data, the standard deviation is positive and plausible, and n equals the number of observations you actually measured.
A confidence interval is a range of values, computed from sample data, that is likely to contain an unknown population parameter such as the true mean. Because we almost never measure an entire population, we work with a sample statistic (for example, the average of 100 bulbs) and acknowledge that a different sample would give a slightly different average. The interval quantifies that uncertainty.
Three ingredients determine the interval. First, the confidence level (90%, 95%, or 99%) states how often the procedure captures the true parameter if you repeated the sampling process many times. A 95% confidence level means that about 95 out of 100 intervals constructed this way would contain the true mean. Second, the standard error measures how much the sample mean would typically vary from sample to sample; it equals the standard deviation divided by the square root of the sample size. Third, the z-score (also called the critical value) stretches the standard error into a margin of error: 1.645 for 90%, 1.96 for 95%, and 2.576 for 99% confidence.
Consider a concrete illustration. A coffee roaster samples 400 bags and finds a mean weight of 200 grams with a standard deviation of 25 grams. The standard error is 25 / √400 = 25 / 20 = 1.25 grams. At 90% confidence the margin of error is 1.645 × 1.25 = 2.056 grams, so the interval is 200 ± 2.06, or 197.94 to 202.06 grams. The roaster can report with 90% confidence that the true average bag weight lies between about 197.9 and 202.1 grams — comfortably bracketing the 200-gram target.
Notice the trade-offs built into every interval. Raising the confidence level from 95% to 99% widens the interval because the z-score grows from 1.96 to 2.576. Increasing the sample size narrows the interval because the standard error shrinks with √n. Reducing the data’s variability (smaller standard deviation) also narrows it. Precision and confidence pull in opposite directions: you can have a narrow interval or a very confident one, but getting both requires more data.
Different fields favor different confidence levels by convention. Medical trials and physics experiments often demand 99% intervals because a wrong conclusion is costly; a 99% interval for a drug’s effect might run from 4.2 to 9.8 mg/dL, and regulators want that extra assurance. Market research and A/B testing usually settle for 95%, the familiar default. Exploratory engineering work sometimes uses 90% intervals to keep reports concise when decisions are reversible. Whatever level you choose, state it alongside the interval — an interval without its confidence level is incomplete, like a measurement without units.
Crucially, a confidence interval describes uncertainty about the population mean, not about individual observations. A 95% interval for average bulb lifetime does not mean 95% of individual bulbs fall inside it — individual bulbs vary far more than the mean does. It also does not mean there is a 95% probability that this particular computed interval contains the truth; in the classical framework the true mean is fixed and the interval is what varies from sample to sample. The 95% refers to the long-run success rate of the method.
The confidence interval for a population mean, using the normal (z) approximation, is:
CI = x̄ ± z × (σ / √n)
Where x̄ is the sample mean, z is the critical z-score for the chosen confidence level (1.645 for 90%, 1.96 for 95%, 2.576 for 99%), σ is the population standard deviation (the sample standard deviation s is used as its estimate), and n is the sample size. The quantity σ / √n is the standard error, and z × (σ / √n) is the margin of error.
Worked example 1 — 95% confidence. A sample of n = 100 cartons has a mean weight x̄ = 50 ounces and a standard deviation σ = 10 ounces. For 95% confidence, z = 1.96.
The 95% confidence interval is 48.04 to 51.96 ounces. These are exactly the default numbers shown in the calculator above, so you can verify the tool by entering sample mean 50, standard deviation 10, sample size 100, and 95% confidence.
Worked example 2 — 99% confidence. A sample of n = 36 steel rods has a mean tensile strength x̄ = 72.5 ksi and a standard deviation σ = 8.4 ksi. For 99% confidence, z = 2.576.
The 99% confidence interval is 68.89 to 76.11 ksi. Compare this with a 95% interval for the same data: the margin of error would be only 1.96 × 1.4 = 2.744 ksi, giving 69.76 to 75.24 ksi — noticeably narrower, because the lower confidence level demands less assurance.
For completeness, here is the 90% interval for the carton data from worked example 1 (x̄ = 50, σ = 10, n = 100). With z = 1.645, the margin of error is 1.645 × 1.0 = 1.645 ounces, giving 48.36 to 51.65 ounces. Compare the three intervals for the same data: 90% → 48.36–51.65 (width 3.29), 95% → 48.04–51.96 (width 3.92), 99% → 47.42–52.58 (width 5.15). Higher confidence always costs width.
A battery manufacturer wants to advertise the average life of its AA cells. Quality engineers test a random sample of n = 64 batteries and record a mean life of x̄ = 812 hours with a standard deviation of s = 45 hours. They need a 95% confidence interval for the true mean lifetime of the entire production run.
Step 1 — standard error. SE = 45 / √64 = 45 / 8 = 5.625 hours. This is the typical sampling fluctuation of the mean for samples of 64 batteries.
Step 2 — margin of error. For 95% confidence, z = 1.96, so ME = 1.96 × 5.625 = 11.025 hours. Any single sample mean of 64 batteries will typically land within about 11 hours of the true production mean.
Step 3 — interval bounds. Lower bound = 812 − 11.025 = 800.975 hours. Upper bound = 812 + 11.025 = 823.025 hours. Rounded for reporting, the interval is 801.0 to 823.0 hours.
Step 4 — interpretation. The engineers can state: “We are 95% confident that the true mean battery life is between 801 and 823 hours.” If the marketing team wants to claim “at least 800 hours on average,” this interval supports the claim, since the entire interval sits above 800 hours. Had the lower bound come out at 795 hours, the claim would not be supported at 95% confidence.
Notice how the interval width, 22.05 hours, compares with the raw data spread: individual batteries vary with a standard deviation of 45 hours, but the mean of 64 batteries is pinned down to a ±11-hour window. That contrast is the whole point of the standard error — averages are far more stable than individual observations.
Sometimes the question runs in reverse: how large a sample do you need to achieve a desired precision? Rearranging the margin-of-error formula gives the sample-size formula:
n = (z × σ / E)²
where E is the largest margin of error you are willing to accept. Always round the result up to the next whole number, because rounding down would leave the margin of error slightly above your target.
Scenario. A pollster wants to estimate average daily screen time within ±2 minutes at 95% confidence. A pilot study suggests the standard deviation is about σ = 10 minutes.
With 97 respondents the margin of error will be at most 2 minutes. If the pollster is satisfied with ±5 minutes instead, the requirement drops sharply: n = (1.96 × 10 / 5)² = (3.92)² = 15.3664, so n = 16 respondents suffice. Tightening the required margin of error from ±5 to ±2 minutes multiplies the required sample more than sixfold — precision is expensive, which is why planning the sample size before collecting data saves money.
A practical caution: the formula needs an advance guess of σ. Use a pilot study, historical data, or a conservative overestimate. If the true variability turns out larger than your guess, the actual interval will be wider than planned.
Continue your analysis with these companion tools: the Standard Deviation Calculator for measuring the spread that feeds into the standard error, and the Statistics Calculator for means, medians, and other descriptive statistics. You can also browse the full collection in our Math Calculators hub.
This page provides a confidence interval calculator for a population mean using the z-distribution (normal approximation). Inputs: sample mean x̄, standard deviation σ, sample size n, confidence level (90%, 95%, 99%). Formula: CI = x̄ ± z(σ/√n) with z = 1.645, 1.96, 2.576 for 90%, 95%, 99%. Verified example: x̄ = 50, σ = 10, n = 100, 95% → CI 48.04 to 51.96, margin of error 1.96, standard error 1.0. Sample-size formula: n = (zσ/E)², rounded up. The z method is most reliable for n ≥ 30; use the t-distribution for small samples with unknown population standard deviation. One-sided bounds use z = 1.282 (90%), 1.645 (95%), 2.326 (99%).
A range that likely contains the true population mean. A 95% interval means that if you repeated the sampling many times, about 95% of the intervals would capture the true mean.
Multiply the z-score for your confidence level by the standard error (SD ÷ √n). Larger samples shrink the margin; higher confidence levels widen it.
1.96. For 90% use 1.645 and for 99% use 2.576. The calculator above applies the right one automatically.
When the sample is small (n < 30) and the population SD is unknown. With large samples the z and t values are nearly identical.
Yes — a wider interval is less precise but more confident. To get a narrow interval with high confidence, increase your sample size.
With small samples (n < 30) and an unknown population standard deviation, the t-distribution gives a more accurate interval than the z-distribution used here. The t critical value is larger than the z value for small n, producing a wider interval that honestly reflects the extra uncertainty — for example, with n = 10 at 95% confidence, t = 2.262 versus z = 1.96. Once n reaches 30 or more, the t and z values are nearly identical, so this calculator’s z-based interval is appropriate.
A confidence interval estimates where the population mean lies, while a prediction interval estimates where a single future observation will fall. Prediction intervals are always wider because they include both the uncertainty of the mean and the natural spread of individual data points. For the battery example in the guide (mean 812 hours, SD 45 hours, n = 64), the 95% confidence interval for the mean is 801 to 823 hours, but a 95% prediction interval for one battery would span roughly 812 ± 1.96 × 45, or about 724 to 900 hours.
The margin of error equals z × (σ / √n), so it shrinks in proportion to 1/√n. Quadrupling the sample cuts the margin of error in half: with σ = 10 at 95% confidence, n = 25 gives a margin of error of 1.96 × 2 = 3.92, while n = 100 gives 1.96 × 1 = 1.96. Each extra observation adds less precision than the one before, which is why researchers balance data-collection cost against the precision they actually need.
Sources: All formulas and worked examples were verified with the calculator above. Critical z-values (1.645 for 90%, 1.96 for 95%, 2.576 for 99%) are standard normal distribution quantiles.
Also try our Standard Deviation Calculator and Statistics Calculator — or browse all Math Calculators.