Formula and method
For expected proportion p and margin e, n₀ = z²p(1 − p)/e². A finite population N adjusts this to n₀/[1 + (n₀ − 1)/N]; round up.
Worked example
At 95% confidence, 50% expected proportion and a 5 percentage-point margin, an unspecified population needs 385 completed responses. A population of 1,000 needs 278.