Confidence Interval
Calculate confidence intervals for a population mean. Breaks out the Margin of Error (MOE), critical Z-value, and standard error.
The mean of your sample data
The number of observations in your sample (whole number; at least 2 when using the sample standard deviation s)
The sample standard deviation s (the usual case), or the known population standard deviation σ — pick which below
With s estimated from the same sample, the t-distribution is the correct choice at every n; it matches z as n grows.
Results
95% Confidence Interval
[48.015783, 51.984217]
- Lower Bound
- 48.015783
- Upper Bound
- 51.984217
- Margin of Error (MOE)
- ±1.984217
- Critical Value (t, df = 99)
- 1.9842 (95% confidence)
- Standard Error (SE)
- 1
- Sample Size
- 100 (Student t, 99 degrees of freedom)
- Formula
- CI = x̄ ± t × (s/√n) = 50 ± 1.9842 × (10/√100) = [48.015783, 51.984217]
The formula
CI = x̄ ± t × (s/√n) [t with n − 1 df; Z × σ/√n when σ is known] | MOE = t × SE | SE = s/√n
- x̄
- Sample Mean
- t, Z
- Critical Value
- SE, MOE
- Standard Error & Margin of Error
Worked example — Sample Mean (x̄) 50, Sample Size (n) 100, Standard Deviation (s or σ) 10
95% Confidence Interval = [48.015783, 51.984217]
How Confidence Interval Works
CI = x̄ ± t × (s/√n) [t with n − 1 df; Z × σ/√n when σ is known] | MOE = t × SE | SE = s/√n
A confidence interval provides a range of plausible values for an unknown population parameter. The margin of error (MOE) is the critical value (Student t with n − 1 degrees of freedom when the standard deviation is estimated from the sample, or Z when the population σ is known) times the standard error (SE). The standard error measures how much the sample mean is expected to vary from the true population mean.
- x̄
- Sample Mean — The average of your sample data. The point estimate of the population mean.
- t, Z
- Critical Value — Z (σ known) is 1.6449 for 90%, 1.9600 for 95%, 2.5758 for 99%. The Student t value depends on df = n − 1 and is larger for small n: for 95% it is 12.706 at n = 2, 2.262 at n = 10, 2.045 at n = 30 and 1.984 at n = 100. Higher confidence requires a larger value and produces a wider interval.
- SE, MOE
- Standard Error & Margin of Error — SE = s/√n measures sampling variability. MOE = t × SE is the ± range around the mean that creates the confidence interval.
Understanding the Result
Confidence intervals are fundamental to inferential statistics. They express the uncertainty inherent in estimating a population parameter from a sample. A 95% confidence interval means: if you repeated the sampling process 100 times under identical conditions, approximately 95 of those intervals would contain the true population mean. It does NOT mean there is a 95% probability that the true mean lies within your specific interval — the true mean either is or is not in that interval, and you do not know which.
The margin of error (MOE) is the key number reported in opinion polls, market research, and clinical studies — it communicates the precision of the estimate. The standard error (SE) shrinks as sample size increases, which means larger samples produce narrower intervals with more precise estimates. Doubling the sample size reduces the SE by about 29% (1/√2). When the standard deviation is estimated from the same sample, the t-distribution (not the normal) is the correct reference at every sample size, because s is an imperfect estimate of the true population σ; its heavier tails give slightly wider intervals that account for this extra uncertainty.
This calculator therefore uses t with n − 1 degrees of freedom by default and switches to the normal Z only if you tell it σ is known. The interval assumes the data are roughly normal (or n is large enough for the central limit theorem).
How to Use
- Enter your sample mean, sample size, and standard deviation.
- Select the desired confidence level (95% is the standard for most published research).
- Say whether the standard deviation is the sample s (the usual case, Student t is used) or a known population σ (normal Z is used).
- View the confidence interval range, margin of error, and the exact critical value used.
- The MOE is explicitly broken out — researchers often need this for reporting in papers and tables.
Frequently Asked Questions
- What does 95% confidence actually mean?
- A 95% confidence level means that if you were to repeat your sampling procedure 100 times, approximately 95 of the calculated confidence intervals would contain the true population mean. It does NOT mean there is a 95% probability that the true mean lies within your specific interval — the true mean either is or is not in that interval. The "95%" refers to the long-run success rate of the procedure, not a probability for a single interval.
- What is the difference between MOE and confidence interval?
- The margin of error (MOE) is the ± value around the sample mean. The confidence interval is the full range: [x̄ − MOE, x̄ + MOE]. Researchers often report just the MOE in papers and tables, while the confidence interval gives the complete range. The MOE depends on three things: confidence level (higher Z = larger MOE), standard deviation (more variable data = larger MOE), and sample size (more data = smaller MOE).
- When should I use the t-distribution instead of Z?
- When the population standard deviation (σ) is unknown and you are using the sample standard deviation (s) to estimate it — which is almost always the case in real research — you should use the t-distribution. For large samples the t-distribution is close to the normal (95% critical value 1.984 at n = 100 versus 1.960 for Z), so Z is only a small underestimate there. For small samples, especially n < 15, the t critical value is notably larger than Z (2.262 at n = 10), producing wider, correctly calibrated intervals. This calculator applies t automatically unless you select a known population σ.
Cite this calculator
TheCalcUniverse. "Confidence Interval Calculator — Margin of Error & Z-Value." TheCalcUniverse, 2026, https://thecalcuniverse.com/math/confidence-interval-calculator/. Accessed October 25, 2026.
Embed this calculator on your site
You may also like
-
Mathematics
Z-Score Calculator
Calculate a Z-score from a raw score, mean and standard deviation, shown on a standard normal curve with the shaded probability region.
Open calculator → -
Mathematics
P-value Calculator
Compute p-values from Z-scores or T-scores for one-tailed and two-tailed hypothesis tests. Free online calculator with formula guide and step-by-step results.
Open calculator → -
Mathematics
Sample Size
Determine the ideal sample size for surveys and research studies. Adjust for population size, confidence level, and margin of error.
Open calculator → -
Mathematics
Statistics
Comprehensive descriptive statistics calculator with a dynamic box-and-whisker plot. Computes the five-number summary, quartiles, IQR, standard deviation.
Open calculator → -
Mathematics
Standard Deviation
Compute standard deviation, variance, mean, median, range, and coefficient of variation from any dataset. Free online calculator with step-by-step results.
Open calculator →