# How to Calculate Sample Size from a Confidence Interval

By Michael Keenan; Updated April 25, 2017

When researchers are conducting public opinion polls, they calculate the required sample size based on how precise they want their estimates to be. The sample size is determined by the confidence level, expected proportion and confidence interval needed for the survey. The confidence interval represents the margin of error in the results. For example, if a poll with a confidence interval of plus or minus 3 percentage points showed 56 percent of the people supported a candidate, the true proportion would probably be between 53 and 59 percent.

Square the Z-score required for your desired confidence level. For example, if you used a 95 percent confidence level, meaning that you can say with 95 percent certainty that the true proportion will fall in your confidence interval, your Z-score would be 1.96, so you would multiply 1.96 times 1.96 to get 3.8416.

Estimate the proportion of the largest group. If you are unsure, use 0.5 as the expected proportion because the closer the two proportions, larger the sample size you will need. For example, if you expected 60 percent of people to vote for the incumbent, you would use 0.6.

Subtract the expected proportion from 1. Continuing the example, you would subtract 0.6 from 1 to get 0.4.

Multiply the result from Step 3 by the proportion from Step 2. In this example, you would multiply 0.4 times 0.6 to get 0.24.

Multiply the result from Step 4 by the result from Step 1. Continuing the example, you would multiply 3.8416 by 0.24 to get 0.921984.

Square the confidence interval, expressed as a decimal, for your survey. For example, if your confidence interval equals plus or minus 2 percentage points, you would square 0.02 to get 0.0004.

Divide the result from step 5 by the confidence interval squared to calculate the required sample size. In this example, you would divide 0.921984 by 0.0004 to get 2,304.96, meaning that you would need a sample size of 2,305 people for your survey.