Bayes theorem calculator

Compute a conditional probability from a prior and two conditional event probabilities.

Enter values

Start with the example below, or enter your own values.

How it works

Use the law of total probability to obtain the denominator. The conditioning event must be possible.

Try an example

P(A): 0.2; P(B | A): 0.8; P(B | not A): 0.1. The form starts with these values; change them to explore your own case.

Example result: 0.666666666667

  1. P(B) = P(A)P(B|A) + P(not A)P(B|not A).
  2. Divide P(A)P(B|A) by P(B).

Learn more in Probability and statistical inference.

Results are calculated locally. Floating-point tools provide numerical approximations, not formal proof certificates.