Set up the formula used for calculating required sample size: [Z^2 x (1-P) x P] / I^2.
Z signifies the number of standard deviations the given data is above or below the mean and is also a conversion of your confidence level for the true proportion being within your study's range. The three most common Z values are 90%, Z = 1.645; 95%, Z = 1.96; 99%, Z = 2.575. P signifies the proportion you estimated for your study expressed in decimal form (i.e.: 35% of people are expected to vote for drink "A" as their favorite, p = .35). I signifies how accurate you want your study to be by setting a maximum acceptable error rate, expressed in decimal form. For example, if the maximum room for error you want to allow is 4% then I = .04.
Plug the values you have into the equation.
Solve the equation. For example: For your study you want to be within 4 percent of the actual population, are 95% confident and estimate the proportion to be 35%. Then: [( 1.96^2 x (1 - .35) x .35] / .02^2 = 2184.91 meaning 2,185 people would be the minimum sample size.