Test sensitivity - specificity calculator

Tests are not perfect. Results from tests like those used to diagnose the presence of a disease or infection come with a certain amount of uncertainty. Scientists use the terms sensitivity and specificity to describe the amount of uncertainty associated with a particular test. Values for these two parameters range from 0 to 1. The higher the number, the more accurate the test is.

Knowing these two metrics, along with information about the prevalence of the condition in the population, allows us to assess the likelihood that the results of an individual test are accurate.

The following calculator allows you to see how varying the sensitivity and specificity of a test, the number of individuals tested, and the prevalence of the condition in the population affect the probability of a result being inaccurate.


Number of individuals tested:
Prevalence in the population:
Assay sensitivity:

Assay specificity:

Total number of tests
Reality
Condition present Condition absent
Test results Positive
(+)
True positive
False positive
ppv
%
Negative
(-)
False negative
True negative
npv
%
Case count
Healthy count
Show Retest Data
x

These two metrics are used because they describe different aspects of uncertainty associated with the test.

Sensitivity is the likelihood that someone with the condition will receive a positive test result. A sensitivity of 1 indicates that there is 100% certainty that an individual with the condition gets a positive result on the test. A value of 0.95 means there is a 95% chance that a positive test is accurate. This means that if 100 people with the condition take this test, 5 will receive a (false) negative result.

Specificity is the likelihood that a negative result is accurate. A specificity of 0.95 means there is a 95% chance that someone without the condition will test negative - If 100 healthy people take this test, 5 will receive a (false) positive result.

In many cases, retesting is a reasonable way of increasing confidence in a test result as long as each repetition is truly independent. That is, no confounding factors may cause specific individuals to repeatedly receive false-positive or false-negative results.

Video Overview