🧮Bayes' Theorem Calculator

Find the posterior probability from prior and likelihood values

%
%
%

How to Use the Bayes' Theorem Calculator

The Bayes' Theorem Calculator finds the posterior probability — your updated belief after observing new evidence — from a prior probability and two likelihood values. The formula is P(A|B) = P(B|A)·P(A) / [P(B|A)·P(A) + P(B|¬A)·P(¬A)], and it's central to interpreting diagnostic test accuracy, spam filtering, and machine learning classification problems.

Enter the prior probability P(A), the likelihood P(B|A) of B given A, and the likelihood P(B|¬A) of B given not-A, all as percentages, and both the posterior probability and total probability P(B) update instantly. When the prior is very low, even an accurate test can produce a posterior probability that's surprisingly small — this calculator lets you see that gap directly.

Frequently Asked Questions

What is Bayes' theorem formula?

P(A|B) = P(B|A)·P(A) / [P(B|A)·P(A) + P(B|¬A)·P(¬A)]. It updates your belief about event A after observing new evidence B.

Why is the real probability low even after a positive diagnostic test?

When the prior probability (disease prevalence) is very low, even a highly accurate test can produce a posterior probability much lower than expected. Bayes’ theorem reveals this exact gap.

What does P(B|¬A) mean?

It's the probability that B occurs when A did not happen — in diagnostic testing, this corresponds to the false positive rate.