Probability Calculator
Find the probability of an event from the number of outcomes: enter the total outcomes n and the favorable outcomes r to get the probability as a decimal, a fraction and a percentage, with the odds in favor and against. Or choose combination or permutation to count selections and arrangements exactly, with every digit of the result for up to 1,000 items.
For the chance that two or more events happen, use the probability of multiple events calculator; to find the probability of A given B, use the conditional probability calculator. Lists of every combination and permutation are on the combination and permutation pages.
Related Calculators
Probability of Multiple Events Calculator
Find P(A and B) and P(A or B) for two events, or the chance that all, none or at least one of several events happen.
Conditional Probability Calculator
Find P(A|B) from probabilities or a two-way table, with P(B|A), the union and an independence test.
Combination Calculator (nCr)
Count combinations exactly with big-integer nCr results, even for very large n.
Which probability calculator do you need?
| You want to find | Use |
|---|---|
| The probability of one event from counts of outcomes, with its odds | This calculator, in Basic Probability mode |
| The number of ways to choose or arrange items | This calculator, or the combination and permutation calculators for lists and tables |
| The chance that two or more events happen: and, or, none, at least one | Probability of multiple events calculator |
| The probability of A when B is known to have happened | Conditional probability calculator |
| A probability updated by new evidence, such as a test result | Bayes' theorem calculator |
| The chance of at least one success in n tries | At least one probability calculator |
| The chance of k successes in n independent tries | Binomial distribution calculator |
| The chance of k successes when drawing without replacement | Hypergeometric distribution calculator |
| Coin flips, dice sums, lottery odds and shared birthdays | Coin flip, dice, lottery and birthday paradox calculators |
| The long-run average of a random outcome | Expected value calculator |
Formulas
Probability of an event: P(A) = favorable outcomes / total outcomes
Complement: P(not A) = 1 − P(A)
Odds in favor = favorable : (total − favorable), and odds against = (total − favorable) : favorable
Probability from odds a : b in favor: P(A) = a / (a + b)
Combinations: C(n, r) = n! / (r! · (n − r)!)
Permutations: P(n, r) = n! / (n − r)! = n · (n − 1) · … · (n − r + 1)
Relation: P(n, r) = C(n, r) · r!
The formula for the probability of an event holds when every outcome is equally likely: a fair die, a shuffled deck, a random draw. The probability is always between 0 (impossible) and 1 (certain). A combination counts the selections when the order does not matter, and a permutation counts the arrangements when it does.
How to read the results
| Output | What it tells you |
|---|---|
| Result | In Basic Probability mode, the probability as a decimal. In the other two modes, the exact number of combinations or permutations with thousands separators. |
| Percentage and Fraction | The same probability as a percentage and as a fraction in lowest terms, such as 25% and 1/4. |
| Odds in favor and Odds against | The ratio of favorable to unfavorable outcomes, and its reverse, in lowest terms: 13 favorable of 52 outcomes is 1 : 3 in favor and 3 : 1 against. |
| P(not A) | The probability that the event does not happen, 1 − P(A). |
| Scientific notation | Shown for results of more than 15 digits, with four decimals: 1.0089e+29 means 1.0089 × 10²⁹. |
| Formula and Explanation | The formula the mode uses and what it counts. |
| Steps | The working with the numbers filled in. Small cases show the factorials; larger ones show the product of the selected terms. |
Worked example 1: the probability of an event
What is the probability of drawing a heart from a standard deck of 52 cards? Choose Basic Probability and enter 52 total outcomes and 13 favorable outcomes (or use Load example).
- Probability: 13 / 52 = 1/4 = 0.25, or 25%.
- Complement: P(not a heart) = 1 − 0.25 = 0.75.
- Odds: 13 hearts against 39 other cards is 1 : 3 in favor, and 3 : 1 against.
Rolling an even number on a fair die has 3 favorable outcomes out of 6: probability 1/2 = 0.5 and odds of 1 : 1. A probability can be very small: a lottery jackpot of one winning combination among 13,983,816 has probability 1/13,983,816 ≈ 7.1511e-8, odds of 1 : 13,983,815 against a win.
Worked example 2: combinations
How many committees of 2 people can be chosen from 5? The order of selection does not matter. Choose Combination with n = 5 and r = 2: C(5, 2) = 5! / (2! × 3!) = 120 / (2 × 6) = 10.
For larger numbers the working multiplies only the terms that matter. The number of possible five-card poker hands is C(52, 5) = (52 × 51 × 50 × 49 × 48) / (5 × 4 × 3 × 2 × 1) = 311,875,200 / 120 = 2,598,960. Because C(n, r) = C(n, n − r), choosing 5 cards to keep and choosing 47 to discard give the same count.
Worked example 3: permutations
How many ways can gold and silver be awarded among 5 runners? Now the order matters, so choose Permutation with the same numbers: P(5, 2) = 5! / 3! = 120 / 6 = 20, exactly twice the number of combinations, because each pair of runners can finish in two orders.
A 3-digit code from the digits 0 to 9 with no digit used twice has P(10, 3) = 10 × 9 × 8 = 720 possibilities. If the order did not matter there would be C(10, 3) = 120, and 120 × 3! = 720.
Combination or permutation?
| Combination | Permutation | |
|---|---|---|
| Does the order matter? | No | Yes |
| Notation | C(n, r), nCr or “n choose r” | P(n, r) or nPr |
| Example with n = 10 and r = 3 | A team of 3 people from 10: 120 | President, vice president and secretary from 10: 720 |
| Relation | C(n, r) = P(n, r) / r! | P(n, r) = C(n, r) × r! |
Ask whether swapping two of the selected items gives a different result. If it does, count permutations; if it does not, count combinations. For more examples, including selections where items can repeat, see permutations vs combinations.
Odds and probability
Probability compares the favorable outcomes with all outcomes; odds compare them with the unfavorable ones. If the odds in favor are a : b, the probability is a / (a + b): odds of 1 : 3 give 1 / 4 = 0.25. In the other direction, a probability p has odds in favor of p : (1 − p), so 0.25 has odds of 0.25 : 0.75 = 1 : 3. The calculator gives both for any counts of outcomes.
Common mistakes
- Counting outcomes that are not equally likely. The formula favorable / total needs equally likely outcomes. The sum of two dice has 11 possible values, but a sum of 7 is not 1 of 11: there are 36 equally likely rolls and 6 of them add up to 7, so the probability is 6/36 = 1/6.
- Mixing up combinations and permutations. Choosing a committee is a combination; assigning roles or ranking is a permutation.
- Using the total items as favorable outcomes. In Basic Probability mode n is all the outcomes and r is the ones you want, so r cannot be more than n.
- Confusing probability and odds. A probability of 0.25 is odds of 1 : 3, not 1 : 4.
- Adding probabilities of events that can happen together. For the chance of A or B, or of A and B, use the probability of multiple events calculator.
Probability, combinations and permutations in other software
| Tool | Command |
|---|---|
| Excel / Google Sheets | =COMBIN(52,5) for combinations, =PERMUT(52,5) for permutations, =13/52 for a probability |
| Python | math.comb(52, 5) and math.perm(52, 5) give exact integers; Fraction(13, 52) from the fractions module gives Fraction(1, 4) |
| R | choose(52, 5) for combinations and prod(52:48) for permutations, and 13/52 for a probability |
Spreadsheets return combinations as floating-point numbers, so results of more than about 15 digits lose their last digits. This calculator keeps every digit up to n = 1,000 and stays exact for probabilities as well.
Frequently Asked Questions
What is the formula for probability?
The probability of an event is the number of favorable outcomes divided by the number of possible outcomes: P(A) = favorable / total. It holds when all outcomes are equally likely. Drawing a heart from a deck has 13 favorable outcomes out of 52, so the probability is 13 / 52 = 0.25.
How do I calculate the probability of an event?
Count the outcomes that make the event happen and the total number of equally likely outcomes, then divide. Enter the total outcomes as n and the favorable outcomes as r in Basic Probability mode. You get the probability as a decimal, a fraction and a percentage, together with the odds in favor and against.
What is the difference between probability and odds?
Probability compares the favorable outcomes with all the outcomes; odds compare them with the unfavorable outcomes. A probability of 0.25 (1 of 4 outcomes is favorable) has odds of 1 : 3 in favor and 3 : 1 against. Odds of a : b in favor correspond to a probability of a / (a + b).
What is the difference between a combination and a permutation?
Both count ways to select r items from n, but permutations treat different orders as different outcomes while combinations do not. Choosing 2 committee members from 5 is a combination (10 ways); awarding gold and silver among 5 runners is a permutation (20 ways). P(n, r) = C(n, r) × r!.
Can r be larger than n?
No. You cannot select more items than exist, and a favorable outcome count cannot exceed the total, so the calculator requires r to be between 0 and n and says so when it is not. C(n, n) and C(n, 0) both equal 1, since there is exactly one way to take everything or nothing.
Why do I get 1 when r equals 0?
By definition 0! = 1, so C(n, 0) = n! / (0! × n!) = 1. Conceptually there is exactly one way to choose nothing: the empty selection. The same holds for P(n, 0) = 1.
How large can n be?
Combinations and permutations accept up to 1,000 items and give every digit of the result: C(1000, 500) has 300 digits. Basic Probability accepts counts of up to 30 digits. The calculation uses whole-number arithmetic, so nothing is rounded or lost to floating-point limits, which cap ordinary spreadsheets at about 15 significant digits.
How do I convert a probability to a percentage?
Multiply by 100. A probability of 0.25 is 25%. Probabilities always fall between 0 (impossible) and 1 (certain), so percentages fall between 0% and 100%. The calculator shows the percentage next to the decimal.
How do I find the probability of two events?
For independent events that must both happen, multiply their probabilities; for either of two events, add them and subtract the probability that both happen. The probability of multiple events calculator does this for two events and for longer lists, including the chance that at least one happens or none does.
Can a probability be greater than 1?
No. A probability of 1 means the event is certain, and nothing is more certain than that. If a calculation gives more than 1, an outcome has been counted twice, often by adding the probabilities of events that can happen together.
Embed This Calculator
Add this free calculator to your course page or LMS.
Adjust the height value to fit your page.