Positive Predictive Value Calculator
Enter the confusion-matrix counts to compute PPV and related metrics.
Result
How it is calculated
Enter the four counts of a 2×2 table: TP, FP, FN and TN. The tool returns PPV = TP ÷ (TP + FP), NPV = TN ÷ (TN + FN), sensitivity = TP ÷ (TP + FN) and specificity = TN ÷ (TN + FP), each as a percentage. The inputs are numbers of people or cases, not rates, and none may be negative. If there are no positive results at all (TP + FP = 0) there is no output, because PPV is undefined. For the other three measures, an empty denominator is shown as 0.00% rather than an error, so a 0.00% there may mean no data in that row or column, not a truly poor test.
Worked example
Screening 1,000 people, 50 actually have the condition. The test finds 45 of them (TP = 45, FN = 5) and wrongly flags 15 of the 950 healthy people (FP = 15, TN = 935). PPV = 45 ÷ (45 + 15) = 75.00%. NPV = 935 ÷ 940 = 99.47%. Sensitivity = 45 ÷ 50 = 90.00%. Specificity = 935 ÷ 950 = 98.42%. Even with a specificity of about 98%, one in four positive results here is a false alarm, because the condition is rare in this group.
Common mistakes
- Reusing PPV from one population for another. PPV and NPV depend on how common the condition is, so a value from a hospital clinic does not carry over to general screening; enter counts from the group you care about.
- Swapping FP and FN. This changes PPV into something close to NPV and makes a cautious test look reckless, or the other way around.
- Entering percentages instead of counts. Counts of 90, 10, 80 and 20 are treated as 200 people, which fixes the prevalence at 50% and gives a misleadingly high PPV.
- Reading 0.00% in NPV, sensitivity or specificity as a failed test. It can simply mean that the row or column had no cases to calculate from.
Sources
- Diagnostic tests 2: Predictive values — BMJ, 1994
- Diagnostic tests. 1: Sensitivity and specificity — BMJ, 1994
About this calculator
From a 2×2 confusion matrix of true positives (TP), false positives (FP), true negatives (TN) and false negatives (FN), this calculator derives four core diagnostic metrics: positive predictive value PPV = TP/(TP+FP) — the chance a positive result is really positive; negative predictive value NPV = TN/(TN+FN); sensitivity (recall) = TP/(TP+FN); and specificity = TN/(TN+FP).
Unlike sensitivity and specificity, PPV and NPV shift with how common the condition is in the population being tested, which is exactly why they matter in practice. Clinicians and epidemiologists use PPV to judge how much to trust a positive screening result in a given patient population, while data scientists use the same 2×2 breakdown to evaluate a binary classifier's precision and decide whether it's reliable enough to deploy, especially on imbalanced datasets.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
PPV depends on how common the condition is in the group you are testing, while sensitivity and specificity describe the test itself. So counts from a study that recruited equal numbers of affected and unaffected people will give a PPV that does not carry over to a general population where the condition is rare. Before comparing two tests, ask where each table came from. Are your four counts from screening or from a case-control design?