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

Animal Sample Size Calculator

This calculator uses an electronic spreadsheet (Excel) to assist the veterinary epidemiologist in estimating the minimum number of animals to sample from a premises regardless of the the disease control zone where the premises is located.

This calculator is used in Section 4: Sampling Plan, Sample Size - Number of Animals/Individuals to Sample section of the surveillance plan.     

How to use the Animal Sample Size Calculator

To find the recommended minimum sample size to test for disease, open the Animal Sample Size Calculator and then:

  • Insert the diagnostic sensitivity (Sn) of the test to be used. If a range of test sensitivities is given, use the lower end for a more conservative sample size (greater number of samples).

Tip: In order to design the sampling plan correctly, make sure to enter the same diagnostic sensitivity value into all calculators used.

  • Adjust the confidence level at the top of the calculator, if a level different from the default 95% is desired.
  • View the sample size matrix and select the column that corresponds to the expected threshold prevalence of disease (0.01%-95%) in the herd or flock to be sampled. The recommendation is to use a 5% intraherd disease threshold (prevalence).
  • View the sample size matrix and select the row that is equal to (or nearest to) the size of the herd or flock (1-100,000) to be sampled.
  • Read the number listed at the intersection of the selected row and column.

This number corresponds to the minimum number of individuals that should be sampled from the herd or flock.


Tip: Use the output from the calculators as a guide for the sampling plan. Disease situations, veterinary knowledge, epidemiologic expertise, or other factors such as resource limitations (e.g. monetary, personnel) may indicate a need for sample sizes that are more or less conservative than the estimates provided from these calculators. If a deviation from the sample size estimate must be made, particularly downward, for either number of premises or number of animals within a premise to sample, a matrix (Probability of Failure to Detect Diseased Animals Calculator) is provided to evaluate what the change to this altered sample size means in terms of what the probability likely is of failing to detect diseased animals (or premises) that are present in the sample.

About the Animal Sample Size Calculator

Four pieces of information must be known1 in order to determine the minimum number of samples to test to detect a disease, if it is present, in a specific population:

  1. Population size - the size of the specific animal population
  2. Disease prevalence - the likely prevalence of disease in the specific animal population. The recommendation is to use a 5% intra-herd disease prevalence.
  3. Test sensitivity - the diagnostic sensitivity of the test being used to identify infected animals
  4. Confidence level - the degree of certainty (confidence level ) wanted that the test results reflect the true disease status of the specific animal population; it must be equal to the herd/flock sensitivity value (for an explanation, go to Premises Sample Size Calculator section entitled “About the Premises Sample Size Calculator”) The recommendation is to use 95%; the calculator is set to this level.

Population size

The larger the proportion of animals sampled relative to the total population, the greater the likelihood of detecting disease, if it is present in the population.  This is because the progressive sampling of negative animals from the population increases the probability that the next animal sampled will be positive2. This effect is insignificant if the population to be surveyed is very large compared to the sample size.

Disease prevalence

The higher the prevalence of disease in the herd or flock, the smaller the sample size that is required to detect an infected animal2.  Thus, a sample size can be chosen such that, if the sample is negative, it may be concluded that it is unlikely that any animal in the herd or flock has the disease.

A common prevalence figure is typically used for all herds or flocks that will be tested in the various premises classifications specific to each disease zone because the veterinary epidemiologist is interested in detecting disease at a certain threshold level. The recommendation is to use a 5% intraherd disease threshold. The prevalence can be adjusted based on the epidemiologic characteristics of the disease and/or prior knowledge of results of surveys in other herds or flocks and/or expert opinion.

Alternatively, the veterinary epidemiologist may find it desirable to use a different prevalence estimate for each herd or flock, depending on which stage (infected, infectious) of the disease he/she believes the herd or flock is in at the time of testing. 

Test sensitivity

When the objective of testing a herd or flock is to detect the presence of disease, the veterinary epidemiologist should focus on the test’s diagnostic sensitivity (Sn) and not its specificity.  A test with perfect (100%) sensitivity will correctly classify as ‘positive’ all truly infected animals present in the sample of animals being tested, but an imperfect test will misclassify some truly infected animals in the sample as uninfected (false-negative)1. The proportion of animals misclassified is equivalent to the degree of imperfection in the sensitivity of the test.  For example, a test with 90% sensitivity should correctly classify 90% of the truly infected animals in the sample as ‘positive’ and 10% of the truly infected animals in the sample as ‘negative’ (false-negative).  Thus, in order to decrease the number of false-negatives, the test being used to identify diseased animals should be as close to perfection (100% sensitive) as possible.

Confidence level

By adopting a sampling procedure, the veterinary epidemiologist is acknowledging that an absolute statement about the true herd disease status cannot be made based on the results of testing.  However, the larger the sample selected, the greater the confidence that can be placed in the results. Confidence levels (α) that have generally been used in disease surveys are 95% or, occasionally, 99%.  The recommendation is to use a 95% confidence and the calculator has been set to this level. For example, suppose that the sample size has been chosen to give a 95% confidence that a test will detect disease if it is present in 10% of the animals in the herd.  This means that, on average, 5 out of 100 herds with a 10% prevalence of disease would not be detected as infected.

Complementary Content
${loading}