Bayes' Theorem Calculator

Combine your prior probability with test accuracy numbers to calculate a posterior probability. This Bayes' theorem calculator outputs the updated chance (in percent) that a hypothesis is true after considering new information.

Base rate of the condition or event before observing new evidence.
Probability of seeing the evidence when the hypothesis is true.
Probability of the evidence appearing even though the hypothesis is false.

Assumes independent evidence and accurate input probabilities.

Examples

  • Medical screening: 2% base rate, 95% sensitive test, 3% false positive ⇒ 39.2% posterior
  • Quality control: 20% defective prior, 85% detection rate, 5% false alarm ⇒ 77.27% chance the item is defective

FAQ

What is a prior probability?

A prior reflects the baseline chance that the hypothesis is true before you incorporate any new evidence.

Why does the calculator use percentages instead of decimals?

Percentages are intuitive for most users. The calculation converts them to decimals internally, performs Bayes' theorem, and returns a percentage posterior.

Can probabilities exceed 100%?

No, inputs should be between 0 and 100%.

What does the result represent?

The posterior probability: how likely the hypothesis is true after observing the evidence.

How can I account for false negatives?

Use `(100 - false negative rate)` as the likelihood input, because the likelihood represents the probability of the evidence when the hypothesis is true.

Additional Information

  • Results are percentages. Divide by 100 if you need the posterior probability as a decimal for spreadsheets or code.
  • Ensure the likelihood and false positive probabilities come from the same study or test conditions for meaningful outputs.