Use this free online confidence interval calculator to estimate the range within which a true population mean likely falls, based on your sample mean, standard deviation, and sample size. Choose a 90%, 95%, or 99% confidence level to see the margin of error and interval calculated instantly.
How to Use the Confidence Interval Calculator
Enter your "Sample Mean" - the average value from your sample data.
Enter your "Sample Standard Deviation" - must be zero or greater.
Enter your "Sample Size (n)" - must be a positive whole number.
Select your desired "Confidence Level" (90%, 95%, or 99%).
Click "Calculate" to see the margin of error and confidence interval.
What the Calculator Does
A sample mean is an estimate. Take a different sample from the same population and you would get a slightly different mean. The confidence interval puts a range around your estimate to show how far the true population mean could plausibly be from it.
The tool first finds the standard error, s ÷ √n, which measures how much the sample mean is expected to vary between samples. It multiplies this by the z-value for your confidence level to get the margin of error, then subtracts and adds that margin to the mean. All three outputs are rounded to two decimal places.
Worked Example: Average Electricity Bill
A survey of 64 households in a colony finds an average monthly electricity bill of ₹1,850 with a standard deviation of ₹400. The standard error is 400 ÷ √64 = 400 ÷ 8 = ₹50. The interval at each confidence level is:
Confidence level
z-value
Margin of error
Interval
90%
1.645
₹82.25
₹1,767.75 – ₹1,932.25
95%
1.96
₹98.00
₹1,752.00 – ₹1,948.00
99%
2.576
₹128.80
₹1,721.20 – ₹1,978.80
Higher confidence always produces a wider interval. You buy more certainty that the range contains the true mean by accepting a less precise range.
How Sample Size Affects the Margin
Because n sits under a square root, the margin of error shrinks slowly. With the same ₹400 standard deviation at 95% confidence, 16 households give a margin of ₹196, 64 give ₹98 and 256 give ₹49. Halving the margin of error needs four times as many responses, which is worth knowing before you plan a survey.
Interpreting Results and Limitations
A 95% interval does not mean there is a 95% chance the true mean lies in this particular range. It means that if you repeated the sampling many times, about 95% of the intervals built this way would contain the true mean.
The calculator always uses z-values from the normal distribution. For small samples (roughly under 30) with an unknown population standard deviation, statisticians normally use the t-distribution, which gives a wider interval. For n = 10 at 95%, the t-value is about 2.262 instead of 1.96, so treat small-sample results here as somewhat too narrow.
The interval only accounts for random sampling error. A biased sample, such as surveying only people who reply online, can be far off no matter how narrow the interval looks.
This tool is for means of numeric data. For a proportion, such as the percentage of people who answered "yes", a different formula is used.
Frequently Asked Questions
The calculator computes the margin of error as MOE = Z x (s / √n), where Z is the z-score for your chosen confidence level, s is the sample standard deviation, and n is the sample size. The interval is then [mean - MOE, mean + MOE].
90% confidence uses Z = 1.645, 95% confidence uses Z = 1.96, and 99% confidence uses Z = 2.576. These values come from the standard normal distribution.
For a sample mean of 50, standard deviation of 12, sample size of 30, and 95% confidence: MOE = 1.96 x (12 / √30) ≈ 4.29, giving a confidence interval of roughly [45.71, 54.29].
95% is the common default in reports and research. Use 90% when a narrower, rougher range is acceptable, and 99% when being wrong would be costly, accepting that the interval will be wider.
It is a z-interval: it uses fixed z-values from the normal distribution regardless of sample size. That is a good approximation for larger samples, but for small samples a t-interval, which is wider, is the more appropriate choice.