What this probability calculator does
Give the probability of event A and event B, and the calculator works out the probability that both happen, that at least one happens, that neither happens, that only one of them happens, and the two conditional probabilities. You can describe the link between the events in two ways: as independent events, where the overlap is found for you, or with a known overlap, where you supply P(A and B). A table, a four-outcome bar and a mosaic show the same numbers, and the steps spell out every formula. Probabilities are entered as percentages from 0 to 100, and the arithmetic is exact.
The core formulas
Write P(A) for the probability of A and P(A and B) for the probability that both happen. Then P(A or B) = P(A) + P(B) − P(A and B). The overlap is subtracted because the outcomes where both happen were counted once in P(A) and again in P(B). The complement rule says P(not A) = 100% − P(A). The probability that neither happens is 100% − P(A or B). The conditional probability of A given B is P(A and B) ÷ P(B), the share of B outcomes in which A also happens.
Independent events
Two events are independent when knowing that one happened does not change the probability of the other, which is equivalent to P(A and B) = P(A) × P(B). With P(A) = 60% and P(B) = 50%, independence gives P(A and B) = 0.60 × 0.50 = 30%, P(A or B) = 80% and P(neither) = 20%. Notice that for independent events P(A given B) is 60%, the same as P(A) itself. Independence is an assumption about how the events work. Coin flips, separate dice and draws with replacement are independent; drawing cards without replacement or two outcomes caused by the same underlying factor generally are not.
Known overlap and the bounds it must obey
If you know P(A and B) from data or from the problem, use the known-overlap mode. The overlap cannot be any number, though. It cannot exceed the smaller of P(A) and P(B), because both cannot happen more often than either one alone. It also cannot fall below P(A) + P(B) − 100%, because if A and B together would add up to more than 100%, they are forced to share some outcomes. For 60% and 50% the overlap must lie between 10% and 50%. At the lower end, 10%, the union is 100% and neither happens 0% of the time. At the upper end, 50%, B is entirely inside A, so P(A given B) is 100%. An overlap of 20% sits between the bounds and gives P(A or B) = 90%, P(neither) = 10% and P(A given B) = 40%. If you try an overlap of 0% for these two events, the calculator refuses and explains: With P(A) = 60% and P(B) = 50%, P(A and B) must be at least P(A) + P(B) − 100% = 10% (the two events cannot overlap less than that). It must lie between 10% and 50%.
Mutually exclusive events
Events are mutually exclusive when they cannot both happen, so P(A and B) = 0 and P(A or B) is simply P(A) + P(B). For P(A) = 30% and P(B) = 40% with an overlap of 0%, the union is 70% and P(neither) is 30%. Mutually exclusive is not the same as independent: if one of two exclusive events with nonzero probability happens, the other certainly did not, so they strongly influence each other. The calculator labels the relationship it finds. The only events that are both independent and exclusive are those where at least one has probability zero.
Reading the mosaic and the table
The mosaic divides a square into two columns whose widths are P(A) and P(not A). Inside each column, the shaded height is the probability of B given that column. Because the width times the height of each shaded block equals a probability, the picture is area-accurate: when the shaded height is the same in both columns, B does not depend on A, and the events are independent. The two-by-two table gives the same four cells in numbers: both, only A, only B and neither, with row and column totals that must add to 100%.
Conditional probability in practice
Conditional probabilities answer "given that" questions: given that a customer clicked the ad, how likely is a purchase? They are not symmetric. P(A given B) and P(B given A) share the numerator P(A and B) but use different denominators, so they differ whenever P(A) and P(B) differ. In the 60% / 50% example with a 20% overlap, P(A given B) is 40% while P(B given A) is 33.333333%. If the conditioning event has probability 0%, the conditional probability is undefined and the calculator says so instead of dividing by zero.
What the calculator does not do
This tool covers two events and the relationships between them. It does not handle three or more events, repeated trials (binomial probability), combinations and permutations, or probability distributions; for the bell curve use the normal distribution calculator, and to plan how many observations a survey needs, use the sample size calculator. Probabilities that arrive as fractions can be converted with the fraction calculator and percentage calculator.
For a rigorous introduction to these rules, including the addition rule and conditional probability, see the open textbook Introductory Statistics, chapter 3 "Probability Topics" (OpenStax).
Probability calculator questions
How do I find the probability of A or B?
Add P(A) and P(B), then subtract P(A and B). For 60% and 50% with a 20% overlap that is 90%.
How do I find the probability of A and B for independent events?
Multiply the probabilities: 60% × 50% = 30%.
What is the probability that neither event happens?
Subtract P(A or B) from 100%. With the 20% overlap example that is 10%.
What does conditional probability mean?
P(A given B) is the probability of A when you already know B happened. It equals P(A and B) ÷ P(B), here 40%.
Why was my overlap rejected?
Every overlap must lie between max(0, P(A) + P(B) − 100%) and min(P(A), P(B)). Outside that range no set of outcomes could have those probabilities.
Are mutually exclusive events independent?
Not unless one of them has probability zero. If exclusive events can happen at all, one occurring tells you the other did not.