Conditional probability answers a narrower question than plain probability: not "how likely is A?" but "how likely is A once we already know B happened?" It's the foundation of Bayes' theorem, medical testing, spam filters, and any situation where new information should update your estimate of what's likely.

How the formula works

P(A|B) = P(A ∩ B) / P(B) narrows the sample space down to only the outcomes where B happened, then asks what fraction of those also have A. If B never happens (P(B) = 0), the conditional probability is undefined — you can't condition on something impossible, which is why this calculator blocks that input.

The From Counts tab is mathematically identical but skips converting to probabilities first: dividing raw tallies gives the same ratio, since count(A∩B)/count(B) and P(A∩B)/P(B) both estimate the same conditional frequency.

Independence vs. dependence

Two events are independent exactly when learning about one tells you nothing about the other — formally, P(A|B) = P(A). Independent events also satisfy P(A ∩ B) = P(A) × P(B), which is the multiplication rule used to combine probabilities of unrelated events (like two coin flips or two separate dice).

Most real-world events are not independent. Knowing it's cloudy changes the probability of rain; knowing a patient tested positive changes the probability they have the disease. The Independence tab compares P(A|B) directly against P(A) so you can see the gap, if any.

Common mistakes

The most frequent error is confusing P(A|B) with P(B|A) — these are generally different numbers (this is the same mix-up Bayes' theorem exists to correct). Another is assuming independence without checking; treating dependent events as independent understates or overstates the true joint probability. Finally, remember P(A ∩ B) can never exceed P(B) or P(A) — if your inputs violate that, double-check your data before trusting the result.