Skip to main content

U.S. flag An official website of the United States government

Animal and Plant Health Inspection Service
U.S. Department of Agriculture
USDA FAQ's and resources about coronavirus (COVID-19).  LEARN MORE

Random Sampling Calculator

To implement a random sampling method, every member of the study population of interest from which the sample size was determined must be listed in sequential order. This list is referred to as the sampling frame. Each member comprising the sampling frame is referred to as a sampling unit. These sampling units are then randomly chosen from among those in the sampling frame, using either a table of random numbers or an automated random number generator, until the required sample size is met.

This calculator is used in Section 4: Sampling Plan, Sample Size section of the surveillance plan.

How to use the Simple Random Sampling Calculator

  • Open the Simple Random Sampling Calculator located here:
  • This random sample generator asks for the following information:
    • Now many sets of numbers do you want to generate?
Typically, enter only the number, "1", unless you need to generate more than one set of numbers at a time (e.g., when randomly assigning animals to experimental conditions in a 'blocked' research design).
    • How many numbers per set?
Enter the number of premises or animals that matches your sample size
    • Number range:
Enter the lowest and highest sequential number in your sampling frame for the study population, e.g. if 50 animals are in the study population
To: 50
    • Do you wish each number in a set to remain unique?
Choose "Yes"
    • Do you wish to sort the numbers that are generated?
Choose "Yes: Least to greatest (ascending order)" or "Yes: greatest to least (descending order)"
    • How do you wish to view your random numbers?
Choose "Place Markers Off" so that each random number is separated with a comma
  • Upon pressing the "Randomize Now!" button, the calculator should automatically produce a new window showing the numerical list of the specific premises or animals to sample in your chosen ascending or descending order. In the upper-right hand corner of this window you can then choose to print the list or download it in Excel.
  • Double check that (1) any number generated by the calculator, which corresponds to a premises or animal, is not larger than the size of your study population and (2) the number of specific premises or animals listed by the calculator equals the sample size inputted into the calculator. If either one or both of these values are incorrect, this calculator is not operating properly.

Complementary Content