Design your experiment. The sample size will depend on what type of research you conduct, such as performing interviews, doing surveys, reporting voting patterns or measuring molecules.
Calculate the population size. Your research likely has the goal of finding something out about a population, and in order to determine how many observations you need to make (your sample size), it's necessary to know how many total possible observations are available.
Specify the level of accuracy you want from your research. The sample size directly determines the margin of error or the width of the confidence interval, two statistical measurements that can be used to judge how accurately your research tracks to the larger population.
Calculate your ideal sample size. Do this by using a formula or an estimate. Statistical software often provides formulas for calculating sample size. You can use such software, or you can estimate your sample size given your research design, size of population and level of accuracy.