Bayes' Theorem Calculator

Use our Bayes' theorem calculator to calculate Bayes theorem instantly. Includes a simple explanation of Bayes' theorem, Bayes theorem with examples, and Bayes theorem examples with solutions to show when and why it’s used.

P(A) %
Enter the prior probability of A.
P(B|A) %
Enter the probability of B given A.
P(B|A) %
Enter the probability of B given not A.
Results
P(A|B)
Calculated as (P(B|A) × P(A)) ÷ P(B).
Did we solve your problem today?

What is Bayes' Theorem?

Bayes' theorem is a probability rule for updating what you believe about an event (A) after observing related evidence (B). In plain terms, it tells you how to revise a probability when you learn new information.

If you’re looking for a simple explanation of Bayes theorem, it connects four probabilities: P(A), P(B), P(B|A), and the result P(A|B). This is why it’s often described as a way to “flip” conditional probabilities.

In statistics and probability, Bayes theorem is used to calculate the probability of a hypothesis given evidence. That’s what is Bayes theorem in probability and what is Bayes theorem in statistics in a practical sense—updating probabilities as new data arrives.

Bayes' Theorem Formula

To calculate Bayes theorem, multiply the probability of A by the probability of B given A, then divide by the probability of B.

Bayes' theorem =
P(A|B) = (P(B|A) × P(A)) ÷ P(B)

This is the core Bayes' theorem formula used by a bayesian theorem calculator.

P(A)
= Probability of event A (prior probability)
P(B)
= Probability of event B (evidence probability)
P(B|A)
= Probability of B given A is true
P(A|B)
= Probability of A given B is observed (posterior probability)
Simple Bayes theorem example
P(A)=0.2, P(B)=0.5, P(B|A)=0.8 → P(A|B)=(0.8×0.2)/0.5=0.32

So after observing B, the probability of A becomes 0.32 (32%).

Bayes theorem used to calculate (what it’s doing)
Update belief after evidence

It takes a prior probability P(A) and updates it using evidence B via P(B|A) and P(B).

How to Use the Bayes' Theorem Calculator

  1. 1

    Enter P(A): the probability of event A.

  2. 2

    Enter P(B): the probability of event B.

  3. 3

    Enter P(B|A): the probability of B given A.

  4. 4

    View the result P(A|B): the probability of A given B (Bayes' theorem result).

Frequently Asked Questions

How do I calculate Bayes theorem?

Use P(A|B) = (P(B|A) × P(A)) ÷ P(B).

What is Bayes theorem in probability?

It’s a rule for finding the probability of A given B (P(A|B)) using P(A), P(B), and P(B|A).

What is Bayes theorem in statistics?

It’s used to update a probability estimate for a hypothesis after observing data (evidence).

How do you know when to use Bayes theorem?

Use it when you want the probability of a cause/hypothesis given an observed effect/evidence—especially when you have P(B|A) but need P(A|B).

Is this a Bayes' theorem calculator / bayesian theorem calculator?

Yes—this page is a Bayes' theorem calculator that computes P(A|B) from P(A), P(B), and P(B|A).

Do you have Bayes theorem with examples?

Yes—see the simple Bayes theorem example above and the example-style explanations in the formula section.

Do you have Bayes theorem examples with solutions?

Yes—the example in the formula section shows the full substitution and final solution for P(A|B).

What if P(B) is 0?

Bayes' theorem divides by P(B). If P(B)=0, P(A|B) is undefined because the evidence event B has zero probability.

Explore more calculators
Browse by category to find related tools.