Probability Calculator: Two Events or Repeated Trials
Enter the chances of two events to see the chance of both, either, neither and one given the other. Or enter a chance, a number of trials and a number of successes for the binomial odds.
Last reviewed
A or B (at least one happens)
65%
0.65 as a decimal, 1 in 1.54
- A and B both
- 15%
- Exactly one of them
- 50%
- Neither
- 35%
- Not A
- 70%
- Not B
- 50%
- A given B
- 30%
- B given A
- 50%
Exact arithmetic on the chances you enter. The answers are only as good as the assumptions: events that really are independent, trials that really have the same chance.
Two events: A and B
Enter the chance of each event in per cent and say how the events are related. The calculator gives the chance of both, either, exactly one and neither, and the chance of each given the other.
- Independent events do not affect each other. P(A and B) = P(A) × P(B).
- Mutually exclusive events cannot both happen. P(A and B) = 0, so their chances cannot add up to more than 100%.
- For either: P(A or B) = P(A) + P(B) − P(A and B). The overlap is taken away, so it is not counted twice.
- Given: P(A given B) = P(A and B) ÷ P(B). If P(B) is zero it is undefined.
These are the rules in the multiplication and addition rules of the OpenStax statistics text.
Worked example
A has a 30% chance and B has a 50% chance.
| Result | Independent | Mutually exclusive |
|---|---|---|
| A and B | 15% | 0% |
| A or B | 65% | 80% |
| Exactly one of them | 50% | 80% |
| Neither | 35% | 20% |
| A given B | 30% | 0% |
Independent: 0.30 × 0.50 = 0.15, then 0.30 + 0.50 − 0.15 = 0.65. The chance of neither is 1 − 0.65 = 0.35. Given that B has happened, A is still 30%, because B tells you nothing about it.
Mutually exclusive: the overlap is 0, so the chance of either is 30 + 50 = 80%, leaving 20% for neither. If B has happened, A cannot have, so A given B is 0.
Repeated trials: the binomial chance
Use this when you repeat the same trial n times, each trial has two outcomes, success with chance p and failure otherwise, and the trials are independent. The chance of exactly k successes is:
P(k) = C(n, k) × p^k × (1 − p)^(n − k)
where C(n, k) = n! ÷ (k! (n − k)!) is the number of ways to choose which trials succeed. The average number of successes is n × p and the standard deviation is the square root of n × p × (1 − p).
The calculator also adds up the terms to give the chance of at most k, at least k, fewer than k and more than k, and the chance of at least one success, which is 1 − (1 − p)^n.
Worked example: 10 fair coin flips
With p = 50% and n = 10, there are 2¹⁰ = 1,024 equally likely sequences. The chance of each number of heads is the number of sequences that give it, divided by 1,024:
| Heads | Chance of exactly this many |
|---|---|
| 0 | 0.0977% |
| 1 | 0.9766% |
| 2 | 4.3945% |
| 3 | 11.7188% |
| 4 | 20.5078% |
| 5 | 24.6094% |
| 6 | 20.5078% |
| 7 | 11.7188% |
| 8 | 4.3945% |
| 9 | 0.9766% |
| 10 | 0.0977% |
Five heads: C(10, 5) = 252 and 252 ÷ 1,024 = 24.6094%. At most 3 heads is 1 + 10 + 45 + 120 = 176 sequences, 176 ÷ 1,024 = 17.1875%. At least 8 heads is 45 + 10 + 1 = 56 sequences, 56 ÷ 1,024 = 5.46875%. The average is 10 × 0.5 = 5 heads and the standard deviation is √(10 × 0.5 × 0.5) = 1.58.
At least one success
A chance that looks small adds up over repeated tries. If each trial has a 5% chance, the chance of at least one success is:
| Trials | Chance of at least one |
|---|---|
| 1 | 5% |
| 5 | 22.6219% |
| 10 | 40.1263% |
| 20 | 64.1514% |
| 50 | 92.3055% |
For 20 trials: the chance of none is 0.95²⁰ = 0.358486, so at least one is 1 − 0.358486 = 64.1514%.
When the answer can mislead
The arithmetic is exact, but it rests on assumptions the calculator cannot check. If two events are linked, multiplying their chances gives the wrong answer. If the chance changes from trial to trial, the binomial formula does not apply. And a past result never changes the chance of the next independent trial: after nine heads, a fair coin is still 50% for the tenth.
For counting ordered and unordered selections, use the permutation and combination calculator. The dice roller shows the exact odds for any number of dice, the statistics calculator summarises a data set, and the z-score calculator places a value on the normal curve.
Frequently asked questions
How do you find the probability of A and B?
If A and B are independent, multiply: P(A and B) = P(A) × P(B). A 30% chance of A and a 50% chance of B give 0.30 × 0.50 = 15%. If they are mutually exclusive, they cannot both happen, so the chance is 0.
How do you find the probability of A or B?
Add the two chances and take away the overlap: P(A or B) = P(A) + P(B) − P(A and B). For independent events with 30% and 50%, that is 30 + 50 − 15 = 65%. For mutually exclusive events there is no overlap, so it is 80%.
What is the difference between independent and mutually exclusive?
Independent events do not affect each other, such as two coin flips. Mutually exclusive events cannot both happen, such as heads and tails on one flip. Events that are mutually exclusive and have a chance above zero are never independent.
What does "A given B" mean?
It is the chance of A once you know B has happened: P(A | B) = P(A and B) ÷ P(B). For independent events it equals P(A), because B tells you nothing. For mutually exclusive events it is 0.
How is the binomial probability worked out?
P(exactly k) = C(n, k) × p^k × (1 − p)^(n−k), where C(n, k) counts the ways to choose which trials succeed. For 5 heads in 10 fair flips, C(10, 5) = 252 and the chance is 252 ÷ 1,024, which is 24.61%.
What is the chance of at least one success in n trials?
One minus the chance of none: 1 − (1 − p)^n. With a 5% chance each time and 20 trials, none succeeding has a chance of 0.95^20 = 35.85%, so at least one has a chance of 64.15%.
Related calculators
- Permutation and Combination CalculatorEnter n, the number of items to choose from, and r, how many you pick.
- Dice RollerChoose how many dice, how many sides and any modifier, then roll.
- Statistics CalculatorEnter your numbers, separated by commas, spaces or new lines.
- Z-Score CalculatorEnter a value, the mean and the standard deviation.
- Percentage CalculatorPick the question you are actually asking.
- Fraction CalculatorEnter two fractions, mixed numbers, whole numbers or decimals and choose an operation.
- Confidence Interval CalculatorChoose a mean with the standard deviation from your sample (t), a mean with a known standard deviation (z), or a proportion.