Confidence Interval Calculator
Calculates a confidence interval for a population mean or a population proportion from sample data. For a mean, enter the sample mean, the standard deviation (or the standard error) and the sample size; for a proportion, the number of successes or the sample proportion and the sample size. Choose the confidence level, such as 90%, 95% or 99%, to get the critical z-value, the standard error, the margin of error and the lower and upper bounds of the interval.
- Random, independent sampling; z critical values from the standard normal distribution.
Formula
CI = estimate ± z × SE; mean: SE = s ÷ √n; proportion: SE = √(p̂(1 − p̂) ÷ n); z = Φ⁻¹(1 − (1 − confidence) ÷ 2)
- Common critical values: 90% → 1.6449, 95% → 1.9600, 99% → 2.5758.
- The z-based interval is appropriate for large samples or a known population standard deviation; for small samples from a normal population a t-interval is wider.
- The proportion interval is the Wald (normal approximation) interval.
Mean 50, standard deviation 10, n = 100, 95% confidence
Inputs
- Confidence interval for a: mean
- I know the: sd
- Sample mean (x̄): 50
- Standard deviation (s): 10
- Standard error: 1
- Number of successes (x): 540
- Sample size (n): 100
- Sample size (n): 1000
- Confidence level: 95 %
SE = 10 ÷ √100 = 1. z for 95% is 1.96, so the margin of error is 1.96 and the interval runs from 48.04 to 51.96.
Sources & references
Frequently asked questions
What does a 95% confidence interval mean?
If you repeated the sampling many times and built an interval each time, about 95% of those intervals would contain the true population value. It does not mean there is a 95% chance this particular interval contains it.
How can I make the interval narrower?
Increase the sample size (the margin of error shrinks with √n) or accept a lower confidence level. Quadrupling n halves the margin of error.
What is the margin of error in polls?
For a proportion near 50% with n = 1,000 at 95% confidence, the margin of error is about 1.96 × √(0.25 ÷ 1000) = 3.1 percentage points.
Related calculators
Z-Score Calculator Converts a raw value into a z-score, the number of standard deviations it lies above or below the mean: z = (X − μ) ÷ σ. Enter the value, the mean and the standard deviation, or work backwards from a z-score to the raw value. You also get the probabilities from the standard normal distribution: the left-tailed (percentile), right-tailed and two-tailed p-values and the probability of falling within ±z of the mean, which you can use for hypothesis tests or to compare scores from different scales. Standard Deviation Calculator Calculates the standard deviation of a list of numbers, the most common measure of how spread out data are around their mean. Paste or type your values separated by commas, spaces or new lines, and choose whether they are a sample from a larger group (dividing by n − 1) or the whole population (dividing by n). You also get the variance, mean, count, sum, sum of squared deviations, standard error of the mean, minimum, maximum and range. Average Calculator Finds the average (arithmetic mean) of a list of numbers, together with the count, sum, median, geometric mean, smallest and largest value and the range. Paste or type the numbers separated by commas, spaces or semicolons, in any mix. Anything that is not a number is skipped and listed, so you can see exactly which values went into the result. Useful for test scores, prices, measurements or any other set of data.