How to use the probability calculator
- Enter P(A) and P(B) as decimals, percentages such as 30%, or fractions such as 3/10. Use the selector to say whether a plain number is a decimal or a percent.
- Pick how A and B relate: independent, mutually exclusive, known P(B given A), or known P(A and B).
- For repeated trials, enter the number of trials. The chance of at least one A is shown for that many independent trials with the chance P(A) each. You can add a goal to find how many trials you need.
- Read the table of joint, union, neither, exactly one and conditional probabilities.
Formula
Independent: P(A and B) = P(A) x P(B)
Mutually exclusive: P(A and B) = 0
P(A or B) = P(A) + P(B) - P(A and B)
P(neither) = 1 - P(A or B)
P(exactly one) = P(A) + P(B) - 2 P(A and B)
P(A given B) = P(A and B) / P(B)
At least one in n trials = 1 - (1 - p)^n
All of these follow from P(A and B). Once it is known, the rest are subtraction and division. The repeated-trials rule works because the only way to get no successes is to fail every time.
Worked example
Let P(A) = 0.3 and P(B) = 0.5. If the events are independent, P(A and B) = 0.15, P(A or B) = 0.65, P(neither) = 0.35, and exactly one happens with probability 0.5. P(A given B) is 0.3 again, since B tells you nothing about A.
If instead the events are mutually exclusive, P(A and B) = 0 and P(A or B) = 0.8. For repeated trials with chance 0.3 each, ten trials give at least one success with probability 1 - 0.7^10 = 97.1752%, and you need 9 trials to reach 95%.
Independent versus mutually exclusive
These are different ideas that people often mix up. Independent events do not influence each other, so both can happen, and the chance of both is the product. Mutually exclusive events cannot happen together at all, so the chance of both is 0 and knowing one happened tells you the other did not.
Two events with nonzero probabilities cannot be both independent and mutually exclusive. The calculator checks that your numbers are possible, for example that mutually exclusive probabilities do not add to more than 1.
Conditional probability inputs
If you know the chance of B once A has happened, the tool uses P(A and B) = P(A) x P(B given A). If you know P(A and B) directly, it derives the conditional chances from it. Either way P(A and B) must lie between P(A) + P(B) - 1 and the smaller of P(A) and P(B), or the numbers cannot describe real events.
How this differs from the binomial calculator
This page covers two events and the simple at-least-one rule for repeated trials. To find the chance of exactly k successes or at most k successes, use the binomial probability calculator. To count arrangements, see the combinations and permutations calculator.
Assumptions and limits
- Probabilities must lie between 0 and 1 (0% to 100%). Anything outside is rejected.
- Repeated trials are independent and each has the same chance P(A).
- A plain number is read as a decimal or a percent according to your selector. A percent sign or a fraction is always read as written.
- Results are rounded to six decimals, with percentages to four.
Frequently asked questions
How do I get the probability of at least one success?
Subtract from 1 the chance of no success at all. For n independent trials that is 1 - (1 - p)^n.
What if P(B) is 0?
Then P(A given B) is undefined because you cannot condition on something that never happens. The table says Undefined.
Can I type 1/6 for a die?
Yes. Fractions, percentages and decimals are all accepted in the probability fields.
What does exactly one mean?
Either A happens without B or B happens without A. It excludes the case where both happen.
Why was my P(A and B) rejected?
It was larger than P(A) or P(B), or too small to keep P(A or B) at or below 1. Both break the rules of probability.