Statistics
Probability calculator
Enter the probabilities of two events to get every combination: both, either, exactly one, neither and each conditional probability, with a Venn diagram. Or switch to a single event repeated n times to find the chance it happens at least once.
Decimal, fraction or percentage: 0.5, 1/2 or 50%.
e.g. 1/6 for rolling a six.
| Event | Formula | Probability | % |
|---|---|---|---|
| A and B | P(A∩B) | 0.2 | 20% |
| A or B | P(A) + P(B) − P(A∩B) | 0.7 | 70% |
| A only | P(A) − P(A∩B) | 0.3 | 30% |
| B only | P(B) − P(A∩B) | 0.2 | 20% |
| Exactly one | P(A∪B) − P(A∩B) | 0.5 | 50% |
| Neither | 1 − P(A∪B) | 0.3 | 30% |
| A given B | P(A∩B) ÷ P(B) | 0.5 | 50% |
| B given A | P(A∩B) ÷ P(A) | 0.4 | 40% |
Show the working, step by step
Intersection (both happen).
Independent events: P(A∩B) = P(A) × P(B) = 0.5 × 0.4 = 0.2
Union by the addition rule: add the two, then remove the overlap counted twice.
P(A∪B) = 0.5 + 0.4 − 0.2 = 0.7
Complements.
P(A′) = 1 − 0.5 = 0.5, P(B′) = 1 − 0.4 = 0.6 P(neither) = 1 − P(A∪B) = 1 − 0.7 = 0.3
Exactly one of the two.
P(A xor B) = P(A∪B) − P(A∩B) = 0.7 − 0.2 = 0.5
Conditional probabilities.
P(A|B) = P(A∩B) ÷ P(B) = 0.2 ÷ 0.4 = 0.5 P(B|A) = P(A∩B) ÷ P(A) = 0.2 ÷ 0.5 = 0.4
The rules
| Event | Formula |
|---|---|
| Not A (complement) | P(A′) = 1 − P(A) |
| A and B, independent | P(A ∩ B) = P(A) × P(B) |
| A and B, general | P(A ∩ B) = P(A) × P(B|A) |
| A or B | P(A ∪ B) = P(A) + P(B) − P(A ∩ B) |
| Exactly one | P(A ∪ B) − P(A ∩ B) |
| Neither | 1 − P(A ∪ B) |
| A given B | P(A|B) = P(A ∩ B) ÷ P(B) |
| At least once in n tries | 1 − (1 − p)ⁿ |
A worked example
The default: P(A) = 0.5 and P(B) = 0.4, independent.
- Both: P(A ∩ B) = 0.5 × 0.4 = 0.2.
- Either: P(A ∪ B) = 0.5 + 0.4 − 0.2 = 0.7.
- Exactly one: 0.7 − 0.2 = 0.5. Neither: 1 − 0.7 = 0.3.
- A given B: 0.2 ÷ 0.4 = 0.5, the same as P(A). That is what independence means.
If instead the events are known to overlap with P(A ∩ B) = 0.15 (choose “P(A∩B) known”), the union becomes 0.5 + 0.4 − 0.15 = 0.75, neither is 0.25, and P(A|B) = 0.15 ÷ 0.4 = 0.375. Since 0.375 is less than P(A), B happening makes A less likely: the events are not independent.
At least one in n tries
P(at least once) = 1 − (1 − p)ⁿ
The default repeated-event example is rolling at least one six in four throws. The chance of no six on one throw is 5/6, so the chance of none in four is (5/6)⁴ = 0.4823 and the chance of at least one is 0.5177. The chance of exactly one six is 4 × (1/6) × (5/6)³ = 0.3858. This works only when the tries are independent and p stays the same each time.
Checks the calculator makes
- Every probability must lie between 0 and 1.
- P(A ∩ B) cannot be larger than P(A) or P(B), and it cannot be smaller than P(A) + P(B) − 1, or the union would exceed 1.
- Mutually exclusive events must have P(A) + P(B) ≤ 1.
- A conditional probability given an event of probability 0 is undefined.
Common mistakes
- Adding without subtracting the overlap. P(A) + P(B) alone overstates P(A ∪ B) unless the events are mutually exclusive.
- Multiplying probabilities of dependent events. P(A) × P(B) gives P(A ∩ B) only for independent events; otherwise use P(A) × P(B|A).
- Adding repeated chances. Ten tries at 10% is not a 100% chance; it is 1 − 0.9¹⁰ = 0.651.
Common questions
How do I find the probability of A or B?
Use the addition rule: P(A ∪ B) = P(A) + P(B) − P(A ∩ B). The overlap is subtracted because adding P(A) and P(B) counts the outcomes where both happen twice. Only when A and B are mutually exclusive (cannot happen together) is it simply P(A) + P(B).
What is the difference between independent and mutually exclusive?
Independent means one event happening does not change the probability of the other, so P(A ∩ B) = P(A) × P(B). Mutually exclusive means they cannot both happen, so P(A ∩ B) = 0. Two events with non-zero probabilities cannot be both: if A and B are mutually exclusive, learning that A happened tells you B did not, which is the opposite of independence.
What is the probability of at least one success in n tries?
1 − (1 − p)n. Work out the chance of no successes at all, then subtract from 1. For at least one six in four rolls of a die: 1 − (5/6)4 = 1 − 0.4823 = 0.5177, just better than even. Multiplying 1/6 by 4 gives 0.667, which is wrong because it counts rolls with two or more sixes more than once.
What does 'neither' mean, and how is it different from 'not both'?
“Neither A nor B” is 1 − P(A ∪ B): the outcomes outside both circles of the Venn diagram. “Not both” is 1 − P(A ∩ B), which includes the outcomes where exactly one happens. With the default independent events, neither = 0.3 and not both = 0.8.
Can I enter percentages or fractions?
Yes. 0.25, 1/4 and 25% are all read as the same probability. A number above 1 without a % sign is rejected, because a probability cannot exceed 1.
Related calculators
-
Conditional probability
P(A|B) from probabilities or a two-way table of counts.
-
Bayes' theorem
Update a prior probability with new evidence.
-
Binomial distribution
Probability of exactly k successes in n tries.
-
Permutations and combinations
Count the outcomes before you divide.