← Math & statistics

StatisticsClassification

NPV & PPV Calculator

Other languages 日本語 | English

Enter TP, FP, TN, and FN to calculate observed PPV and NPV, then optionally test how predictive values move when prevalence changes.

Use this page when sensitivity and specificity alone are not enough and the next question is what a positive or negative call means in a population with a given base rate.

How to use

  1. Enter TP, FP, TN, and FN from one binary classification result.
  2. Optionally add a scenario prevalence if deployment prevalence differs from the observed sample.
  3. Compare observed PPV / NPV with the projected values before you reuse the result in another setting.

Wave 7 classification metrics

Predictive values move with the base rate

This page keeps the threshold fixed and shows what that operating point means to end users. Add an optional prevalence scenario when the study sample is not the deployment population.

Inputs

Run a calculation to review PPV and NPV.

Predictive values move with prevalence

Sensitivity and specificity describe the test itself. PPV and NPV describe what the call means in a population. If positives become rarer, PPV usually falls even when sensitivity and specificity stay fixed. If positives become more common, NPV usually falls.

When to use scenario prevalence

Use a scenario prevalence when the study sample and the deployment population differ. This is common when a high-risk cohort is used for validation but the real rollout serves a broader population.

When to stay with observed values

If the observed sample already matches the population you care about, leave scenario prevalence blank and report the observed PPV and NPV directly.

Frequently asked questions

Why do PPV and NPV depend on prevalence?

Predictive values combine the test characteristics with the base rate. When positives become rarer, PPV usually falls because false positives take a larger share of all positive calls. When positives become more common, NPV usually falls for the same reason on the negative side.

Should I enter a scenario prevalence?

Enter one when you want to reuse the same sensitivity and specificity in a different setting. This helps when the study sample and the real deployment population have different base rates.

What if I leave scenario prevalence blank?

The page uses the observed prevalence from TP, FP, TN, and FN. That gives you the predictive values for the sample already in front of you.

Does the share URL include my counts or labels?

No. The share URL stores only lightweight settings such as decimal places and the optional scenario prevalence. Counts and labels stay in your browser.

Comments (optional)

To reduce load, comments are fetched only when needed.