Works on this device
Positive Predictive Value Calculator
Find the share of positive test results that are true positives. Enter the sensitivity, the specificity and how common the condition is, or the counts of a 2×2 table. The tool is for learning and for checking arithmetic; it is not a diagnosis, and test results should be discussed with a clinician.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose Calculate.
Your result
How it was worked out
How to use this calculator
- Choose From sensitivity, specificity and prevalence if you know the three percentages, for example from a paper and from the group you test.
- Choose From a 2×2 table of counts if you have the counts of a study.
- Enter the numbers and choose Calculate. The result shows the PPV, the working, and a table and chart of the PPV at other prevalences.
The formula (Bayes' rule)
With sensitivity se, specificity sp and prevalence p (all as fractions of 1):
PPV = se × p ÷ (se × p + (1 − sp) × (1 − p))
The top part is the share of everyone tested who have the condition and test positive (true positives). The bottom part adds the share who do not have it but still test positive (false positives).
The same rule in odds: odds after a positive result = odds before the test × LR+, where LR+ = se ÷ (1 − sp). Then PPV = odds after ÷ (1 + odds after).
From a 2×2 table: PPV = TP ÷ (TP + FP), with a Wilson or Clopper-Pearson confidence interval.
Why the PPV depends on prevalence
A test with a sensitivity of 90% and a specificity of 95% gives a PPV of 81.82% where 20% of the people tested have the condition, 26.87% where 2% have it, and only 3.48% where 0.2% have it. Where a condition is rare, most positive results come from the many people who do not have it.
Worked example
Sensitivity 90%, specificity 95%, prevalence 2%. True positives: 0.9 × 0.02 = 0.018 of everyone tested. False positives: 0.05 × 0.98 = 0.049. PPV = 0.018 ÷ (0.018 + 0.049) = 0.018 ÷ 0.067 = 26.87%.
In odds: 0.02 ÷ 0.98 = 0.02041, times LR+ = 0.9 ÷ 0.05 = 18, gives 0.3673. And 0.3673 ÷ 1.3673 = 26.87%.
From a table with 90 true positives and 30 false positives: PPV = 90 ÷ 120 = 75.00%, with a 95% Wilson interval of 66.56% to 81.89%.
Limits you should know
- This tool is for learning and for checking arithmetic. It is not a diagnosis and not medical advice. It does not tell you what your own result means. Discuss test results with a clinician.
- The PPV of a 2×2 table holds only where the condition is as common as in the table. For other groups, type their prevalence under More options.
- Sensitivity and specificity from a paper may not hold for your setting, and the prevalence you type is your own estimate.
- For the negative predictive value use the Negative Predictive Value Calculator. For sensitivity, specificity and likelihood ratios with intervals use the Sensitivity Specificity Calculator.
- Your numbers are worked out on your device. A file that you download or a page that you print contains the numbers you entered.