🧠 Bayes’ Theorem & Diagnostic Test Calculator

Convert test accuracy metrics into posterior probabilities. Enter disease prevalence, sensitivity, and specificity to compute Positive Predictive Value (PPV), Negative Predictive Value (NPV), false-positive rate, and false-negative rate.

Input Diagnostic Test Metrics

Values must be percentages between 0 and 100.

Estimated proportion of population with the condition.

Probability the test is positive when the condition is present.

Probability the test is negative when the condition is absent.

Number of decimal places shown in results.

Bayesian Outputs

Positive Predictive Value (PPV)

Probability of having the condition after a positive test.

Negative Predictive Value (NPV)

Probability of being disease-free after a negative test.

False Positive Rate

Equals 1 − Specificity.

False Negative Rate

Equals 1 − Sensitivity.

How to Use

  1. Enter disease prevalence (prior probability), sensitivity, and specificity as percentages. Adjust decimal precision if you need more or fewer digits.
  2. Click Calculate Posterior Probabilities to compute PPV, NPV, and the associated error rates.
  3. Review the outputs; the calculator highlights undefined cases (e.g., division by zero) so you can correct inputs.
  4. Use the reset button to clear fields when analysing a new diagnostic test scenario.

Formula References

Explore More Probability Tools