Confidence Interval from Mean and Standard Deviation Calculator
Results
95%
-
-
-
-
-
-
Interpretation
Enter values and click calculate to see the interpretation.
Formula Used
CI = x̄ ± t* × (s / √n)
Where:
- x̄ = sample mean
- t* = critical value from t-distribution
- s = sample standard deviation
- n = sample size
- SE = s / √n (standard error)
This confidence interval from mean and standard deviation calculator gives 46.27 to 53.73 for a 95% interval from a sample mean of 50, a standard deviation of 10 and a sample size of 30. The standard error is 1.826, t* is 2.045 with 29 degrees of freedom, and the margin of error is 3.734. Try your own numbers above.
The confidence interval from mean and standard deviation calculator on this page builds a proper statistical interval from your sample statistics. It always uses the t-distribution, so the critical value t* adapts to your sample size: small samples get wider, more honest intervals, while large samples converge on the familiar z-values. Enter your sample mean (x̄), standard deviation (s) and sample size (n) to get the standard error, margin of error and both bounds instantly. If you only have a population mean and standard deviation and no sample size, use our empirical rule confidence interval calculator instead — that tool describes where data falls, while this one estimates where the true mean lies.
What Is a Confidence Interval?
A confidence interval (CI) is a range of values, calculated from sample data, that is likely to contain the true population mean with a stated level of confidence — usually 95%. It measures sampling uncertainty and is always written as sample mean ± margin of error.
A 95% interval of [78.5, 81.5] does not mean that 95% of the data falls between 78.5 and 81.5. That job belongs to the empirical rule (68–95–99.7), which describes where data falls. A confidence interval is about the mean, not the data: if you repeated the sampling process many times, about 95% of the intervals you built would contain the true population mean. One single interval either contains the mean or it does not — the 95% describes the long-run reliability of the method.
This is inferential statistics, not descriptive: you are estimating a population parameter from a sample. The wider the interval, the less precise the estimate. See the interval on the curve in our bell curve generator, or read how the empirical rule differs from a confidence interval.
Formula for Confidence Interval Using Mean and Standard Deviation
The calculator uses one pattern for every confidence interval from sample statistics: centre the interval on the sample mean, then add and subtract a margin of error. This tool always uses the t-distribution version of the formula, because the standard deviation you enter is a sample estimate (s), not a known population value (σ):
T-formula — what this calculator uses
CI = x̄ ± t* × (s / √n) df = n – 1
The critical value t* comes from the t-distribution with df = n − 1 degrees of freedom, so it is larger — and the interval wider — for small samples. At 95% with n = 25, t* is 2.064.
Z-formula — when σ is known
CI = x̄ ± z* × (σ / √n)
The z-formula is the special case for when the population standard deviation σ is known exactly. It is also the limit the t-formula approaches as the sample grows: at 95%, z is 1.960, and for n above 60 the calculator’s t* is 1.980 — very close to z. Use z only when σ is known; with a sample standard deviation, t* is the correct choice.
The t-interval above is the standard method for estimating a population mean when the standard deviation is unknown; the reference treatment is in the NIST/SEMATECH e-Handbook of Statistical Methods.
Terms
| Term | Meaning |
|---|---|
| x̄ | Sample mean |
| s | Sample standard deviation (your estimate of σ) |
| σ | Population standard deviation (only used in the z-formula) |
| n | Sample size |
| df | Degrees of freedom = n − 1 |
| t* | Critical value from the t-distribution (depends on df and confidence level) |
| SE | Standard error = s / √n |
| ME | Margin of error = t* × SE |
Critical values t* used by this calculator
| Degrees of freedom | 90% | 95% | 99% |
|---|---|---|---|
| 10 | 1.812 | 2.228 | 3.169 |
| 15 | 1.753 | 2.131 | 2.947 |
| 20 | 1.725 | 2.086 | 2.845 |
| 24 | 1.711 | 2.064 | 2.797 |
| 30 | 1.697 | 2.042 | 2.750 |
| 40 | 1.684 | 2.021 | 2.704 |
| 50 | 1.676 | 2.009 | 2.678 |
| 60 | 1.671 | 2.000 | 2.660 |
| Over 60 | 1.658 | 1.980 | 2.617 |
Read the row for your degrees of freedom (df = n − 1). The calculator rounds up to the next row: for example, df = 35 uses the df-40 value 2.021. For df above 60 the calculator uses the large-sample values — 1.658 at 90%, 1.980 at 95% and 2.617 at 99% — never the z-values. Rule of thumb: use the t-formula whenever the standard deviation is estimated from your sample, which is almost always. The z-formula only applies when σ is known exactly, and a t-interval is never narrower than the matching z-interval.
How to Use the Confidence Interval Calculator
Follow these steps to calculate a confidence interval using mean and standard deviation:
Enter your sample mean (x̄) — for example, 75.
Enter your sample standard deviation (s) — for example, 10.
Enter your sample size (n) — for example, 25.
Choose your confidence level — 90%, 95% or 99%, or pick Custom and type any level, such as 97.5%.
Click “Calculate Confidence Interval”.
Read the results — the confidence level, the critical value t*, the standard error, the margin of error, the lower and upper bounds, and the plain-English interpretation.
Note: the calculator always uses the t-distribution, because your standard deviation is estimated from the sample. For large samples t* comes very close to the z-value (1.960 at 95%), so the interval is almost the same as a z-interval; for small samples the t-interval is wider — and honest. If you want to see where a z-score sits on the curve, try the z-score graph plotter.
Example: Calculate a 95% Confidence Interval
Example 1 — the tool’s own numbers. A sample of 25 students has a mean test score of 75 and a standard deviation of 10. At 95% confidence: the standard error is SE = 10 / √25 = 2; the degrees of freedom are df = 25 − 1 = 24, so t* = 2.064; the margin of error is ME = 2.064 × 2 = 4.128; and the interval is 75 ± 4.128 = [70.87, 79.13]. We are 95% confident the true mean score lies between 70.87 and 79.13.
Example 2. A sample mean of 50, a standard deviation of 10 and a sample size of 25 at 95%: SE = 2, t* = 2.064, ME = 4.128, so the interval is 50 ± 4.128 = [45.87, 54.13]. Try it above — the defaults at the top (mean 50, standard deviation 10, n = 30) give [46.27, 53.73] instead.
Example 3. A sample mean of 100, a standard deviation of 15 and a sample size of 36 at 95%: SE = 15 / √36 = 2.5; df = 35, so t* = 2.021; ME = 2.021 × 2.5 = 5.053; the interval is 100 ± 5.053 = [94.95, 105.05].
Real-life example — a customer survey. A company surveys 64 customers, who rate satisfaction from 1 to 5. The mean rating is 4.2 with a standard deviation of 0.8. At 95%: SE = 0.8 / √64 = 0.1; df = 63, so t* = 1.980; ME = 0.198; the interval is 4.2 ± 0.198 = [4.00, 4.40]. The company can report that it is 95% confident the true average satisfaction score is between 4.00 and 4.40 out of 5 — and because the sample is large, t* is already 1.980, close to the z-value of 1.960.
What happens when the sample grows? With the same mean of 50 and standard deviation of 10, a sample of 25 gives a margin of error of 4.13, but a sample of 100 gives SE = 1, t* = 1.980 and a margin of error of only 1.98 — the interval [48.02, 51.98] is less than half as wide. Quadrupling the sample halves the margin of error, because the standard error divides by √n.
How to read the results. The calculator returns the confidence level, the critical value t*, the standard error, the margin of error and both bounds. The interval itself is the two bounds: the lower bound is the mean minus the margin of error, and the upper bound is the mean plus the margin of error. The interpretation sentence underneath says it plainly — “We are 95% confident that the true population mean lies between…” — use that sentence in your report, and always quote the confidence level with it.
What makes the interval wider or narrower? Three things: the confidence level (99% is wider than 95% because t* is larger), the standard deviation (more spread means a wider interval) and the sample size (a bigger n shrinks the standard error). The only one you can usually control is the sample size — to halve the margin of error, you need four times as many observations.
Common mistakes. Do not say “there is a 95% probability the true mean is in this interval” — the 95% describes the method, not this one interval. Do not use a z-value (1.96) for a small sample with an estimated standard deviation; use t*. And do not confuse the interval with the range of the data — the interval is about the mean, while the spread of the data is described by the empirical rule.
Empirical Rule vs Confidence Interval (Connection Section)
| Aspect | Empirical Rule | Confidence Interval |
|---|---|---|
| Purpose | Describes data spread in a population | Estimates population mean from a sample |
| Input | Population mean (μ), SD (σ) | Sample mean (X̄), SD (s), n |
| Output | % of data in range (68%, 95%, 99.7%) | Range likely containing true mean |
| Type | Descriptive | Inferential |
| Assumption | Normal distribution | Normal sampling distribution |
Key insight: the 68–95–99.7 rule tells you where data falls; a confidence interval tells you where the true mean likely is. One describes the data you have; the other estimates the population value you do not have. The diagram at the top of this page shows the interval on the bell curve: the shaded middle 95% is the confidence interval, and the red dashed lines mark its lower and upper bounds.
Compare this exact interval with our population-style interval for estimated coverage, or read the full comparison in empirical rule vs confidence interval.
Common Confidence Levels
| Confidence Level | Z-Value | T-Value (df=20) | Use Case |
|---|---|---|---|
| 90% | 1.645 | ~1.725 | Moderate precision |
| 95% | 1.96 | ~2.086 | Standard in research |
| 99% | 2.576 | ~2.845 | High certainty |
The Z-Value column shows the large-sample limit. For the exact t* for your own sample size, use the critical-value table above — with df = 24 the 95% t* is 2.064, not 1.96. To use any other level, such as 97.5% or 80%, choose Custom in the calculator above and type the percentage.
When to Use This Calculator
Use the confidence interval from mean and standard deviation calculator when:
- Conducting surveys or experiments with sample data
- Reporting statistical precision in research papers
- Estimating population parameters in quality control
- Performing hypothesis testing with margin of error
It is essential in statistical modeling, data science and scientific research. If you need a percentile for a single value instead, use the empirical rule percentile calculator or visualise percentiles on a normal distribution; to shade areas under the curve, use the standard deviation shading tool.
How do you calculate a confidence interval from the mean and standard deviation?
Divide the standard deviation by the square root of the sample size to get the standard error, multiply it by the t critical value for your confidence level and degrees of freedom (n − 1), and add and subtract the result from the sample mean. For example, with a mean of 50, a standard deviation of 10 and n = 25 at 95%, the standard error is 2, t* is 2.064, the margin of error is 4.13 and the interval is 45.87 to 54.13.
What is a 95% confidence interval for a mean?
A 95% confidence interval for a mean is the range of values, built as sample mean ± t* × standard error, that would contain the true population mean in about 95 out of 100 repeated samples. It is a statement about the reliability of the method, not a 95% probability that this one interval contains the mean, and it is not the range that contains 95% of the data.
Should I use z or t for a confidence interval?
Use t whenever the standard deviation is estimated from your sample, which is almost every real case. The t-distribution has heavier tails, so t* is larger than z for small samples and the interval is wider — with n = 25 at 95%, t* is 2.064 against z = 1.960. Use z only when the population standard deviation σ is known exactly, or as an approximation for very large samples, where t* is already almost equal to z.
FAQs
Enter your sample mean, standard deviation and sample size into the calculator above, choose a confidence level (90%, 95% or 99%, or Custom) and click Calculate Confidence Interval. The calculator works out the standard error (s / √n), the t critical value for your degrees of freedom and the margin of error, then shows the lower and upper bounds and a plain-English interpretation.
A z-interval uses the z-value (1.960 at 95%) and applies when the population standard deviation σ is known exactly. A t-interval uses the t critical value, which is larger for small samples — 2.064 instead of 1.960 when n = 25 — because the standard deviation is only estimated from the sample. This calculator always uses the t-interval, and for large samples t* comes so close to z that the two agree.
Use 95% for most research and reporting — it is the standard. Choose 90% when you want a narrower, less certain interval, and 99% when the cost of being wrong is high, such as safety or medical decisions. Remember that higher confidence always means a wider interval, so only raise the level when the extra certainty is worth the extra width.
No. This calculator is for sample statistics — a sample mean, a sample standard deviation and a sample size. If you have population values (μ and σ) with no sample size, use the Empirical Rule Confidence Interval Calculator instead, which describes where 68%, 95% and 99.7% of the data falls.
The empirical rule describes the spread of data in a normal population: about 68% of values fall within one standard deviation of the mean, 95% within two and 99.7% within three. A confidence interval instead estimates where the true population mean lies, using sample statistics and the t-distribution. One is descriptive, the other is inferential — the comparison table above shows the difference at a glance.
A wide interval comes from a small sample size, a large standard deviation or a high confidence level. The most effective fix is a larger sample: quadrupling the sample size halves the margin of error, because the standard error divides by the square root of n. Lowering the confidence level also narrows the interval, but it makes the claim less certain.
It depends on your standard deviation and confidence level. The sample size you need is n = (t* × s / ME)², so with a standard deviation of 10 and a desired margin of error of ±2 at 95%, you need roughly 100 observations (t* is close to 2 for large samples). Enter 100 as the sample size above to check the exact interval.
Yes — a confidence interval can include negative values whenever the data itself can be negative, for example a change in weight or a temperature difference. The interval is centred on the sample mean, so if the mean is close to zero and the margin of error is large, the lower bound can be negative. That is not an error; it simply means the true mean could plausibly be negative.
Related Tools
Explore these related calculators:
Empirical Rule Confidence Interval Calculator: Estimate 68%, 95% and 99.7% coverage from a population mean and standard deviation.
Empirical Rule Percentile Calculator: Find the percentile of any value in a normal distribution from its mean and standard deviation.
Empirical Rule vs Confidence Interval: Learn how the empirical rule differs from a confidence interval — and when to use each one.
Z-Score to Percentile Converter: Convert a z-score to a percentile and see where a value sits in a normal distribution.
Conclusion
The confidence interval from mean and standard deviation calculator is a powerful tool for inferential statistics, enabling precise estimation of population means from sample data. Whether you are in research, quality control or data science, you now know how to build a t-based interval, read its standard error and margin of error, and explain what the confidence level really means. For population-level descriptions, compare your results with the empirical rule view — and to keep exploring, browse all our statistics tools.
Next steps
📘
● Live
What Is Margin of Error?
Understand the margin of error this interval is built from.
Calculator
Try Calculator →
🧮
● Live
Empirical Rule Confidence Interval Calculator
Get a quick 68–95–99.7 interval for a whole population.
Calculator
Try Calculator →
🧮
● Live
Margin of Error Calculator
Work out the margin of error for a mean or a proportion.
Calculator
Try Calculator →
Empirical Rule Calculator
Explore our statistical tools: calculate percentiles, visualize bell curves, and plot z-scores with simple, accurate calculators for normal distributions.
Try CalculatorEmpirical Rule Graph Generator
Visualize the 68-95-99.7 Rule with a bell curve showing standard deviation intervals. Great for quick insights and presentations.
Try CalculatorBell Curve Generator
Create customizable bell curve plots for any normal distribution. Perfect for data analysis and visual reports.
Standard Deviation Shading Tool
Shade areas under the curve based on standard deviation. Instantly see data coverage between values.
Try Calculator