Works on this device
Negative Predictive Value Calculator
Find the share of negative test results that are true negatives. 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 NPV, the working, and a table and chart of the NPV at other prevalences.
The formula (Bayes' rule)
With sensitivity se, specificity sp and prevalence p (all as fractions of 1):
NPV = sp × (1 − p) ÷ (sp × (1 − p) + (1 − se) × p)
The top part is the share of everyone tested who do not have the condition and test negative (true negatives). The bottom part adds the share who have it but still test negative (false negatives).
The same rule in odds: odds after a negative result = odds before the test × LR−, where LR− = (1 − se) ÷ sp. Then NPV = 1 ÷ (1 + odds after).
From a 2×2 table: NPV = TN ÷ (TN + FN), with a Wilson or Clopper-Pearson confidence interval.
Why the NPV depends on prevalence
A test with a sensitivity of 90% and a specificity of 95% gives an NPV of 99.79% where 2% of the people tested have the condition, 97.44% where 20% have it, and 90.48% where 50% have it. Where a condition is common, more of the negative results come from people who have it.
Worked example
Sensitivity 90%, specificity 95%, prevalence 2%. True negatives: 0.95 × 0.98 = 0.931 of everyone tested. False negatives: 0.1 × 0.02 = 0.002. NPV = 0.931 ÷ (0.931 + 0.002) = 0.931 ÷ 0.933 = 99.79%.
The same numbers give a PPV of 26.87% in the Positive Predictive Value Calculator.
From a table with 870 true negatives and 10 false negatives: NPV = 870 ÷ 880 = 98.86%.
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 NPV 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 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.