Skip to content

Conditional Probability Calculator

P(A|B) from P(A and B) and P(B).

Reviewed by James Whitfield · How we check our maths

Your values

ⓘ Live results

Results
P(A | B)
50%
P(A and B)
15%
P(B)
30%

Quick answer

Conditional probability P(A|B) equals the probability of both A and B occurring, divided by the probability of B.

The formula

P(A|B) = P(A∩B)/P(B)

Worked example

Worked example

Using the values the calculator loads with.

Inputs

  • P(A and B)0.15
  • P(B)0.3

Result

  • P(A | B)50%
  • P(A and B)15%
  • P(B)30%

How to use the Conditional Probability Calculator

  1. 1Enter the joint probability of both events A and B occurring.
  2. 2Enter the probability of the conditioning event B.
  3. 3Divide to get the conditional probability of A given B.

Frequently asked questions

What if P(B) is zero?

Conditional probability is undefined since you can't condition on an impossible event.

How is this related to Bayes' theorem?

Bayes' theorem rearranges this same relationship to flip the condition around.

About this calculator