Probability Calculators: Events, Bayes & Counting
Free probability calculators for two events (and, or, not), conditional probability, Bayes’ theorem, combinations, permutations and factorials, with steps.
Open the Probability CalculatorUpdated · Formulas and conventions follow our methodology
In short
Probability measures how likely an event is, from 0 (impossible) to 1 (certain). When every outcome is equally likely, P(A) = favorable outcomes ÷ total outcomes: one roll of a die gives P(6) = 1/6 ≈ 0.1667. The calculators on this hub combine two events with the and, or and not rules, find conditional probabilities and Bayes’ theorem updates, count combinations, permutations and factorials exactly, and generate random numbers.
Probability calculator for two events
Enter P(A) and P(B) as decimals, percentages or fractions such as 1/6, say whether the events are independent, mutually exclusive or overlap by a known amount, and the calculator returns every combined probability with a joint probability table, a chart and each step. Questions with “given that” and test-result updates have their own calculators, listed below.
- P(A and B)
- P(A or B)
- P(not A), P(not B)
- Exactly one, neither
- P(A | B), P(B | A)
All 7 probability and counting calculators
Probability of events
Combine two events, condition on one, or reverse a conditional with Bayes’ theorem.
Counting: combinations, permutations and factorials
Count the possible outcomes, often the first step in finding a probability.
Random numbers and simulation
Draw random samples, roll virtual dice and simulate lottery draws.
What these probability calculators cover
The Probability Calculator handles questions about two events: P(A and B), P(A or B), complements, exactly one and neither. It needs to know how the events relate. Independent events do not affect each other, so P(A ∩ B) = P(A) · P(B). Mutually exclusive events cannot happen together, so P(A ∩ B) = 0. For any other pair, enter the overlap P(A ∩ B) directly. If the question says “given that” or “if we know”, it is a conditional probability and belongs in the Conditional Probability Calculator. If you know P(B | A) but need P(A | B), as with a medical test, a spam filter or a quality check, use the Bayes’ Theorem Calculator.
Counting problems split on one question: does order matter? If it does (rankings, codes, seating plans), count permutations; if it does not (committees, lottery tickets, card hands), count combinations. Both are built on factorials, and Statculator computes them with exact integer arithmetic, so C(52, 5) = 2,598,960 and 100!, a 158-digit number, come out exactly. To simulate dice, coin flips or a lottery draw, or to pick a random sample with or without repeats, use the Random Number Generator. For the probability of a number of successes across many trials, continue to Probability Distribution Calculators.
How to calculate a probability, step by step
- List the outcomes. Write down the sample space, every outcome that can happen, and check whether the outcomes are equally likely. A fair die has 6 equally likely outcomes; “rain or no rain” usually does not.
- Count the favorable outcomes. For small problems count them directly. For larger ones use the Combination Calculator when order does not matter and the Permutation Calculator when it does.
- Divide. For equally likely outcomes,
P(A) = favorable ÷ total. Rolling an even number on a die gives 3 ÷ 6 = 0.5. - Combine events with the rules. Use the complement for “not”, the addition rule for “or”, the multiplication rule for “and”, and P(A | B) when one event is known to have happened. The table further down lists each formula.
- Check the answer. Every probability lies between 0 and 1, and P(A) + P(not A) = 1. If “at least one” is hard to count, find 1 − P(none) instead.
Probability worked examples
Two problems of the kind the calculators on this hub solve. Enter the probabilities in the Probability Calculator, or the counts in the Combination Calculator, to check each value.
Drawing marbles from a bag, with and without replacement
Problem. A bag holds 4 red and 6 blue marbles. You draw two marbles. What is the probability that both are red, and that at least one is red?
- 01Without replacement, the first marble stays out, so the second draw has 9 marbles left. Multiply along the branch, or count pairs with combinations.P(both red) = 4/10 × 3/9 = 12/90 = 2/15 ≈ 0.1333Check: C(4, 2) / C(10, 2) = 6 / 45 = 0.1333
- 02With replacement, the first marble goes back, so the two draws are independent and the multiplication rule applies directly.P(both red) = 0.4 × 0.4 = 0.16
- 03At least one red, without replacement: find the complement, both blue, and subtract it from 1.P(both blue) = 6/10 × 5/9 = 30/90 = 1/3P(at least one red) = 1 − 1/3 = 2/3 ≈ 0.6667
Answer. Both red: 0.1333 without replacement and 0.16 with replacement. At least one red without replacement: 0.6667. The three outcomes, both red (2/15), one of each (8/15) and both blue (5/15), add up to 1.
At least one six in four rolls of a die
Problem. You roll a fair die four times. What is the probability of rolling at least one six?
- 01Use the complement. “At least one six” has many cases; “no six” has one. Each roll misses a six with probability 5/6, and the rolls are independent.P(no six in 4 rolls) = (5/6)⁴ = 625/1296 ≈ 0.4823
- 02Subtract from 1.P(at least one six) = 1 − 625/1296 = 671/1296 ≈ 0.5177
Answer. The chance of at least one six in four rolls is about 51.8%, slightly better than even. Adding the separate chances (4 × 1/6 = 0.667) overcounts, because it counts rolls with two or more sixes more than once.
Which probability calculator should I use?
| If you want to… | Use |
|---|---|
| If you want P(A and B), P(A or B) or the complement for two events | |
| If you want the probability of A given that B has happened | |
| If you want to update a prior probability with new evidence, such as a test result | |
| If you want to count selections where order does not matter (committees, card hands, lotteries) | |
| If you want to count arrangements where order matters (rankings, codes, seating) | |
| If you need n! exactly, even for large n | |
| If you want random numbers, a random sample without repeats, or a simulated dice roll or lottery draw | |
| If you want the probability of exactly k or at least k successes in n independent trials | |
| If you draw without replacement and want the probability of exactly k successes | |
| If you want a probability from a normal distribution, such as P(X < 110) |
Probability of a series of independent events
When the same event can happen on each of n independent trials with probability p, three formulas cover most questions: all n succeed with probability pⁿ, none succeed with probability (1 − p)ⁿ, and at least one succeeds with probability 1 − (1 − p)ⁿ. If 5% of items are defective, the chance that a sample of 20 contains at least one defective item is 1 − 0.95²⁰ = 1 − 0.3585 = 0.6415.
For the probability of exactly k successes, or of k or more, use the Binomial Distribution Calculator. When you draw without replacement from a small population, such as cards from a deck, the trials are not independent; use the Hypergeometric Distribution Calculator instead.
Probability as a percentage, fraction or odds
The same probability can be written several ways. A probability of 25% is 0.25 or 1/4: the event happens about 1 time in 4, and the odds are 1 to 3 in favor (3 to 1 against). A probability of 70% is 0.7 or 7/10, and the odds are 7 to 3 in favor. To turn odds of a to b in favor into a probability, compute a ÷ (a + b): odds of 7 to 3 give 7 ÷ 10 = 0.7.
A probability is a long-run frequency, not a promise about the next try. Theoretical probability comes from counting equally likely outcomes, such as 1/6 for a six. Experimental probability is the share of times the event happened in real trials, and by the law of large numbers it settles close to the theoretical value as the number of trials grows. You can see this by simulating a few hundred dice rolls with the Random Number Generator.
Probability rules and counting formulas
| Rule | Formula | Example |
|---|---|---|
| Equally likely outcomes | P(A) = favorable outcomes ÷ total outcomes | Even number on a die: 3 ÷ 6 = 0.5 |
| Complement | P(not A) = 1 − P(A) | P(A) = 0.3 gives P(not A) = 0.7 |
| Addition rule | P(A ∪ B) = P(A) + P(B) − P(A ∩ B) | 0.5 + 0.4 − 0.2 = 0.7 |
| Multiplication rule (independent events) | P(A ∩ B) = P(A) · P(B) | Two heads: 0.5 × 0.5 = 0.25 |
| Conditional probability | P(A | B) = P(A ∩ B) / P(B) | 0.2 / 0.4 = 0.5 |
| Bayes’ theorem | P(A | B) = P(B | A) · P(A) / P(B) | 1% prevalence, 95% sensitivity, 5% false positives: P(disease | positive) = 0.161 |
| At least one in n independent trials | 1 − (1 − p)ⁿ | At least one six in 4 rolls: 1 − (5/6)⁴ = 0.5177 |
| Odds to probability | Odds a : b in favor gives P = a ÷ (a + b) | Odds 7 : 3 give 0.7 |
| Factorial | n! = n × (n − 1) × … × 1, with 0! = 1 | 5! = 120 |
| Permutations | P(n, r) = n! / (n − r)! | P(10, 3) = 720 |
| Combinations | C(n, r) = n! / [r! (n − r)!] | C(52, 5) = 2,598,960 |
Frequently asked questions
How do I calculate a probability?
What is the probability of rolling six dice?
What does a probability of 25% or 70% mean?
What is the difference between a permutation and a combination?
What is the difference between conditional probability and Bayes’ theorem?
How do I know whether two events are independent?
Why can a positive result on an accurate test still be unlikely to be correct?
Looking for something else? See all calculators or search the site.