Sensitivity and Specificity Calculator

Enter your 2×2 contingency table values — True Positives (TP), False Negatives (FN), False Positives (FP), and True Negatives (TN) — plus an optional disease prevalence (%) to get a full diagnostic test evaluation. You'll receive Sensitivity, Specificity, Accuracy, Positive Predictive Value (PPV), Negative Predictive Value (NPV), Positive Likelihood Ratio (LR+), and Negative Likelihood Ratio (LR−) in one calculation.

Disease present AND test positive

Disease present BUT test negative

Disease absent BUT test positive

Disease absent AND test negative

%

Enter if your sample does not reflect real-world prevalence. Leave at 50 to use sample-derived prevalence.

Results

Sensitivity

--

Specificity

--

Accuracy

--

Positive Predictive Value (PPV)

--

Negative Predictive Value (NPV)

--

Positive Likelihood Ratio (LR+)

--

Negative Likelihood Ratio (LR−)

--

Prevalence Used

--

Diagnostic Test Metrics Overview

Results Table

Frequently Asked Questions

What inputs do I need to use this calculator?

You need four values from your diagnostic study: True Positives (TP), False Negatives (FN), False Positives (FP), and True Negatives (TN). Optionally, you can enter a known disease prevalence percentage if your study sample does not reflect the real-world prevalence of the condition.

How is sensitivity calculated?

Sensitivity = TP / (TP + FN). It measures the proportion of people who truly have the disease that the test correctly identifies as positive. A highly sensitive test rarely misses true cases, making it useful for ruling out disease when the result is negative.

How is specificity calculated?

Specificity = TN / (TN + FP). It measures the proportion of people who do not have the disease that the test correctly identifies as negative. A highly specific test rarely flags healthy people as sick, making it useful for ruling in disease when the result is positive.

What is the difference between PPV and sensitivity?

Sensitivity tells you how well the test detects true disease in people who actually have it — it is independent of prevalence. PPV (Positive Predictive Value) tells you the probability that a person who tests positive actually has the disease, and it depends heavily on how common the disease is in the tested population.

How do I calculate the positive and negative predictive values?

PPV = (Sensitivity × Prevalence) / [(Sensitivity × Prevalence) + ((1 − Specificity) × (1 − Prevalence))]. NPV = (Specificity × (1 − Prevalence)) / [((1 − Sensitivity) × Prevalence) + (Specificity × (1 − Prevalence))]. Both values shift significantly as disease prevalence changes, which is why entering the correct prevalence matters.

What is the likelihood ratio and how do I interpret it?

The Positive Likelihood Ratio (LR+) = Sensitivity / (1 − Specificity). It tells you how much a positive test result increases the odds of disease. LR+ > 10 is considered strong evidence for disease. The Negative Likelihood Ratio (LR−) = (1 − Sensitivity) / Specificity. LR− < 0.1 is considered strong evidence against disease.

How is overall test accuracy calculated?

Accuracy = (TP + TN) / (TP + TN + FP + FN). It represents the proportion of all test results — both positive and negative — that are correct. However, accuracy can be misleading when disease prevalence is very low or very high, so always consider sensitivity, specificity, PPV, and NPV together.

Why does disease prevalence affect PPV and NPV but not sensitivity and specificity?

Sensitivity and specificity are intrinsic properties of the test itself, calculated only from diseased and non-diseased groups respectively. PPV and NPV depend on how many people in the population actually have the disease. In a low-prevalence population, even a highly specific test will produce many false positives relative to true positives, driving PPV down.

More Statistics Tools