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.

๐Ÿงช Post-Test Probability Calculator
Pre-Test Probability (%)20
%
0%100%
Sensitivity (%)85
%
0%100%
Specificity (%)95
%
0%100%
Pre-Test Probability (%)20
%
0%100%
Test Result Type
Likelihood Ratio5
0.0150
Post-Test Prob (Positive)
Post-Test Prob (Negative)
LR+ (Positive LR)
LR- (Negative LR)
Pre-Test Odds
PPV
Post-Test Prob (Positive Test)
Post-Test Odds
Pre-Test Odds

๐Ÿงช 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

Positive Test    P(D|T+)  =  (P × Se) ÷ (P × Se + (1−P) × (1−Sp))
P = pre-test probability (prevalence in the tested population)
Se = sensitivity (true positive rate)
Sp = specificity (true negative rate)
Example: P = 20%, Se = 85%, Sp = 95%: numerator = 0.20 × 0.85 = 0.17; denominator = 0.17 + 0.80 × 0.05 = 0.17 + 0.04 = 0.21; post-test prob = 0.17/0.21 = 81.0%
Negative Test    P(D|T−)  =  (P × (1−Se)) ÷ (P × (1−Se) + (1−P) × Sp)
P(D|T-) = probability of disease despite a negative test result
1 − Se = false-negative rate (miss rate)
Sp = specificity (probability of a negative result in healthy people)
Example: P = 20%, Se = 85%, Sp = 95%: numerator = 0.20 × 0.15 = 0.030; denominator = 0.030 + 0.80 × 0.95 = 0.790; post-test prob = 3.8%
Likelihood Ratio Method    Post-test odds  =  Pre-test odds × LR
Pre-test odds = P ÷ (1 − P)
LR+ = Se ÷ (1 − Sp)    (positive likelihood ratio)
LR- = (1 − Se) ÷ Sp    (negative likelihood ratio)
Post-test prob = post-test odds ÷ (1 + post-test odds)
Example: Pre-test prob 20%, LR+ = 5: pre-test odds = 0.25; post-test odds = 1.25; post-test prob = 1.25/2.25 = 55.6%

๐Ÿ“– How to Use This Calculator

Steps

1
Choose calculation mode - Select Sensitivity and Specificity if you know those test properties, or Likelihood Ratio if you have LR+ or LR- values from the test documentation.
2
Enter pre-test probability - Enter the estimated probability of disease before the test as a percentage. Use prevalence data for the relevant patient subgroup, not the general population.
3
Enter test properties - For Sens/Spec mode, enter sensitivity and specificity as percentages. For LR mode, choose positive or negative test from the dropdown and enter the likelihood ratio value.
4
Click Calculate - Press Calculate to see post-test probability for positive and negative test results, LR+, LR-, pre-test odds, and positive predictive value side by side.

๐Ÿ’ก 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?

1
Numerator = P × Se = 0.30 × 0.75 = 0.225.
2
Denominator = 0.225 + (1 − 0.30) × (1 − 0.99) = 0.225 + 0.70 × 0.01 = 0.225 + 0.007 = 0.232.
3
Post-test probability (positive) = 0.225 / 0.232 = 97.0%. The positive test result is highly convincing at this prevalence.
Post-test prob (positive) = 97.0% | LR+ = 75 | Post-test prob (negative) = 10.4%
Try this example →

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?

1
Numerator = 0.01 × 0.75 = 0.0075.
2
Denominator = 0.0075 + 0.99 × 0.01 = 0.0075 + 0.0099 = 0.0174.
3
Post-test probability = 0.0075 / 0.0174 = 43.1%. Despite the same high-specificity test, less than half of positive results are true positives in a 1% prevalence setting.
Post-test prob (positive) = 43.1% | This is the base-rate (prevalence) effect in action
Try this example →

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?

1
Pre-test odds = P / (1 − P) = 0.20 / 0.80 = 0.25.
2
Post-test odds = pre-test odds × LR- = 0.25 × 0.08 = 0.020.
3
Post-test probability = 0.020 / (1 + 0.020) = 1.96%. The negative D-dimer effectively rules out PE at this pre-test probability.
Post-test prob (negative test) = 1.96% | PE effectively excluded
Try this example →

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?

1
LR+ = 90% / (1 − 90%) = 0.90 / 0.10 = 9. LR- = (1 − 90%) / 90% = 0.10 / 0.90 = 0.111.
2
Post-test prob (positive): numerator = 0.60 × 0.90 = 0.54; denominator = 0.54 + 0.40 × 0.10 = 0.58; result = 93.1%.
3
Post-test prob (negative): numerator = 0.60 × 0.10 = 0.06; denominator = 0.06 + 0.40 × 0.90 = 0.42; result = 14.3%. A negative test still leaves substantial probability at this pre-test level.
Post-test prob (positive) = 93.1% | Post-test prob (negative) = 14.3%
Try this example →

โ“ Frequently Asked Questions

What is post-test probability and how is it calculated?+
Post-test probability is the probability of disease after learning a 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 LR, then post-test prob = post-test odds / (1 + post-test odds). Both formulas give the same result.
What is the difference between sensitivity, specificity, and post-test probability?+
Sensitivity is the fraction of diseased patients who test positive (true positive rate). Specificity is the fraction of healthy patients who test negative (true negative rate). These are fixed test properties. Post-test probability also depends on the pre-test probability, which varies by patient. The same test gives different post-test probabilities for a high-risk specialist referral versus a low-risk population screen.
How do I calculate post-test probability from a likelihood ratio?+
Step 1: Pre-test odds = P / (1-P). Step 2: Post-test odds = pre-test odds times LR. Step 3: 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 = 1.25 / 2.25 = 55.6%.
What likelihood ratio values are clinically meaningful?+
LR+ above 10 (or LR- below 0.1) produces large, often decisive, probability shifts. LR between 5 and 10 (or LR- 0.1-0.2) produces moderate shifts. LR between 2 and 5 (or LR- 0.2-0.5) produces small shifts. LR close to 1 means the test result barely changes the pre-test probability and provides minimal diagnostic value. LR+ = Se / (1-Sp); LR- = (1-Se) / Sp.
Why does a 99% accurate test give 50% post-test probability in a 1% prevalence population?+
With 1% prevalence, 99% sensitivity, and 99% specificity: in 10,000 people, 100 are diseased (99 test positive, 1 false negative) and 9,900 are healthy (99 test positive as false positives, 9,801 test negative). Among the 198 positive tests, only 99 are true positives: PPV = 99/198 = 50%. This is the base-rate fallacy. The test is not less accurate; the low prevalence makes false positives abundant relative to true positives.
What is the difference between PPV and post-test probability?+
Positive predictive value (PPV) and post-test probability for a positive test are the same thing: the probability of disease given a positive result. Negative predictive value (NPV) is the probability of no disease given a negative result, which equals 1 minus the post-test probability for a negative test. Both PPV and NPV change with prevalence, unlike sensitivity and specificity.
What pre-test probability should I use in the calculator?+
Use the estimated probability of disease before the test result is known, specific to your patient population. Sources include: published prevalence for the condition in a comparable demographic, a validated clinical prediction rule (such as the Wells score for PE or DVT), or clinical judgment. Using the wrong pre-test probability (for example, using general-population prevalence for a high-risk referral) is the most common error in Bayesian reasoning.
How does a sensitivity of 100% affect post-test probability?+
If sensitivity = 100%, there are no false negatives. The negative post-test probability = (P times 0) / (P times 0 + (1-P) times Sp) = 0. A perfectly sensitive test, when negative, completely rules out the disease. This is why high-sensitivity tests are used for rule-out purposes. Conversely, LR- = (1-1)/Sp = 0, meaning a negative result multiplies the pre-test odds by zero.
What is a Fagan nomogram?+
A Fagan nomogram is a graphical tool for computing post-test probability from pre-test probability and a likelihood ratio. It has three vertical axes: pre-test probability (left), likelihood ratio (middle), and post-test probability (right). Drawing a straight line from the pre-test probability through the LR intersects the right axis at the post-test probability. This calculator performs the same calculation numerically using the formula: post-test odds = pre-test odds times LR.
Can this calculator be used outside of medicine?+
Yes. The same Bayesian framework applies anywhere a binary classifier is tested against a population with a known base rate. Examples: quality control (defect detection rate, false alarm rate, defect prevalence in a production run), information retrieval (precision and recall), email spam filtering (spam prevalence, filter sensitivity, filter specificity), and machine learning classifier evaluation. The mathematical structure is identical to the medical diagnostic context.
What is the formula for LR+ and LR- from sensitivity and specificity?+
LR+ = Sensitivity / (1 minus Specificity). LR- = (1 minus Sensitivity) / Specificity. For a test with 85% sensitivity and 95% specificity: LR+ = 0.85 / 0.05 = 17, LR- = 0.15 / 0.95 = 0.158. An LR+ of 17 means a positive result is 17 times more likely in a diseased person than in a healthy person. LR- of 0.158 means a negative result is 6.3 times more likely in a healthy person than in a diseased person.
What happens when pre-test probability is very high (above 90%)?+
When pre-test probability is very high, even a negative test result may leave substantial post-test probability. For example, with pre-test probability 90% and LR- = 0.1: pre-test odds = 9, post-test odds = 0.9, post-test probability = 47%. The disease is still nearly as likely as not despite a negative test. This is why high pre-test probability patients often need additional testing even after a negative result from a single test.