Post-Test Probability Calculator
Enter pre-test probability with sensitivity and specificity, or a likelihood ratio, to find post-test probability using Bayes theorem instantly.
🧪 What is Post-Test Probability?
Post-test probability is the probability that a patient has a condition after learning the result of a diagnostic test. It is the core output of Bayes' theorem applied to medical diagnosis and is the most clinically actionable piece of information that a test can provide. Unlike sensitivity and specificity, which are fixed properties of the test, post-test probability changes with every patient because it depends on the patient's pre-test probability (how likely the condition was before the test was run).
This calculator has three important real-world applications. In clinical medicine, a physician ordering a troponin test for chest pain uses an estimated pre-test probability (based on age, symptoms, and risk factors) combined with the test's sensitivity and specificity to determine how much the positive or negative result should change their diagnosis. In epidemiology, a public health researcher uses post-test probability to evaluate the usefulness of a screening program in a low-prevalence population. In statistics and machine learning, the same mathematics appears as the precision (positive predictive value) of a classifier and is fundamental to understanding confusion matrices.
A common misconception is that a highly sensitive or specific test always produces reliable results. A 99% sensitive, 99% specific test still produces a positive post-test probability of only 50% when applied to a population with 1% prevalence. This is the base-rate fallacy, and it explains why mass screening programs in low-prevalence populations often produce large numbers of false positives. The pre-test probability is not optional background information, it is a required input to any Bayesian calculation.
The two calculation methods in this tool are mathematically equivalent. The Sensitivity and Specificity mode applies Bayes' theorem directly and also reports the positive and negative likelihood ratios. The Likelihood Ratio mode uses the odds-ratio form of Bayes' theorem (post-test odds = pre-test odds times LR), which is faster when only the LR is known from a published study. Both approaches yield the same post-test probability for the same inputs.
📐 Formulas
📖 How to Use This Calculator
Steps
💡 Example Calculations
Example 1 - COVID-19 Rapid Antigen Test in a Moderate-Risk Population
A patient in a workplace outbreak cluster (pre-test probability 30%) tests positive on a rapid antigen test (sensitivity 75%, specificity 99%). What is the post-test probability?
Example 2 - Same Test in a Low-Risk Population (Base-Rate Effect)
The same rapid antigen test (sensitivity 75%, specificity 99%) is used in a community with only 1% prevalence. What is the positive post-test probability?
Example 3 - Using Likelihood Ratio Directly (D-dimer for PE)
A patient with clinical Wells score has pre-test probability of 20% for pulmonary embolism. A D-dimer test comes back negative, with LR- = 0.08. What is the post-test probability?
Example 4 - High Pre-Test Probability with a Confirmatory Test
A patient with classic symptoms has 60% pre-test probability. A confirmatory test has sensitivity 90% and specificity 90%. What is the post-test probability if positive? If negative?
❓ Frequently Asked Questions
🔗 Related Calculators
What is post-test probability and how is it calculated?
Post-test probability is the probability of disease given a specific test result. For a positive test: P(D|T+) = (P times Se) / (P times Se + (1-P) times (1-Sp)), where P is pre-test probability, Se is sensitivity, and Sp is specificity. Equivalently, post-test odds = pre-test odds times likelihood ratio, then convert odds to probability.
What is the difference between sensitivity, specificity, and post-test probability?
Sensitivity is the fraction of true positives correctly identified (true positive rate). Specificity is the fraction of true negatives correctly identified (true negative rate). These are fixed properties of the test. Post-test probability also depends on the pre-test probability (prevalence), which varies by patient population. Two patients with identical test results can have very different post-test probabilities if their pre-test probabilities differ.
How do you calculate post-test probability from a likelihood ratio?
Step 1: Convert pre-test probability to odds: pre-test odds = P / (1-P). Step 2: Multiply by the likelihood ratio: post-test odds = pre-test odds times LR. Step 3: Convert back to probability: post-test probability = post-test odds / (1 + post-test odds). For pre-test probability 20% and LR+ = 5: pre-test odds = 0.25, post-test odds = 1.25, post-test probability = 55.6%.
What is a likelihood ratio and what values are clinically significant?
LR+ = Sensitivity / (1 - Specificity). LR- = (1 - Sensitivity) / Specificity. An LR+ greater than 10 or LR- less than 0.1 produces large and often decisive shifts in probability. LR between 5-10 (or 0.1-0.2) produces moderate shifts. LR between 2-5 (or 0.2-0.5) produces small shifts. LR close to 1 produces negligible change (the test is not diagnostically useful).
What pre-test probability should I use in the calculator?
Use the estimated probability of disease in your specific patient or population before the test result is known. This can come from published prevalence data for the condition in a similar demographic, from a clinical scoring tool, or from clinical judgment. Using a population-level prevalence when your patient is high-risk will underestimate the post-test probability significantly.
What is the difference between post-test probability and PPV?
Positive predictive value (PPV) is the probability of disease given a positive test result, which is the same as the post-test probability for a positive test. Negative predictive value (NPV) is the probability of no disease given a negative test result, which equals 1 minus the post-test probability for a negative test. PPV and NPV depend on prevalence; sensitivity and specificity do not.
Why does post-test probability depend on prevalence?
Because Bayes theorem requires a prior probability. In a population where the condition is very rare (1%), even a test with 99% sensitivity and 99% specificity gives a positive result post-test probability of only 50%. In a population where the condition is common (50%), the same test gives a positive post-test probability of 99%. This is why the same test can be clinically useful in one population and misleading in another.
What are typical sensitivity and specificity values for medical tests?
Many common diagnostic tests fall in the 70-95% range for both sensitivity and specificity. PCR tests for infectious diseases typically have sensitivity 85-98% and specificity 95-99.9%. Rapid antigen tests are often lower: 50-85% sensitive, 95-99% specific. Imaging modalities vary widely. Enter the values from the test's validation study for the most accurate post-test probability.