Confidence interval, margin of error, and standard deviation

The confidence interval gives lower and upper bounds around the sample mean. The margin of error is the distance from that mean to either bound for this symmetric method. Increasing the confidence level widens the interval when other inputs stay the same.

This calculator uses a z interval with a known population standard deviation. If you only have a sample standard deviation, a t interval is generally the appropriate mean-interval method. Having 30 observations does not make the population standard deviation known.

Spreadsheet functions distinguish sample standard deviation (STDEV.S) from population standard deviation (STDEV.P). Calculating STDEV.P on a sample does not turn that sample into the population. Choose a method that matches how your data was collected.