Define your required margin of error, \"e.\" According to Pam Hunter, director of the Center for Survey Research and Analysis at the University of Connecticut's Stamford campus, the math for calculating sample size is fairly simple and can often be looked up in a table. See resource 2 for a link to one such table.
Specify alpha. Alpha is the significance level for a hypothesis test and 1- Confidence level for an estimation problem.
Find the z-score. For an estimation problem or two-tailed hypothesis test, the z-score is 1-alpha/2. For a one-tailed hypothesis test, z is 1-alpha (these are cumulative probabilities).
Specify the size of the population, N, if known.
Plug your numbers into on of four common formulas: for known populations choose either n = [ z^2 * ?^2 * { N / (N - 1) } ] / [ e^2 + { z^2 * ?^2 / (N - 1) }] (known mean) or n = [ ( z^2 * p * q ) + e^2 ] / [ e^2 + z^2 * p * q / N ] (known proportion). For unknown populations choose n = ( z^2 * ?^2 ) / e^2 (known mean) or n = [ ( z^2 * p * q ) + e^2 ] / ( e^2 )(known proportion).
.