How to use the calculator
Pick a mode.
Two independent events. Enter P(A) and P(B) as decimals from 0 to 1. The calculator shows:
- P(A and B): both happen
- P(A or B): at least one happens
- P(exactly one): one or the other, but not both
- P(neither): both fail
- P(A but not B) and P(B but not A)
- the complements P(not A) and P(not B)
A bar splits the whole probability of 1 into the four outcomes, both, A only, B only and neither, so you can see that they add up.
At least one success in n trials. Enter the chance of success on a single try and the number of tries. You get the probability of at least one success, of none, of exactly one, of every try succeeding, and the expected number of successes.
The formulas
For independent events A and B:
| Probability | Formula |
|---|---|
| A and B | P(A) × P(B) |
| A or B | P(A) + P(B) − P(A) × P(B) |
| Exactly one | P(A) + P(B) − 2 × P(A) × P(B) |
| Neither | (1 − P(A)) × (1 − P(B)) |
| Not A | 1 − P(A) |
For n independent trials, each with success probability p:
- P(none) = (1 − p)ⁿ
- P(at least one) = 1 − (1 − p)ⁿ
- P(exactly one) = n × p × (1 − p)ⁿ⁻¹
For very small probabilities, the calculator computes (1 − p)ⁿ through logarithms, so a one-in-a-trillion chance does not get lost to rounding.
Worked example
The default events have P(A) = 0.5 and P(B) = 0.4.
- Both: 0.5 × 0.4 = 0.2.
- Either: 0.5 + 0.4 − 0.2 = 0.7.
- Exactly one: 0.7 − 0.2 = 0.5.
- Neither: 0.5 × 0.6 = 0.3. Check: 0.7 + 0.3 = 1.
In the trials mode, the defaults are a 10% chance per try and 10 tries.
- None: 0.9¹⁰ = 0.3487.
- At least one: 1 − 0.3487 = 0.6513, or about 65%.
- Exactly one: 10 × 0.1 × 0.9⁹ = 0.3874.
Ten tries at 10% each do not make success certain. There is still about a 35% chance of nothing. You need 22 tries to push the chance of at least one success above 90%.
Common uses
- The chance of rolling at least one six in six rolls of a die: p = 1/6 and n = 6 give about 66.5%.
- The reliability of a system with two independent backup parts. It fails only if both fail, which is the “neither” result applied to the chances that each part works.
- How many attempts a process needs before success is likely.
To count the number of possible arrangements or selections behind a probability, such as lottery odds, see the big number calculator for exact large products, and the percentage calculator to convert results.
Limitations
- Every formula here assumes independence. For dependent events, you need conditional probabilities, which this calculator does not handle.
- In trials mode, every trial must have the same success probability.
- Probabilities must be between 0 and 1. A value outside that range is not a probability.
Frequently asked questions
What does independent mean?
Two events are independent when one happening does not change the chance of the other. Two coin flips are independent. Drawing two cards from the same deck without putting the first back is not, because the first draw changes what is left.
What is the difference between "A or B" and "exactly one"?
P(A or B) includes the case where both happen. "Exactly one", also called exclusive or (xor), leaves that case out. With P(A) = 0.5 and P(B) = 0.4, A or B is 0.7, while exactly one is 0.5.
Why is the chance of at least one success not just n × p?
Adding n × p counts the trials where several successes happen more than once, and it can exceed 1. The right approach is to find the chance of no successes, (1 − p)ⁿ, and subtract it from 1.
Can I enter percentages?
Enter probabilities as decimals between 0 and 1, so 25% is 0.25. The results are shown both as decimals and as percentages.
Last reviewed: