Skip to content
FiftyCalc Free calculators for all 50 states

Conditional Probability Calculator

Test cases replayed : 2 of 2 match · Methodology · No outside source listed

Enter the joint probability of A and B and the probability of each event, as numbers between 0 and 1.

Result

Sample figures

P(A | B), A given B—

P(B | A), B given A —

  • Independent events?—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Conditional Probability Calculator

P(A and B), both happen (0 to 1): enter a number from 0 to 1. Prefilled example: 0.12.

P(A) (0 to 1): enter a number from 0 to 1. Prefilled example: 0.3.

P(B) (0 to 1): enter a number from 0 to 1. Prefilled example: 0.4.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. P(A and B), both happen (0 to 1): enter a number from 0 to 1.
  2. P(A) (0 to 1): enter a number from 0 to 1.
  3. P(B) (0 to 1): enter a number from 0 to 1.
  4. Read the result: P(A | B), A given B; the panel also shows P(B | A), B given A and Independent events?.

How this calculator works

P(A | B) = P(A and B) ÷ P(B) and P(B | A) = P(A and B) ÷ P(A). The conditional probability is the share of B's outcomes in which A also happens.

A and B are independent exactly when P(A and B) = P(A) × P(B), which is the same as P(A | B) = P(A).

The formula

  1. Agb=pabpb
Symbols used in the formula
SymbolMeaning
pabP(A and B), both happen (0 to 1)
pbP(B) (0 to 1)
AgbP(A | B), A given B

Worked example

P(A and B), both happen (0 to 1)0.12
P(A) (0 to 1)0.3
P(B) (0 to 1)0.4
P(B | A), B given A0.4
Independent events?Yes: P(A and B) = P(A) × P(B)
  1. Agb=0.120.4=0.3

P(A | B), A given B 0.3

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

If 12% of students play both sports and 40% play soccer, what share of soccer players also play basketball?

P(basketball | soccer) = 0.12 ÷ 0.4 = 0.3.

Can P(A | B) be larger than P(A)?

Yes, when B makes A more likely; it is smaller when B makes A less likely, and equal when they are independent.

Questions answered

Related calculators