The definition of the length of a confidence interval is perhaps obvious, but let's formally define it anyway.
 Length of the Interval

If a confidence interval for a parameter \(\theta\) is:
\(L<\theta<U\)
then the length of the interval is simply the difference in the two endpoints. That is:
\(\text{Length} = U − L\)
We are most interested, of course, in obtaining confidence intervals that are as narrow as possible. After all, which one of the following statements is more helpful?
 We can be 95% confident that the average amount of money spent monthly on housing in the U.S. is between \$300 and \$3300.
 We can be 95% confident that the average amount of money spent monthly on housing in the U.S. is between \$1100 and \$1300.
In the first statement, the average amount of money spent monthly can be anywhere between \$300 and \$3300, whereas, for the second statement, the average amount has been narrowed down to somewhere between \$1100 and \$1300. So, of course, we would prefer to make the second statement, because it gives us a more specific range of the magnitude of the population mean.
So, what can we do to ensure that we obtain as narrow an interval as possible? Well, in the case of the \(Z\)interval, the length is:
\(Length=\left[\bar{X}+z_{\alpha/2}\left(\dfrac{\sigma}{\sqrt{n}}\right)\right]\left[ \bar{X}z_{\alpha/2}\left(\dfrac{\sigma}{\sqrt{n}}\right)\right]\)
which upon simplification equals:
\(Length=2z_{\alpha/2}\left(\dfrac{\sigma}{\sqrt{n}}\right)\)
Now, based on this formula, it looks like three factors affect the length of the \(Z\)interval for a mean, namely the sample size \(n\), the population standard deviation \(\sigma\), and the confidence level (through the value of \(z\)). Specifically, the formula tells us that:
 As the population standard deviation \(\sigma\) decreases, the length of the interval decreases. We have no control over the population standard deviation \(\sigma\), so this factor doesn't help us all that much.
 As the sample size \(n\) increases, the length of the interval decreases. The moral of the story, then, is to select as large of a sample as you can afford.
 As the confidence level decreases, the length of the interval decreases. (Consider, for example, that for a 95% interval, \(z=1.96\), whereas for a 90% interval, \(z=1.645\).) So, for this factor, we have a bit of a tradeoff! We want a high confidence level, but not so high as to produce such a wide interval as to be useless. That's why 95% is the most common confidence level used.