Skip to content
Statistics

Post-Test Probability Calculator

Enter the pre-test probability (prevalence), test sensitivity, and test specificity to calculate post-test probability after a positive or negative result. The calculator applies Bayes theorem to compute the positive predictive value (PPV), negative predictive value (NPV), likelihood ratios, and a full breakdown of true/false positives and negatives across any population size you choose.

Your details

The probability that the patient has the disease before the test is run. Often estimated from population prevalence, clinical risk scores, or physician judgment.
%
The probability that the test is positive given that the patient truly has the disease. Also called the true positive rate or recall.
%
The probability that the test is negative given that the patient truly does not have the disease. Also called the true negative rate.
%
A reference cohort size used to compute expected counts of true positives, false positives, true negatives, and false negatives. Does not affect probabilities.
people
Post-test probability (positive result)Moderate PPV
0.7%

Probability of disease given a positive test result (PPV)

Post-test probability (negative result)0%
Positive likelihood ratio (LR+)18
Negative likelihood ratio (LR-)0.105
Positive predictive value (PPV)0.7%
Negative predictive value (NPV)1%
Overall accuracy0.9%
True positives (TP)90
False positives (FP)45
True negatives (TN)855
False negatives (FN)10
0.7% PPV
Very low PPV<0.2Low PPV0.2-0.5Moderate PPV0.5-0.7High PPV0.7-0.9Very high PPV0.9+
049.9599.915099
Pre-test probability (%)
  • PPV (positive result)
  • NPV (negative result)

PPV 66.7%, NPV 98.8% at 10% prevalence.

  • A positive result means there is a 66.7% chance the patient actually has the condition (PPV). Of every 100 people who test positive, about 67 truly have it.
  • A negative result means there is only a 1.2% chance the patient still has the condition. The NPV is 98.8%, so the test is highly reassuring when negative.
  • The positive likelihood ratio is 18.00, which is strong evidence for disease when the test is positive (LR+ above 10 is considered a large shift in probability).

Next stepUse post-test probability to guide the next diagnostic or treatment step. If the probability after a positive result is still below your action threshold, a second test or specialist referral may be warranted.

Formula

LR+=sensitivity1specificity,LR=1sensitivityspecificityPost-test odds=Pre-test odds×LRPPV=sensitivity×prevalencesensitivity×prevalence+(1specificity)×(1prevalence)LR^+ = \frac{\text{sensitivity}}{1 - \text{specificity}}, \quad LR^- = \frac{1 - \text{sensitivity}}{\text{specificity}}\\[6pt]\text{Post-test odds} = \text{Pre-test odds} \times LR\\[6pt]\text{PPV} = \frac{\text{sensitivity} \times \text{prevalence}}{\text{sensitivity} \times \text{prevalence} + (1 - \text{specificity}) \times (1 - \text{prevalence})}

Worked example

A disease has 10% prevalence. A test has 90% sensitivity and 95% specificity. LR+ = 0.90 / (1 - 0.95) = 18. Pre-test odds = 0.10 / 0.90 = 0.111. Post-test odds after a positive result = 0.111 x 18 = 2.0. Post-test probability = 2.0 / (1 + 2.0) = 66.7%. So even with a strong positive result, one in three positive patients is disease-free at 10% prevalence.

What is post-test probability?

Post-test probability is the updated probability that a patient has a disease after the result of a diagnostic test is known. Before the test, the clinician estimates a pre-test probability based on how common the disease is in the population (prevalence) or on the individual patient's risk profile. The test result then shifts this probability upward (after a positive result) or downward (after a negative result) by an amount that depends on how accurate the test is. The two key accuracy metrics are sensitivity, which is the test's ability to detect true cases, and specificity, which is its ability to rule out non-cases. Post-test probability ties these together using Bayes theorem, a mathematical rule for updating probabilities in light of new evidence.

How likelihood ratios drive the calculation

Likelihood ratios (LRs) are the most compact way to express how much a test result changes the probability of disease. The positive likelihood ratio (LR+) equals sensitivity divided by (1 minus specificity). A high LR+ means that a positive result is much more common in diseased people than in healthy people, so it is strong evidence for disease. The negative likelihood ratio (LR-) equals (1 minus sensitivity) divided by specificity. A low LR- means that a negative result is far more common in healthy people, so it is strong evidence against disease. To apply them, convert pre-test probability to odds, multiply by the LR, and convert back to a probability. This is exactly the Bayesian update rule written in odds form.

PPV, NPV, and why prevalence matters so much

Positive predictive value (PPV) is the probability that a person who tests positive actually has the disease. Negative predictive value (NPV) is the probability that a person who tests negative truly does not have the disease. Both depend heavily on prevalence: when a disease is rare, even a highly specific test will produce many false positives, driving PPV down. The classic illustration is a disease with 1% prevalence tested with 99% sensitivity and 99% specificity. Out of 10,000 people, 99 true cases produce 98 true positives, but 9,900 healthy people produce 99 false positives. PPV = 98 / (98 + 99) = about 50%. Half the positive results are false, despite a near-perfect test. This is why the same test used in a high-risk clinic (higher prevalence) will appear far more useful than when used in population-wide screening.

Reading the confusion matrix counts

The calculator outputs the expected number of true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN) for a hypothetical cohort of your chosen size. True positives are diseased people whose test correctly came back positive. False positives are healthy people whose test incorrectly came back positive. True negatives are healthy people correctly identified as disease-free. False negatives are diseased people the test missed. Overall accuracy equals (TP + TN) / total, but accuracy can be misleading for imbalanced data: a test that simply labels everyone as negative achieves high accuracy when disease is rare, even though it is clinically useless. PPV and NPV are more meaningful metrics for clinical decision-making.

Likelihood ratio interpretation guide

LR+ valueLR- valueInterpretationChange in probability
> 10< 0.1 Large and often conclusive Large shift (often +/- 30-45%)
5 to 100.1 to 0.2 Moderate Moderate shift (+/- 15-30%)
2 to 50.2 to 0.5 Small Small shift (+/- 5-15%)
1 to 20.5 to 1 Minimal Minimal shift (< 5%)
11 No diagnostic value No change in probability

Commonly used thresholds for interpreting likelihood ratios in clinical diagnostic testing.

Frequently asked questions

What is the difference between post-test probability and PPV?

They are the same thing after a positive result. Post-test probability after a positive test equals PPV, the probability that a person with a positive test actually has the disease. After a negative result, post-test probability equals 1 minus NPV, which is the residual probability of disease despite a negative test.

Why does PPV go down when disease prevalence is low?

When a disease is rare, the pool of healthy people is large. Even a very specific test will generate false positives from that large pool. With few true positives and many false positives, the fraction of positive results that are real cases (PPV) falls sharply. This is the base rate fallacy: the test accuracy alone does not determine how useful a positive result is, the prevalence does.

What is a good likelihood ratio?

A LR+ above 10 is generally considered strong evidence for disease and usually produces a large upward shift in probability. A LR+ of 2 to 5 produces only a modest shift. For ruling out disease, a LR- below 0.1 is considered strong evidence against disease. Values close to 1 in either direction mean the test result barely changes the pre-test probability.

How do I estimate the pre-test probability?

Pre-test probability can come from published prevalence data for the population being tested, from clinical prediction rules (such as the Wells score for pulmonary embolism or the HEART score for chest pain), or from a clinician's gestalt based on history and examination. Using a systematic estimate rather than vague intuition leads to more calibrated post-test probabilities.

Can I chain multiple tests together?

Yes. After the first test, use the post-test probability as the new pre-test probability for the second test, then apply the second test's LR to get an updated post-test probability. This assumes the two tests are conditionally independent given the true disease status, which may not always hold for tests measuring the same biological pathway.

What is the difference between sensitivity and PPV?

Sensitivity asks: given that a person has the disease, how likely is the test to be positive? It is a property of the test alone and does not depend on prevalence. PPV asks the reverse: given that the test is positive, how likely is the person to have the disease? PPV depends on both the test accuracy and the prevalence, which is why a sensitive test can still have a low PPV in a low-prevalence population.

Sources

Written by Dr. Hannah Brandt, PhD Statistician · Munich, Germany

Applied statistician translating rigorous probability theory into clear, accurate tools for researchers and practitioners.

How we build & check our calculators

This tool provides general information and education, not professional advice. For decisions about your health, consult a qualified professional.

Search 3,500+ calculators

Loading search…