Conditional Probability Calculator

Conditional probability is the probability of A given that B has happened. Enter P(A and B) and P(B).

P(A | B) = P(A and B) ÷ P(B)

Example: 12% of students take both statistics and economics and 40% take economics. The probability that an economics student also takes statistics is 0.12 ÷ 0.40 = 0.30. To reverse a conditional probability, use Bayes’ theorem.

Conditional probability from a table

With a two-way table of counts, P(A | B) is the count in the A-and-B cell divided by the total of the B row or column. For example, if 30 of 75 smokers have a condition, P(condition | smoker) = 30 ÷ 75 = 0.40. P(A | B) is generally not the same as P(B | A); confusing the two is a common error known as the prosecutor’s fallacy.