Math · Machine learning · Predictive value

Positive predictive value calculator.

How likely is a positive result to be a real positive? Combine a classifier or test's sensitivity and specificity with how common the positive class is, using Bayes' theorem.

With 90% sensitivity, 90% specificity and 1% prevalence, a positive result is correct only 8.3% of the time (PPV), and a negative result is correct 99.89% of the time (NPV). Out of 10,000 cases: 90 true positives against 990 false positives.

PPV = sens·prev / (sens·prev + (1−spec)(1−prev))Opened sources 15 October 2026

Advertisement

Inputs

%
%
%
Share of cases that are truly positive in the population being tested.

Your result

Fill the form and press Calculate.

The formulas

Sensitivity and specificity describe a test from the direction of the truth; predictive values approach the data from the direction of the result. Altman and Bland's BMJ statistics note on predictive values explains that predictive values, unlike sensitivity and specificity, depend heavily on how common the condition is in the population tested. The positive predictive value is the proportion of positive results that are true positives. By Bayes' theorem: PPV = sens × prev / (sens × prev + (1 − spec)(1 − prev)) and NPV = spec × (1 − prev) / (spec × (1 − prev) + (1 − sens) × prev). The same arithmetic applies to any binary classifier, such as a spam filter or fraud model.

Worked example

Sensitivity 90%, specificity 90%, prevalence 1%. In 10,000 cases, 100 are positive: 90 are caught (true positives) and 10 missed. Of 9,900 negatives, 10% are flagged wrongly: 990 false positives. PPV = 90 / (90 + 990) = 8.33%. Raise prevalence to 10% and PPV rises to 50.0% with the same test. This is the base-rate effect: when positives are rare, even a good classifier produces mostly false alarms.

Notes

Use the prevalence of the population your classifier will actually run on, not the prevalence in a balanced test set. This is a probability calculation for learning about classifiers and test statistics; it is not medical advice and cannot interpret an individual result. Clinical decisions belong with a qualified professional.

Sources, opened 15 October 2026: Altman DG, Bland JM (1994), Statistics Notes: Diagnostic tests 2: predictive values, BMJ 309:102.

Frequently asked questions

What is positive predictive value?

The probability that a positive result is a true positive: true positives divided by all positive results. It depends on prevalence as well as on sensitivity and specificity.

Why is my PPV so low with a 90% accurate test?

When the positive class is rare, the many negatives produce more false positives than the few positives produce true positives. At 1% prevalence, 90% sensitivity and 90% specificity give a PPV near 8%.

What is the difference between PPV and precision?

They are the same quantity. Machine-learning papers say precision; diagnostic-test papers say positive predictive value.

What is NPV?

Negative predictive value: the probability that a negative result is a true negative, true negatives divided by all negative results.

Which prevalence should I enter?

The share of truly positive cases in the population the classifier or test will be applied to. A published study's prevalence may differ from yours, which changes the predictive values.

Education only, not medical advice

This calculator illustrates how base rates affect predictive values for classifiers and tests. It does not interpret any individual medical result and must not be used for diagnosis or treatment decisions. Talk to a qualified health professional about real test results.

Advertisement
Advertisement