Enter your sample size, mean and standard deviation to get the margin of error and the confidence interval for the true average.
You measured a sample, not everyone. The sample mean is your best single guess for the true average of the whole group, but it will not be exactly right. A confidence interval puts a range around that guess. A 95% interval means that if you repeated the whole sampling process many times, about 95 out of 100 of the intervals built this way would contain the true mean. Strictly, the 95% describes the method, not one particular interval. In everyday use, read it as “the true value is probably somewhere in here”. A higher confidence level gives a wider range.
CI = x̄ ± (critical value) × s ÷ √n. The part s ÷ √n is the standard error, and the critical value (z or t) times the standard error is the margin of error. Add and subtract it from the sample mean to get the lower and upper bounds.
Say you timed 50 customers at a checkout. The average wait was 20.6 minutes with a standard deviation of 3.2. The standard error is 3.2 ÷ √50 = 0.4525. For a 95% interval the z-value is 1.96, so the margin of error is 1.96 × 0.4525 = 0.887 minutes, and the interval runs from 19.713 to 21.487 minutes. In plain words: the typical wait across all customers is probably between about 19.7 and 21.5 minutes. The calculator also draws this as an error bar, with the sample mean as the dot.
The calculator uses the z-value by default, which is correct when the population standard deviation is known or the sample is large (30 or more is the common rule of thumb). With a small sample where you only have the sample standard deviation s, the t-distribution is better. It gives a larger critical value, so the interval is wider and more honest about the extra uncertainty. For example, with 10 values a 95% interval uses t = 2.262 instead of 1.96, which makes the margin of error about 15% larger (2.289 instead of 1.983 for SD 3.2). Even for the default n = 50, t = 2.010 gives a margin of 0.909 instead of 0.887. Tick the t-distribution box to see the difference on your own numbers.
If you are still planning a study, the Sample Size Calculator works backward from the margin of error you want to the number of observations you need.
In a simulation with a fixed seed, 10,000 samples of 50 were drawn from a population with a true mean of 20 and a standard deviation of 3.2, and a 95% t-interval was built from each. The true mean fell inside 95.0% of them, close to the promised 95%. The simulation is an illustration of the method, not of your data.
If you have raw numbers, paste them into the Statistics Calculator or the Standard Deviation Calculator and copy the count, mean and sample standard deviation across. To see where 1.96 comes from, the Z-score Calculator converts a confidence level into its z-value: 95% leaves 2.5% in each tail.
The large line shows the mean plus or minus the margin of error, with the lower and upper bounds underneath. The steps line shows exactly which numbers were used. If the interval is too wide to be useful, the table of options above shows what to change.
Take the sample mean and add and subtract the margin of error. The margin of error is the critical value (z or t) times the standard deviation divided by the square root of the sample size.
It is 1.96. For 90% it is about 1.645 and for 99% it is about 2.576.
It means the method used would capture the true mean in about 95 out of 100 repeated samples. A higher level gives a wider interval.
Use t when the sample is small, usually under 30, and you only know the standard deviation from the sample. For large samples the two give almost the same answer.
A larger sample gives a smaller margin of error. Because of the square root, you need four times the sample size to halve the margin.
Not directly. This is for a mean. For a proportion the formula is p plus or minus z times the square root of p(1 - p) divided by n.
Sources: NIST/SEMATECH e-Handbook: What are confidence intervals?; NIST/SEMATECH e-Handbook: Critical values of the Student's t
Pick another tool to jump straight to it.
Get the mean, count and standard deviation from your data.
LiveWork out how many responses you need.
LiveSee where critical values like 1.96 come from.
LivePopulation or sample, with a margin-of-error table.