Core formula for infinite (large) population: n = z² × p × (1−p) / e², where z is the critical value for confidence level (1.96 for 95%, 2.58 for 99%, 1.645 for 90%), p is the expected proportion (0.5 if unknown - the worst case that maximises required sample), and e is the margin of error in decimal (0.03 for ±3%). The formula derives from the standard error of a proportion: SE = √(p(1-p)/n), set equal to e/z and solve for n.
Finite population correction: when sampling more than ~5% of a known finite population N, adjust: n = n₀ / (1 + (n₀-1)/N). For very large N, this barely changes n₀; for small N (like surveying 500-person company), it significantly reduces required sample. Example: n₀ = 384 (95% conf, ±5%, p=0.5) reduces to 217 for a 500-person population. The intuition: when you sample a large fraction, your sample contains more of the truth, so you need fewer to be confident.
Practical adjustments: factor in expected response rate. If you need 1,000 completed responses and response rate is 30% (typical for online surveys), you need to invite 3,300 people. For panel surveys, response rates can be 60-70%; for cold email, 5-15%. Multiply target n by 1/response_rate to get gross sample needed. Stratified sampling (separate samples by region, age, gender) may need larger total samples but produce more accurate sub-group estimates.