Conditional Probability Calculator
P(A given B) from the joint and marginal probabilities — with Bayes' theorem run in both directions and a check on whether the two events are independent.
Conditional probability rescales the world to the cases where B happened: P(A | B) = P(A ∩ B) ÷ P(B).
How the conditional probability calculator works
Conditional probability rescales the world to the cases where B happened: P(A | B) = P(A ∩ B) ÷ P(B). Bayes' theorem then reverses it, P(B | A) = P(A | B) P(B) ÷ P(A), which is how a test result becomes a probability about the thing being tested.
If P(A | B) equals P(A), knowing B told you nothing and the events are independent.
Formula: P(A | B) = P(A ∩ B) / P(B)
Worked examples
| Inputs | P(A | B) | Note |
|---|---|---|
| P(A)=30%, P(B)=40%, joint 18% | 45% | P(A|B) = 45% |
| Independent events | 50% | P(A|B) = P(A) = 50% |
| Mutually exclusive | 0% | P(A|B) = 0 |
FAQFrequently asked questions
What does P(A | B) mean?
The probability of A among only the cases where B happened — the world narrowed to B.
How is it different from P(A and B)?
The joint is a share of everything; the conditional is a share of B alone. The joint is always the smaller of the two.
What if P(A | B) equals P(A)?
The events are independent — knowing B changed nothing.
Why does the order matter?
P(A | B) and P(B | A) are different questions and usually different numbers. Confusing them is the base-rate fallacy, and it is the single most common statistical mistake in medicine and law.
What is lift?
The joint probability divided by what independence would predict. Above 1 means the events go together more often than chance.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- National curriculum in England — Mathematics — the terms and methods taught in UK schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.