Probability Calculator
Two events, binomial trials, or combinations in one probability calculator, with the overlap that stops P(A or B) being a simple sum.
P(A or B)
- Working Inclusion-exclusion: adding the two counts the overlap twice, so it is subtracted once. Forgetting this is the most common probability error and can produce a figure above 100%.
- 50% + 40% - 20% = 70%
- P(A and B) Assuming independence, so the product of the two.
- 20%
- P(neither) The complement of P(A or B). Often far easier to compute than the thing you want.
- 30%
- P(A but not B)
- 30%
- P(B but not A)
- 20%
- P(exactly one of them)
- 50%
- P(A given B) P(A and B) / P(B): the probability of A once B is known to have happened.
- 50%
- P(B given A)
- 40%
- P(not A)
- 50%
- Relationship P(A and B) equals P(A) x P(B), so knowing one tells you nothing about the other.
- independent
- Odds of A or B
- 7 : 3 for, 3 : 7 against
- Independent and mutually exclusive are different and are often confused. Independent means one tells you nothing about the other. Mutually exclusive means they cannot co-occur. That is maximally informative, and so the opposite of independent.
- Every probability here is between 0 and 1. Any method producing a figure outside that range has double-counted an overlap.
How the Probability Calculator works
Probability is a number between 0 and 1 giving the long-run frequency of an outcome. The arithmetic is short; the difficulty is entirely in which rule applies.
For two events the central rule is inclusion-exclusion. P(A or B) = P(A) + P(B) - P(A and B). The subtraction is there because adding the two probabilities counts the overlap twice. With P(A) = 0.5 and P(B) = 0.4 and an overlap of 0.2, P(A or B) is 0.7 and not 0.9. Omitting the subtraction is the most frequent error in elementary probability and can produce an answer above 1, which is the useful tell that something went wrong.
Getting the overlap right requires knowing the relationship between the events, and two terms get confused constantly.
Independent means one event carries no information about the other, so P(A and B) = P(A) x P(B). Two coin flips are independent.
Mutually exclusive means they cannot both happen, so P(A and B) = 0 and P(A or B) is the plain sum. Rolling a 3 and rolling a 5 on one die are mutually exclusive.
These are nearly opposite properties, and the confusion is that both make the formulas simpler. Mutually exclusive events are maximally dependent: knowing A happened tells you with certainty that B did not. Only events with zero probability can be both.
Conditional probability is P(A given B) = P(A and B) / P(B), the probability of A within the world where B has already happened. It is where most genuine mistakes in applied probability live, because P(A given B) and P(B given A) are different numbers and get swapped. The classic case: a test that is 99% accurate for a disease affecting 1 in 10,000 people. P(positive given disease) is 0.99. P(disease given positive) is about 1%, because the false positives from the 9,999 healthy people swamp the single true case. Confusing the two is called the prosecutor's fallacy and it has sent people to prison.
For repeated trials, the binomial distribution gives the probability of exactly k successes in n independent trials each with probability p: C(n,k) x p^k x (1-p)^(n-k). The three factors are the number of orderings, the probability of the successes, and the probability of the failures. Ten fair coins giving exactly five heads is C(10,5) x 0.5^10 = 252/1024, about 24.6%. That is notably less than half, which surprises people who expect the most likely outcome to be likely.
The binomial needs four conditions and they are worth checking: a fixed number of trials, independence, a constant probability, and only two outcomes. Drawing cards without replacement violates the constant probability and needs the hypergeometric distribution.
Counting underpins all of it. Permutations count ordered selections, P(n,k) = n!/(n-k)!, and combinations count unordered ones, C(n,k) = n!/(k!(n-k)!). The ratio between them is exactly k!, the number of ways to shuffle the chosen items. A lottery picking 6 of 49 has C(49,6) = 13,983,816 possible tickets, because the order the balls come out does not matter. If it did, there would be 720 times as many.
One technique worth more than any formula: compute the complement. "At least one" is almost always easier as one minus "none". The probability of at least one six in four rolls of a die is 1 - (5/6)^4 = 51.8%, which is one line; enumerating one, two, three and four sixes is four lines and more error-prone.
Probability Calculator FAQ
How do I calculate the probability of A or B?
P(A) + P(B) - P(A and B). The subtraction removes the double-counted overlap. If the events are mutually exclusive the overlap is zero and it is a plain sum; if they are independent the overlap is P(A) x P(B). Omitting the subtraction can give an answer above 1.
What is the difference between independent and mutually exclusive?
Independent means one event tells you nothing about the other, so P(A and B) = P(A)P(B). Mutually exclusive means they cannot both occur, so P(A and B) = 0. They are nearly opposites: mutually exclusive events are maximally informative about each other, since one happening rules the other out.
What is the binomial probability formula?
C(n,k) x p^k x (1-p)^(n-k), for exactly k successes in n independent trials each with success probability p. The three parts are the number of orderings, the probability of the k successes, and the probability of the n-k failures. It needs a fixed n, independence, a constant p, and two outcomes.
What is the difference between a permutation and a combination?
Order. Permutations count ordered selections and combinations do not, so there are exactly k! times as many permutations of k items chosen from n. Choosing 6 lottery numbers from 49 is a combination: 13,983,816 tickets. If the draw order mattered it would be 720 times more.
Related calculators
- NPS Calculator
- Percentage Calculator
- Ratio Calculator
- Quadratic Formula Calculator
- System of Equations Calculator
- Standard Deviation Calculator
- Random Number Generator
- Gini Coefficient Calculator
- Linear Regression Calculator
- A/B Test Calculator
- Test Statistic Calculator
- Random Group Generator
- Flip a Coin
- Dice Roller
- Cribbage Calculator
- Dice Probability Calculator
- Expected Value Calculator
- Monty Hall Problem
- Hypergeometric Calculator
- Poisson Distribution Calculator
- Z Score Calculator
- Normal Distribution Calculator
- Sample Size Calculator
- Pascal's Triangle
- Combination Calculator
- Factorial Calculator