Confidence Interval Calculator
Switch between mean and proportion modes to estimate population parameters from sample data.
Inputs — Mean
Common values: 90, 95, 99
Results — Mean
Inputs — Proportion
Common values: 90, 95, 99
Results — Proportion
Bounds are expressed as proportions between 0 and 1.
Important Note : This calculator provides a standard confidence interval estimate for quick educational use. For mean intervals, a z-based approach is most appropriate when the population standard deviation is known or when a normal approximation is reasonable. For proportion intervals, results are most reliable with sufficiently large samples.
Use this Confidence Interval Calculator to estimate a confidence interval for either a population mean or a population proportion from sample data. It shows the standard error, critical value, margin of error, and lower and upper bounds, making it useful for statistics homework, survey analysis, research summaries, and quick inference checks.
Reviewed by: AjaxCalculators Editorial Team
Last updated: April 24, 2026
Method source: Standard one-sample confidence interval formulas for a mean and a proportion, with z or t critical values depending on the assumptions
Editorial standards: AjaxCalculators Editorial Policy
What This Confidence Interval Calculator Calculates
This calculator supports two common one-sample confidence interval problems:
- Confidence interval for a mean
- Confidence interval for a proportion
Depending on the mode, it can show:
- Sample statistic
- Method used
- Degrees of freedom when applicable
- Standard error
- Critical value
- Margin of error
- Lower bound
- Upper bound
How the Confidence Interval Calculator Works
1) Confidence Interval for a Mean
The calculator uses the standard confidence interval structure:
estimate ± (critical value × standard error)
If the population standard deviation σ is known, the standard error is:
SE = σ / √n
and the interval uses a z critical value:
x̄ ± z* × (σ / √n)
If the population standard deviation is unknown and the sample standard deviation s is used instead, the interval uses a t critical value with df = n − 1:
x̄ ± t* × (s / √n)
2) Confidence Interval for a Proportion
For a sample proportion, the point estimate is:
p̂ = x / n
The calculator then uses the standard normal-approximation interval:
p̂ ± z* × √[p̂(1 − p̂) / n]
This is the familiar z-based confidence interval for a proportion and works best when the sample is large enough for the normal approximation to be reasonable.
Assumptions and Important Notes
- This calculator gives a confidence interval estimate, not a hypothesis-test conclusion by itself.
- For a mean, use a z interval when the population standard deviation σ is known.
- For a mean, use a t interval when σ is unknown and you are using the sample standard deviation s.
- For a proportion, the normal approximation is most reliable when there are at least 10 successes and 10 failures.
- If the sample is too small or the estimated proportion is too extreme, a more exact interval method may be better than the simple z-based approximation.
- Higher confidence levels produce wider intervals. Larger sample sizes usually produce narrower intervals.
Worked Example
Example A: Mean Confidence Interval
Suppose a sample has:
- Sample mean: 52
- Sample standard deviation: 8
- Sample size: 25
- Confidence level: 95%
Step 1: Find the standard error
SE = 8 / √25 = 1.6
Step 2: Choose the correct critical value
Because the sample standard deviation is being used, this is a t interval with df = 24.
Step 3: Find the margin of error
Margin of error = t* × 1.6
Step 4: Build the interval
Confidence interval = 52 ± margin of error
Example B: Proportion Confidence Interval
Suppose a survey finds 72 successes in 120 observations.
Step 1: Find the sample proportion
p̂ = 72 / 120 = 0.60
Step 2: Check the approximation condition
Successes = 72 and failures = 48, so the normal approximation is reasonable.
Step 3: Find the standard error
SE = √[0.60 × 0.40 / 120] ≈ 0.0447
Step 4: Use the critical value for 95% confidence
z* ≈ 1.96
Step 5: Find the margin of error and interval
Margin of error ≈ 1.96 × 0.0447 ≈ 0.0876
Confidence interval ≈ (0.512, 0.688)
How to Use This Confidence Interval Calculator
- Select Mean or Proportion mode.
- For a mean, enter the sample mean, standard deviation value, sample size, and confidence level.
- Choose the correct interpretation of the standard deviation input: σ for known-population z intervals or s for sample-based t intervals.
- For a proportion, enter the number of successes, sample size, and confidence level.
- Click Calculate to view the critical value, standard error, margin of error, and interval bounds.
How to Interpret the Result
Lower and upper bounds give a plausible range for the true population parameter under the method assumptions.
Margin of error shows how far the interval extends on either side of the sample estimate.
Critical value depends on the confidence level and on whether the method uses z or t.
Method used matters. For mean intervals especially, the choice between z and t affects the width and the interpretation of the interval.
Practical Uses of a Confidence Interval Calculator
- estimate a population mean from sample data
- estimate a population proportion from survey or poll data
- check margin of error in reports and assignments
- compare how confidence level changes interval width
- understand when z-based and t-based intervals differ
References
- Penn State STAT 500 – Confidence intervals for one mean
- Penn State STAT 415 – Confidence interval for a population mean with known standard deviation
- Penn State STAT 200 – Confidence interval for a proportion and normal-approximation guidance
- NIST – Confidence intervals and the problem of unknown standard deviation
Related Calculators
- Margin of Error Calculator
- Sample Size Calculator
- t-Statistic Calculator
- t-Test Calculator
- Power Analysis Calculator
- Variance Calculator
- IQR Calculator
Disclaimer: This calculator is for educational and general statistical use. A confidence interval is only as good as the method assumptions, the sample quality, and the choice of the correct z or t approach.