Conditional probability calculator
P(A given B) and P(B given A) from P(A), P(B) and P(A and B), with an independence check.
Formula
How it works
P(A|B) is the probability of A once we know B has happened: the chance of both happening, divided by the chance of B alone. Events are independent when knowing one happened does not change the probability of the other, which is when P(A ∩ B) equals P(A) × P(B).
Worked example
The same calculation with the default values:
- P(A) 40 %
- P(B) 50 %
- P(A and B) 25 %
- P(A|B) = 0.25 ÷ 0.5 = 50%
- P(B|A) = 0.25 ÷ 0.4 = 62.5%
Result: P(A | B): 50% · P(B | A): 62.5% · Independence: A and B are dependent
Common mistakes
- Confusing P(A|B) with P(B|A) - these answer different questions and are generally different numbers; mixing them up is one of the most common errors in probability (and in real-world reasoning about test results, for instance).
- Using P(A) instead of P(A ∩ B) in the numerator - conditional probability specifically needs the probability of both events happening together, not just event A on its own.
- Forgetting that P(B) in the denominator must be non-zero - conditioning on an event that cannot happen is undefined, not just a very small probability.
Related calculators
Binomial probability calculator
The probability of exactly k successes in n independent trials, each with the same success probability.
Circle calculator
Diameter, circumference and area of a circle from its radius.
Combinations and permutations calculator
How many ways to arrange or choose r items from n, with and without order mattering.
Coordinate geometry calculator
Distance, midpoint and slope between two points on a coordinate plane.