The rules behind the calculator
A probability is a number from 0 (impossible) to 1 (certain). Write P(A) for the probability that event A happens. Two events A and B split everything that can happen into four regions: A only, B only, both and neither. Every result on this page is one of those regions or a combination of them.
Complement: P(not A) = 1 − P(A)
Addition rule: P(A or B) = P(A) + P(B) − P(A and B)
Multiplication rule for independent events: P(A and B) = P(A) × P(B)
Conditional probability: P(A | B) = P(A and B) ÷ P(B)
Exactly one: P(A) + P(B) − 2 × P(A and B) Neither: 1 − P(A or B)
“A or B” means at least one of them happens, including both. “A and B” means both happen. P(A | B) is read “the probability of A given B”: the chance of A once you know B has happened. In the addition rule, P(A and B) is subtracted because adding P(A) and P(B) counts the overlap twice.
How you obtain P(A and B) depends on how the events are related:
- Independent events do not affect each other, like two separate coin tosses. Multiply the probabilities.
- Mutually exclusive events cannot both happen, like rolling a 2 and a 5 on one die. P(A and B) is 0.
- Anything else: you need to know P(A and B) from data or from counting outcomes, and enter it directly.
Worked examples by hand
Independent events
A has probability 0.5 and B has probability 0.4, and they are independent.
- Both. P(A and B) = 0.5 × 0.4 = 0.2.
- Either. P(A or B) = 0.5 + 0.4 − 0.2 = 0.7.
- Neither. 1 − 0.7 = 0.3. As a check, that equals P(not A) × P(not B) = 0.5 × 0.6.
- Exactly one. 0.5 + 0.4 − 2 × 0.2 = 0.5.
- Conditional. P(A | B) = 0.2 ÷ 0.4 = 0.5, the same as P(A). Knowing B tells you nothing about A, which is what independence means.
Counting outcomes: one card from a pack of 52
Let A be “a king” and B be “a heart”. There are 4 kings, 13 hearts and 1 king of hearts, so P(A) = 4/52, P(B) = 13/52 and P(A and B) = 1/52. Then P(A or B) = (4 + 13 − 1) ÷ 52 = 16/52 = 0.3077. Entering 4/52, 13/52 and 1/52 in the calculator gives the same answer and confirms that these two events are independent, because 4/52 × 13/52 = 1/52.
Repeated trials: at least one success
P(at least one success in n trials) = 1 − (1 − p)n
Here p is the probability of success on a single trial and n is the number of independent trials. The formula works backwards: the only way to avoid “at least one” is to fail every time, which has probability (1 − p)n.
Roll a die four times and ask for at least one six. The chance of no six on one roll is 5/6. The chance of no six in four rolls is (5/6)4 = 0.4823, so the chance of at least one six is 1 − 0.4823 = 0.5177, a little better than even. To push that to 95% you would need 17 rolls.
The same sum explains why small risks add up. Something with a 1% chance of going wrong each time has a 63.4% chance of going wrong at least once in 100 independent attempts, not 100% and not 1%.
Mistakes to avoid
Independent and mutually exclusive are opposites, not synonyms
If two events with non-zero probabilities are mutually exclusive, then knowing one happened tells you the other certainly did not. That is strong dependence. Use “independent” only when the events genuinely have no influence on each other.
P(A | B) is not P(B | A)
Suppose 1% of people have a condition, a test detects 90% of those who have it, and it wrongly flags 5% of those who do not. The share of all people who test positive is 0.01 × 0.9 + 0.99 × 0.05 = 0.0585. Enter P(A) = 0.01 for “has the condition”, P(B) = 0.0585 for “tests positive” and P(A and B) = 0.009. The calculator returns P(B | A) = 0.9, the test’s detection rate, but P(A | B) = 0.1538. A positive result means about a 15% chance of having the condition, because the many healthy people produce more false positives than the few affected people produce true ones. Confusing the two directions is known as the base-rate fallacy.
Adding probabilities that overlap
P(A) + P(B) is the chance of “A or B” only when the events cannot happen together. For the independent example above, simply adding gives 0.9 when the true figure is 0.7.
Impossible combinations
P(A and B) can never be larger than the smaller of P(A) and P(B), and it can never be less than P(A) + P(B) − 1. With P(A) = 0.7 and P(B) = 0.6, the overlap must be at least 0.3, so the events cannot be mutually exclusive. The calculator tells you when the figures entered contradict each other.
Repeated trials must be independent
The repeated-trials formula assumes each trial has the same probability and no memory. It does not apply to drawing cards without putting them back, or to events that share a common cause.