Confidence Interval Calculator Online + Mobile App

Estimate a confidence interval for a population mean using your sample mean, standard deviation, sample size, and confidence level. Choose population σ or sample s to automatically use the appropriate z- or Student’s t-distribution. (How the Confidence Interval Calculator Works / Disclaimer).


Related Products:

Use this Confidence Interval Calculator to estimate the lower bound, upper bound, margin of error, standard error, and critical value for a population mean. Enter the sample mean, choose whether you know the population standard deviation or only the sample standard deviation, enter the standard deviation and sample size, and select your desired confidence level. The calculator automatically uses a z critical value for known population σ or Student’s t with n − 1 degrees of freedom when using sample s.


Confidence Interval Calculator

Calculate a confidence interval for a population mean using a known population standard deviation (z) or sample standard deviation (t).

Confidence Interval Formula & Explanation

A confidence interval estimates a range of plausible values for a population mean based on a sample mean, standard deviation, sample size, and confidence level.

When the population standard deviation (σ) is known

CI = x̄ ± z* × (σ / √n)

Use the z-distribution when the population standard deviation is known.

When only the sample standard deviation (s) is known

CI = x̄ ± t* × (s / √n)

Use the Student's t-distribution when the standard deviation comes from the sample. The calculator uses n − 1 degrees of freedom.

Standard Error

SE = standard deviation / √n

The standard error estimates how much the sample mean would vary from sample to sample. Larger sample sizes generally produce a smaller standard error. A standard deviation of 0 produces a standard error and margin of error of 0.

Margin of Error

MOE = critical value × SE

The critical value is determined by the selected confidence level and whether the calculator uses a z- or t-distribution.

For small samples, especially at very high confidence levels, Student’s t critical values can become very large. This calculator expands the t-value search range dynamically rather than imposing a small fixed cutoff.

Lower and Upper Bounds

Lower bound = x̄ − MOE
Upper bound = x̄ + MOE

For example, a 95% confidence interval of (94.62, 105.38) means the estimated interval for the population mean runs from 94.62 to 105.38 under the assumptions of the method.

Note: This calculator is for confidence intervals for a mean. It is not a confidence interval calculator for proportions, differences between groups, regression coefficients, or other statistics.

(How the Confidence Interval Calculator Works / Disclaimer).

Related Products:

How the Confidence Interval Calculator Works

A confidence interval gives you an estimated range of plausible values for a population parameter based on information collected from a sample. This calculator specifically calculates a confidence interval for a population mean.

To calculate the interval, enter the sample mean, standard deviation, sample size, and desired confidence level. You must also tell the calculator whether the standard deviation is the known population standard deviation (σ) or a standard deviation calculated from your sample (s).

That distinction determines whether the calculator uses a z-distribution or a Student’s t-distribution.

1. Enter the Sample Mean (x̄)

The sample mean is the average of the observations in your sample.

It is represented by:

If your sample values are:

92, 96, 100, 104, 108

their sample mean is:

x̄ = (92 + 96 + 100 + 104 + 108) ÷ 5 = 100

You would therefore enter:

100

in the Sample Mean field.

The sample mean becomes the center of the calculated confidence interval.

2. Choose the Standard Deviation Type

The calculator provides two choices:

  • Population σ
  • Sample s

This selection is important because the appropriate critical value depends on whether the population standard deviation is known.

3. Population Standard Deviation (σ)

Choose Population σ when the standard deviation of the entire population is known.

The calculator then uses the normal or z-distribution.

The confidence interval formula is:

CI = x̄ ± z* × (σ / √n)

where:

  • = sample mean
  • z* = z critical value
  • σ = population standard deviation
  • n = sample size

For example, a 95% confidence level has a z critical value of approximately:

1.96

4. Sample Standard Deviation (s)

Choose Sample s when the population standard deviation is unknown and you are using the standard deviation calculated from your sample.

The calculator then uses the Student’s t-distribution.

The formula becomes:

CI = x̄ ± t* × (s / √n)

where:

  • = sample mean
  • t* = Student’s t critical value
  • s = sample standard deviation
  • n = sample size

The appropriate t critical value depends on both the confidence level and the sample size.

5. Degrees of Freedom

When Sample s is selected, the calculator uses:

df = n − 1

where df means degrees of freedom.

For example, if:

n = 30

then:

df = 30 − 1 = 29

The calculator automatically determines the appropriate Student’s t critical value using those degrees of freedom.

Because at least two observations are needed to meaningfully calculate a sample standard deviation, Sample s requires:

n ≥ 2

6. Enter the Standard Deviation

Enter either the population standard deviation σ or sample standard deviation s, depending on the option selected.

Standard deviation measures how spread out observations are around the mean.

A smaller standard deviation generally produces a narrower confidence interval when the other inputs remain unchanged.

A larger standard deviation generally produces a wider confidence interval.

The calculator also supports a standard deviation of:

0

If the standard deviation is zero, the standard error and margin of error are also zero, producing an interval whose lower and upper bounds equal the sample mean.

7. Enter the Sample Size (n)

Sample size represents the number of observations used to calculate the sample mean.

It is represented by:

n

For example, if your dataset contains 100 observations:

n = 100

Sample size affects the standard error through the square root of n.

In general, increasing the sample size reduces standard error and produces a narrower confidence interval when the other values remain unchanged.

8. Select the Confidence Level

The confidence level determines the critical value used to calculate the margin of error.

Common confidence levels include:

  • 90%
  • 95%
  • 99%

This calculator also allows custom confidence levels up to:

99.99%

A higher confidence level requires a larger critical value and therefore normally creates a wider confidence interval.

A lower confidence level generally creates a narrower interval.

9. Understanding the Critical Value

The critical value determines how many standard errors are included on either side of the sample mean.

When Population σ is selected, the calculator obtains a critical value from the normal distribution.

For commonly used two-sided intervals, approximate z critical values include:

  • 90% → 1.645
  • 95% → 1.960
  • 99% → 2.576

When Sample s is selected, the calculator instead determines a Student’s t critical value based on the confidence level and degrees of freedom.

10. Why the t Critical Value Can Be Larger

The Student’s t-distribution accounts for additional uncertainty caused by estimating the population standard deviation from a sample.

For smaller samples, the t-distribution has heavier tails than the normal distribution.

This usually means:

t* > z*

for the same confidence level.

As sample size increases, the t-distribution approaches the normal distribution.

For very small samples combined with extremely high confidence levels, the required t critical value can become very large.

The calculator dynamically expands its numerical search range when finding these extreme t critical values rather than limiting the result to a small fixed maximum.

11. Calculate the Standard Error

The calculator first determines the standard error.

When population σ is known:

SE = σ / √n

When sample s is used:

SE = s / √n

For example, suppose:

  • Standard deviation = 15
  • Sample size = 100

Then:

SE = 15 / √100

SE = 15 / 10

SE = 1.5

The standard error describes the estimated sampling variability of the sample mean.

12. Calculate the Margin of Error

The margin of error is calculated as:

MOE = Critical Value × Standard Error

For a z-based interval:

MOE = z* × SE

For a t-based interval:

MOE = t* × SE

For example, if:

  • Critical value = 1.96
  • Standard error = 1.5

then:

MOE = 1.96 × 1.5

MOE = 2.94

13. Calculate the Lower Bound

The lower confidence bound is:

Lower Bound = x̄ − MOE

Using a sample mean of 100 and margin of error of 2.94:

Lower Bound = 100 − 2.94 = 97.06

14. Calculate the Upper Bound

The upper confidence bound is:

Upper Bound = x̄ + MOE

Using the same example:

Upper Bound = 100 + 2.94 = 102.94

The resulting confidence interval is therefore:

(97.06, 102.94)

15. Complete Confidence Interval Formula

For known population standard deviation:

x̄ ± z* × (σ / √n)

For sample standard deviation:

x̄ ± t* × (s / √n)

The result can also be written as:

(Lower Bound, Upper Bound)

16. Example Using Population σ

Suppose you have:

  • Sample mean = 100
  • Population standard deviation = 15
  • Sample size = 100
  • Confidence level = 95%

The standard error is:

SE = 15 / √100 = 1.5

The approximate 95% z critical value is:

z* = 1.96

The margin of error is:

MOE = 1.96 × 1.5 = 2.94

The confidence interval is:

100 ± 2.94

or approximately:

(97.06, 102.94)

17. Example Using Sample s

Suppose instead you have:

  • Sample mean = 100
  • Sample standard deviation = 15
  • Sample size = 30
  • Confidence level = 95%

Because the standard deviation comes from the sample, select:

Sample s

Degrees of freedom are:

df = 30 − 1 = 29

The calculator determines the appropriate t critical value for 29 degrees of freedom and uses:

SE = 15 / √30

It then calculates:

MOE = t* × SE

and finally:

CI = 100 ± MOE

The t-based interval will normally be somewhat wider than an otherwise equivalent z-based interval because it accounts for uncertainty in the estimated standard deviation.

18. Reading the Calculator Results

After selecting Calculate, the calculator displays:

  • Lower bound
  • Upper bound
  • Margin of error

It also displays a summary in the form:

Confidence interval: Mean ± Margin of Error = (Lower, Upper)

For example:

95% confidence interval: 100 ± 5.37 = (94.63, 105.37)

The exact numbers depend on your inputs.

19. Worked Calculation

Under the result, the calculator displays the major calculation steps.

These include:

  • Standard error
  • Critical value
  • Degrees of freedom when applicable
  • Margin of error
  • Final confidence interval

This makes it easier to see how the calculator arrived at the result rather than displaying only the final lower and upper bounds.

20. What Does a 95% Confidence Interval Mean?

A 95% confidence interval is frequently misunderstood.

Under the frequentist interpretation, the confidence level refers to the long-run performance of the interval-building procedure.

If the same sampling method were repeated many times and a 95% confidence interval were constructed from every sample, approximately 95% of those intervals would be expected to contain the true population parameter under the assumptions of the method.

Once a particular interval has been calculated, the population mean itself is treated as fixed rather than randomly moving in and out of that interval.

21. Higher Confidence Means a Wider Interval

Increasing the confidence level normally increases the critical value.

For the same:

  • Sample mean
  • Standard deviation
  • Sample size

a 99% confidence interval will generally be wider than a 95% interval.

Likewise, a 95% interval will generally be wider than a 90% interval.

This reflects the tradeoff between confidence and precision.

22. Larger Samples Usually Produce Narrower Intervals

The standard error contains:

√n

in the denominator.

As sample size increases:

SE decreases

assuming standard deviation remains unchanged.

That generally results in a smaller margin of error and narrower confidence interval.

However, doubling the sample size does not cut the standard error in half because the relationship involves the square root of sample size.

23. What This Calculator Is Designed For

This calculator estimates a confidence interval for a single population mean using:

  • A sample mean
  • A population or sample standard deviation
  • A sample size
  • A confidence level

It is not designed to calculate confidence intervals for:

  • Population proportions
  • Differences between two means
  • Differences between proportions
  • Odds ratios
  • Risk ratios
  • Regression coefficients
  • Correlation coefficients
  • Paired samples
  • Other specialized statistics

Those calculations require different formulas and assumptions.

24. Assumptions and Limitations

A confidence interval is only as meaningful as the data and assumptions used to construct it.

Depending on the application, important considerations may include:

  • Whether observations are independent
  • How the sample was selected
  • Whether the sample is representative of the target population
  • The shape of the underlying population distribution
  • The sample size
  • Whether the correct standard deviation type was selected
  • Whether the chosen statistical model is appropriate

A mathematically correct confidence interval does not automatically make a study design, sample, or statistical conclusion valid.

Disclaimer: The Confidence Interval Calculator and information provided on this page are intended for general informational, educational, statistical, and reference purposes only. The calculator performs mathematical estimates based solely on the values entered by the user and the selected statistical method.

Results should not be interpreted as proof that a population parameter lies within a particular interval, nor should a confidence interval be interpreted as a probability statement about a fixed parameter without considering the statistical framework being used.

The calculator does not evaluate whether your sample was randomly selected, independent, representative, normally distributed, free from bias, appropriately sized, or suitable for the statistical method. It also cannot determine whether the assumptions required for a particular study, experiment, survey, research design, or analysis have been satisfied.

Selecting Population σ tells the calculator to treat the entered standard deviation as a known population standard deviation and use a normal z critical value. Selecting Sample s tells the calculator to treat the entered value as a sample standard deviation and use Student’s t with n − 1 degrees of freedom. Choosing the wrong option can materially change the result.

This calculator is designed for confidence intervals for a single population mean. It should not be used as a substitute for methods designed for proportions, paired data, comparisons between groups, regression, correlations, complex survey designs, weighted samples, clustered observations, repeated measurements, or other specialized statistical analyses.

Although the calculator is designed to provide mathematically useful estimates, numerical approximations and rounding may cause small differences compared with statistical software, textbooks, spreadsheets, or other calculators.

Appsoup.com does not guarantee that calculator results are appropriate for any particular academic, scientific, medical, financial, legal, engineering, business, regulatory, or professional application.

For research, coursework, publication, regulated analysis, high-stakes decisions, or situations where statistical assumptions and methodology matter, verify the calculation and interpretation with an appropriate textbook, statistical software package, instructor, statistician, researcher, or other qualified professional.

Use the calculator as a convenient statistical estimation and learning tool rather than as the sole basis for an important decision or formal statistical conclusion.