How the confidence interval calculator works
A sample mean is your best single guess at the population mean, but it's almost never exactly right — a different random sample would have given a slightly different average. A confidence interval turns that single guess into an honest range. The calculator finds the standard error (how much sample means typically wobble), multiplies it by a z-value that matches your chosen confidence level, and stretches that margin of error on either side of your sample mean.
The formula
Here x̄ is the sample mean, s is the sample standard deviation, n is the sample size, and z is the critical value for your confidence level: 1.645 for 90%, 1.960 for 95%, and 2.576 for 99%. The quantity s ÷ √n is the standard error, and z × (s ÷ √n) is the margin of error.
Worked example
You test 36 students and find a mean score of 100 with a standard deviation of 15, and you want 95% confidence:
Standard error = 15 ÷ √36 = 15 ÷ 6 = 2.5
Margin of error = 1.960 × 2.5 = 4.9
CI = 100 ± 4.9 = 95.1 to 104.9. You can be 95% confident (in the repeated-sampling sense) that the true average score of the whole population lies in that range.
What "95% confident" does — and doesn't — mean
The most common misreading of a confidence interval is "there's a 95% chance the true mean is between 95.1 and 104.9." Strictly, that's wrong: the true mean is a fixed (if unknown) number, so it's either in the interval or it isn't. The 95% describes the method — build intervals this way from repeated random samples, and about 95 in 100 of them will capture the truth. Your interval is one draw from that process. Two practical notes: this calculator uses z-values, which is standard practice and accurate for n ≥ 30; for small samples, a t-distribution gives slightly wider intervals that account for the extra uncertainty in estimating s. And the interval only covers sampling error — a biased sample (surveying only your happiest customers, say) produces a beautifully precise interval around the wrong answer.