698 tools
All

Bayes' Theorem Calculator

Update a prior probability using the likelihood and the marginal probability of the evidence.

 

 

 

P(A|B)

About this calculator

Use this calculator to turn a prior P(A) into a posterior P(A|B) once you know how likely the evidence B is if A is true, and how common B is overall. Screening tests, spam filters, and diagnostic sketches are the usual examples.

The formula is: P(A|B) = P(B|A) P(A) / P(B). Enter all three as proportions from 0 to 1. A rare condition (prior 1%) with a sensitive test (99%) and a 5% positive rate has a posterior around 19.8%, not 99%. P(B) must be greater than 0.

You must supply the marginal P(B) yourself; the calculator does not expand it with the law of total probability. It is not a full diagnostic workup and ignores dependence on other tests.

P(A): Prior probability of A, before seeing B.

P(B|A): Likelihood of seeing B if A is true.

P(B): Marginal probability of B, not zero.

P(A|B): Posterior probability of A given B.