This probability calculator finds the chance that two events both happen (A and B) and the chance that at least one happens (A or B). Enter P(A) and P(B), choose whether the events are independent or mutually exclusive, and read both results.
Probability Calculator
Probability of A or B, and A and B, for two events, given as independent or mutually exclusive.
Starting values: the calculator opens with P(A) = 0.3 and P(B) = 0.5. For independent events, P(A and B) is 0.15 and P(A or B) is 0.65. For mutually exclusive events, P(A and B) is 0 and P(A or B) is 0.8.
What the calculator covers
The tool handles two events and two relationships between them: independent or mutually exclusive. It returns the intersection (A and B) and the union (A or B). It does not have a conditional probability mode, where you would supply P(B given A). If your problem gives you a conditional probability, use the multiplication rule below by hand, or see the conditional probability calculator.
The formulas
Two rules cover this. The multiplication rule gives the chance of both events, and the addition rule gives the chance of at least one.
P(A and B) = P(A) × P(B) (independent events)
P(A and B) = 0 (mutually exclusive events)
P(A or B) = P(A) + P(B) − P(A and B)
Where:
- P(A) = the probability of event A, between 0 and 1
- P(B) = the probability of event B, between 0 and 1
- P(A and B) = the probability that both occur
- P(A or B) = the probability that at least one occurs
A university-level statistics text gives the general forms: P(A and B) = P(B) × P(A given B), which becomes P(A) × P(B) when the events are independent, and P(A or B) = P(A) + P(B) − P(A and B), which becomes P(A) + P(B) when the events are mutually exclusive.
Independent versus mutually exclusive
These two ideas are often confused, and they are close to opposites.
- Independent: knowing that A happened does not change the chance of B. The coin you flip today does not affect the die you roll tomorrow.
- Mutually exclusive: A and B cannot both happen. A single card cannot be both a heart and a spade.
If two events each have a non-zero chance and are mutually exclusive, they cannot be independent, because learning that one occurred tells you the other did not. The choice of relationship in the calculator matters: it changes P(A and B), and through it, P(A or B).
Worked examples
Example 1: independent events (the default values)
P(A) = 0.3 and P(B) = 0.5.
- P(A and B) = 0.3 × 0.5 = 0.15.
- P(A or B) = 0.3 + 0.5 − 0.15 = 0.65.
Example 2: mutually exclusive events (the same values)
- P(A and B) = 0, because both cannot happen.
- P(A or B) = 0.3 + 0.5 − 0 = 0.8.
Same inputs, different relationship, different answers. This is why you need to decide which one fits your problem before reading the result.
Example 3: a dice roll
Roll one fair die. Let A be rolling an even number, so P(A) = 0.5, and let B be rolling a 1, so P(B) = 1/6, about 0.1667. These cannot both happen on one roll, so they are mutually exclusive. P(A or B) = 0.5 + 0.1667 = 0.6667. Select mutually exclusive and enter 0.5 and 0.1667.
Example 4: two coin flips
Flip two coins. A is heads on the first, B is heads on the second. Each is 0.5, and the flips do not affect each other, so they are independent. P(both heads) = 0.5 × 0.5 = 0.25, and P(at least one head) = 0.5 + 0.5 − 0.25 = 0.75.
Example 5: a case that is neither (done by hand)
The statistics text above has an example where P(A) = 0.65 and P(B given A) = 0.90. The multiplication rule gives P(A and B) = 0.65 × 0.90 = 0.585. The addition rule, with P(B) = 0.65 as given there, gives P(A or B) = 0.65 + 0.65 − 0.585 = 0.715. Since 0.585 is not 0.65 × 0.65 and is not 0, the events are neither independent nor mutually exclusive, and this calculator does not model that case. Work it out with the formulas above.
Keeping the numbers sensible
Probabilities run from 0 (impossible) to 1 (certain). Enter 0.25, not 25. Convert percentages by dividing by 100. If your result is above 1, a probability was entered wrongly or the events were wrongly assumed to be mutually exclusive: for that option P(A) + P(B) cannot exceed 1.
Frequently asked questions
How do I find the probability of A and B?
For independent events, multiply the two probabilities: P(A) × P(B). For mutually exclusive events, the answer is 0. If the events are neither, you need a conditional probability: P(B) × P(A given B).
How do I find the probability of A or B?
Add the two probabilities and subtract the chance that both occur: P(A) + P(B) − P(A and B). For mutually exclusive events the subtraction is 0, so you simply add.
Can this calculator do conditional probability?
No. It handles independent and mutually exclusive events only. For P(A given B) use the multiplication rule by hand or a conditional probability tool.
Can two events be both independent and mutually exclusive?
Only in the trivial case where one of them has probability 0. Otherwise, mutually exclusive events with non-zero probabilities depend on each other, because one happening rules out the other.
