Sample size calculator
A 95% confidence level with a ±5% margin and no assumption about the answer needs 385 responses, whatever the population — and 384 is the figure most often quoted because of a rounding convention. It is why so many surveys land at "about 400 respondents". Assuming 50% is deliberately the worst case: any other expected proportion needs fewer.
Sample size for a proportion is z² × p(1−p) ÷ margin². At 95% confidence with a ±5% margin and no prior expectation, that is 385 responses — regardless of population size unless the population is small.
How to work out sample size
Sample size answers only sampling error — the randomness of who happened to respond. It says nothing at all about the far larger problems of non-response bias, a badly worded question, or a sample frame that misses the people you care about. A survey of 10,000 self-selected website visitors is worse evidence than 400 properly randomised responses, and no sample size calculation will reveal that. The number here is necessary and a long way from sufficient.
Questions
385 for ±5% at 95% confidence. About 1,067 for ±3%, and 9,604 for ±1%.