How this instrument works
Conditional probability answers a narrower question than plain probability: not 'what's the chance of A out of everything,' but 'what's the chance of A now that we already know B happened.' The formula is P(A|B) = P(A and B) / P(B) — you restrict your universe to just the outcomes where B is true, then ask what fraction of that smaller universe also satisfies A.
That restriction is the whole idea. Instead of dividing by every possible outcome, you divide by only the outcomes consistent with B, because those are the only outcomes still in play once B is known to have occurred. It's the same reasoning behind reading a row or column off a joint-probability table, just expressed as a formula.
If A and B are independent — B's occurrence tells you nothing about A — then P(A|B) works out to exactly P(A), unchanged by the conditioning. When it doesn't, that gap between P(A) and P(A|B) is itself informative: it tells you B and A are related. This site's and-probability calculator computes P(A and B) directly when A and B are independent, feeding straight into this one.
- Enter the chance both A and B happen together into P(A and B) (%).
- Enter B's own probability into P(B) (%) — this can't be zero, since you can't condition on an event that never happens.
- Read P(A | B) (%) beneath them — the chance of A now that B is already known to have occurred.
- Don't have P(A and B) yet? If A and B are independent, this site's and-probability calculator finds it by multiplying P(A) x P(B) first.
- P(A and B) can never exceed P(B) — the instrument flags it if you enter a joint probability larger than B's own probability, since that combination isn't possible.
Worked example — P(King | Face card) in a card deck
Set P(A and B) (%) to 7.692308 — the chance of drawing a card that's both a king and a face card, 4 of the 52 cards — and P(B) (%) to 23.076923 — the chance of drawing any face card at all, 12 of the 52. P(A | B) (%) reads 33.3333%, matching 4 kings out of 12 face cards exactly: 4/12 = 1/3.
Restricting to face cards shrinks the universe from all 52 cards down to just the 12 jacks, queens and kings; within that smaller universe, exactly a third of the cards are kings. That's the intuition behind dividing by P(B) instead of by 100%: once B is known, you're no longer asking 'out of everything,' you're asking 'out of B.'
Questions
What's the intuitive meaning of P(A|B)?
It's the probability of A, recalculated after you've learned that B definitely happened. Instead of measuring A against every possible outcome, you measure it against only the outcomes where B is true — a smaller, more specific universe that reflects what you now know.
Why can't P(B) be zero?
Dividing by zero is undefined, and conceptually it makes no sense to condition on an event that has no chance of happening — there's no restricted universe to measure against if B never occurs. The instrument requires P(B) to be greater than zero before it will compute a result.
What happens if A and B are independent?
Then P(A|B) comes out equal to plain P(A) — knowing that B happened gives you no new information about A, so conditioning doesn't move the probability at all. If you need to check or compute P(A and B) for independent events, this site's and-probability calculator does that by simple multiplication.
How is P(A|B) different from P(A and B)?
P(A and B) is the chance both events happen out of every possible outcome. P(A|B) is the chance A happens out of only the outcomes where B already happened — a narrower, rescaled figure. In the worked example, P(A and B) is 7.69% of all 52 cards, while P(A|B) is 33.33% of just the 12 face cards.
Where do P(A and B) and P(B) come from if I don't already have them?
This site's probability calculator finds a single event's chance from favorable-over-total counts, its and-probability calculator finds P(A and B) for independent events by multiplication, and its or-probability calculator finds P(A or B) if that's what you actually need instead.
Can P(A|B) be greater than P(A) itself?
Yes — that happens whenever B makes A more likely rather than less. In the worked example, P(King) across the whole deck is only 7.69%, but P(King|Face card) jumps to 33.33%, because knowing a card is a face card sharply narrows the field down to the three ranks — jack, queen, king — that could be a king.