The sample size for any study depends on the type of the population, is it finite population or infinite population.
In the case of finite population, you can use the attached table to estimate the suitable sample size. Or use Slovin formula:
n= N / ( 1+ N * e^2 )
But in the case of an infinite population:
The sample size for any study depends on the standard deviation of the variable ( from previous studies ) and the margin of error you decided. The formula:
n= ( Z^2 * S^2) / E^2
where : Z ( 1.96 for 0.05 and 2.58 for 0.01 )
S = standard deviation from previous studies or pilot study
E = significant level
Also, you can use software to calculate sample size ( SPSS , Minitab , G*power )
My advice to use G*Power .
G*Power software is effective tool to calculate sample size for many ranges of experiments. Also, you can determine effect size and power of the test, G*Power is free to download and easy to use after reading the manual, the download link: