Confidence interval calculator
Math & numbersHow precise is your sample's estimate?
The confidence interval for a mean or a proportion from a sample, with the margin of error and the method used.
What you enter stays on your device while you use this tool. Opening a shared link sends the settings in its address to HowToolbox to prepare the page.
Method
95% confidence interval
46.27 – 53.73
For the mean: 50.00 ± 3.73, from a sample of 30.
More about the interval
- Margin of error
- ± 3.73
- Standard error
- 1.83
- Critical value t (29 degrees of freedom)
- 2.0452
Sponsored Links
The confidence interval for a mean or a proportion from a sample, with the margin of error and the method used.
How to use
- Choose whether you estimate a mean (an average) or a proportion (a share of yes answers).
- Enter the sample's mean and standard deviation, or how many successes it had, with the sample size and the confidence level.
- Read the interval as the answer; open Method to switch between t and z, or Wilson and Wald.
Sponsored Links
How it works
A sample gives an estimate, and a confidence interval says how far off that estimate could plausibly be. A 95 % interval comes from a method that catches the true value in 95 % of samples; it does not mean the true value is in this particular range with 95 % probability, but it is a good guide to the precision.
For a mean the interval is x̄ ± t × s ÷ √n, where x̄ is the sample mean, s the standard deviation, n the sample size and t the critical value of Student's t distribution with n − 1 degrees of freedom (use z when the population's σ is known). For a mean of 50 with s = 10 from 30 people, t = 2.045 and the 95 % interval is 50 ± 3.73, so 46.27 to 53.73. For a proportion the Wilson score interval is the default because it stays sensible with small samples and shares near 0 % or 100 %; the plain Wald interval p̂ ± z × √(p̂(1 − p̂) ÷ n) is offered for comparison. Sources: the NIST/SEMATECH e-Handbook and Newcombe (1998).
The interval covers only random sampling error. It cannot correct a biased sample, and the t interval assumes the data are roughly normal or the sample is large.
Worked example
What is a 95% interval for mean 100, known population standard deviation 15 and sample size 100?
- Standard error: 15 ÷ √100 = 1.5.
- Using the z method, the margin is 2.94.
The interval is 100 ± 2.94: from 97.06 to 102.94.
Frequently asked questions
What does a 95 % confidence interval mean?
If you repeated the survey or experiment many times, about 95 % of the intervals calculated this way would contain the true value.
When should I use t instead of z?
Use t when the standard deviation was measured from the same sample, which is almost always. Use z only when the population's standard deviation is known beforehand.
Why is the proportion interval not centred on my sample share?
The Wilson interval is pulled slightly towards 50 %, which makes it more accurate for small samples and for shares near 0 % or 100 %.
How do I make the interval narrower?
Collect a larger sample: the width shrinks with the square root of the sample size, so four times as many observations halve it. A lower confidence level also narrows it.
Does the interval contain 95% of individual observations?
No. A confidence interval for a mean estimates the population mean. It is not a range for individual observations or a prediction interval.
Next you might need
- A/B test significance calculatorConversion rates, lift, p-value and the confidence interval of an A/B test, with the sample size it needs., private, runs on your deviceMoney & financeCalculatorStatistics
- Average calculatorMean, median, mode and range of a list of numbers, with the count, sum, smallest and largest., private, runs on your deviceMath & numbersCalculatorStatistics
- Combinations and permutations calculatorExact counts of combinations and permutations, with or without repetition, and the chance of one particular pick., private, runs on your deviceMath & numbersCalculatorStatistics
- Percentage calculatorPercent of a number, what percent one number is of another, percentage change and difference, and the number before a discount., private, runs on your deviceMath & numbersCalculatorCostsStatistics
- Fraction calculatorAdd, subtract, multiply and divide fractions and mixed numbers, or turn a decimal into a fraction, with the answer in lowest terms., private, runs on your deviceMath & numbersCalculator
- GCD and LCM calculatorThe greatest common divisor and the least common multiple of two to ten whole numbers, with the Euclidean steps., private, runs on your deviceMath & numbersCalculatorReference
More in Math & numbers
All 24 utilities in Math & numbers- Area of shapesArea and perimeter of rectangles, circles, triangles and eight more shapes, drawn to scale., private, runs on your device
- Number base converterConvert whole numbers between binary, octal, decimal, hexadecimal and any base up to 36., private, runs on your device
- Prime number checkerTest any whole number up to 100 digits for primality, with its prime factors and the next and previous prime., private, runs on your device
- Ratio calculatorSimplify a ratio to its lowest terms, or find the missing number in an equal ratio, the rule of three., private, runs on your device
- Scientific calculatorType a calculation or use the keys., private, runs on your device
- Scientific notation converterWrite a number in scientific and engineering notation with the significant figures you choose, or turn 6.022e23 back into digits., private, runs on your device
Popular now
Sponsored Links
Sponsored Links
Sponsored Links