PPV / NPV & Prevalence Calculator
Turn a test's sensitivity and specificity into predictive values at any prevalence — the base-rate calculator.
The defaults show the base-rate fallacy starkly: a 99%-sensitive, 95%-specific test for a 1%-prevalence condition has a PPV of only ~17% — over 80% of positive results are false. This is why screening positives need confirmatory testing.
Formula
Note: Educational tool for understanding test statistics and the base-rate effect. Not medical advice — real diagnostic decisions require professional interpretation with accurate, context-specific prevalence.
Disclaimer: This tool is for general informational and estimation purposes only and is not professional financial, tax, accounting or legal advice. All figures are estimates — verify with a qualified professional before making decisions. Read the full disclaimer.
About PPV / NPV & Prevalence Calculator
The most counter-intuitive fact in diagnostics: a highly accurate test can be wrong most of the time it says 'positive', if the condition is rare. This is the base-rate effect, and this calculator makes it concrete. Enter sensitivity, specificity and prevalence and it applies Bayes' theorem to return the predictive values that actually matter to a person holding a result — PPV (given a positive, how likely is it true?) and NPV — plus the false-discovery rate. The default scenario shows a 99%/95% test for a 1%-prevalence condition yielding just ~17% PPV.
How to use PPV / NPV & Prevalence Calculator
- 1Enter your values into PPV / NPV & Prevalence Calculator — sensible, domain-typical defaults are pre-filled so you see a real result immediately.
- 2The result recomputes live using the formula shown on the page; there is no button to press.
- 3Adjust any input to compare scenarios, then read the worked example to see the substituted numbers.
Why use PPV / NPV & Prevalence Calculator?
- ✓Computes PPV / NPV & Prevalence instantly in your browser — no sign-up, no upload, no server round-trip.
- ✓100% free and unlimited, with the exact formula shown: PPV = (sens.
- ✓Runs entirely client-side, so every value you enter stays private on your device.
- ✓Live recompute as you type, with a worked example and authoritative references for trust.
Frequently asked questions
Why does a 99% accurate test give so many false positives?+
Because 'accuracy' isn't predictive value. With a rare condition (1% prevalence), the 99% of healthy people vastly outnumber the sick — so even a small false-positive RATE (5% of a huge group) produces more false positives than the test's true positives (99% of a tiny group). PPV captures this; accuracy hides it.
How do I improve PPV?+
Raise specificity (fewer false positives) or test a higher-prevalence population (screen those with symptoms or risk factors rather than everyone). This is why doctors don't screen the whole population for rare diseases — pre-selecting raises prevalence and thus PPV. Confirmatory testing achieves the same by sequencing tests.
What's the difference between sensitivity and PPV?+
Sensitivity is a property of the TEST: of people who have the condition, what fraction test positive. PPV is about a RESULT: of people who test positive, what fraction have the condition. Sensitivity is fixed; PPV swings wildly with prevalence. Confusing them is the root of most test misinterpretation.
Does this apply outside medicine?+
Entirely — it's the same math as precision in any rare-class problem: fraud detection, spam, security alerts, defect screening. 'Our model flags fraud with 99% accuracy' means little if fraud is 0.1% of transactions; the PPV of those flags is what determines whether analysts are chasing ghosts.
Related tools
- Classification Metrics — Confusion Matrix & Metrics Calculator
- Spam Filter — Confusion Matrix & Metrics Calculator
- Medical Diagnostic Test — Confusion Matrix & Metrics Calculator
- Fraud Detection — Confusion Matrix & Metrics Calculator
- Customer Churn Prediction — Confusion Matrix & Metrics Calculator
- Sentiment Analysis — Confusion Matrix & Metrics Calculator
- ROUGE Score Calculator
- Perplexity Calculator
Related ML & AI tools
ROC-AUC Calculator (from TPR/FPR points)
Trapezoidal area under the ROC curve from your (FPR, TPR) operating points — the threshold-independent ranking score.
● LiveClassification Threshold Cost Calculator
Find the probability cutoff that minimizes expected cost given your false-positive and false-negative penalties.
● LiveSilhouette Score Calculator
Cluster cohesion vs separation for one point — the building block of the silhouette metric for choosing K.
● Live