Most of the sciences and social sciences use statistics to understand what is studied. In order to make statistical analysis manageable, researchers must define their sample size rather than attempt to work with an entire population. The purpose of a sample is to gain knowledge about a population using an unbiased representation that can be easily observed and measured. This is why it is necessary to choose a sample size that is large enough to represent the population as a whole but small enough to make measuring and recording observations possible.
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.
Always use some form of random sampling wherever possible. This ensures that your sample is unbiased and most accurately represents the population as a whole.