When the population standard deviation is known, the formula for a confidence interval (CI) for a population mean is x̄ ± z* σ/√n, where x̄ is the sample mean, σ is the population standard deviation, n is the sample size, and z* represents the appropriate z*value from the standard normal distribution for your desired confidence level.
z*values for Various Confidence Levels  
Confidence Level  z*value 

80%  1.28 
90%  1.645 (by convention) 
95%  1.96 
98%  2.33 
99%  2.58 
In this case, the data either have to come from a normal distribution, or if not, then n has to be large enough (at least 30 or so) in order for the Central Limit Theorem to be applied, allowing you to use z*values in the formula.
To calculate a CI for the population mean (average), under these conditions, do the following:
Determine the confidence level and find the appropriate z*value.
Refer to the above table.

Find the sample mean (x̄) for the sample size (n).
Note: The population standard deviation is assumed to be a known value, σ.

Multiply z* times σ and divide that by the square root of n.
This calculation gives you the margin of error.

Take x̄ plus or minus the margin of error to obtain the CI.
The lower end of the CI is x̄ minus the margin of error, whereas the upper end of the CI is x̄ plus the margin of error.

Because you want a 95 percent confidence interval, your z*value is 1.96.

Suppose you take a random sample of 100 fingerlings and determine that the average length is 7.5 inches; assume the population standard deviation is 2.3 inches. This means x̄ = 7.5, σ = 2.3, and n = 100.

Multiply 1.96 times 2.3 divided by the square root of 100 (which is 10). The margin of error is, therefore, ± 1.96(2.3/10) = 1.96*0.23 = 0.45 inches.

Your 95 percent confidence interval for the mean length of walleye fingerlings in this fish hatchery pond is 7.5 inches ± 0.45 inches.
(The lower end of the interval is 7.5 – 0.45 = 7.05 inches; the upper end is 7.5 + 0.45 = 7.95 inches.)
After you calculate a confidence interval, make sure you always interpret it in words a nonstatistician would understand. That is, talk about the results in terms of what the person in the problem is trying to find out — statisticians call this interpreting the results “in the context of the problem.”
In this example you can say: “With 95 percent confidence, the average length of walleye fingerlings in this entire fish hatchery pond is between 7.05 and 7.95 inches, based on my sample data.” (Always be sure to include appropriate units.)