Probability Calculator — Dice, Coins, Cards & Monty Hall
Find the probability of a single event, combine events with AND/OR, work out dice and coin outcomes, solve conditional probability, and see why switching wins the Monty Hall problem 2/3 of the time — with every step shown. The classic surprise: rolling at least one 6 in 4 rolls is more likely than not — 51.77% — because the chance of missing every time is only (5/6)^4 = 48.23%.
Probability Calculator: Single, AND/OR, Dice & Coins, Conditional & Monty Hall
Pick the mode that matches your problem. Calculations run in your browser.
What Is a Probability Calculator?
A probability calculator answers the five questions students ask most: what is the chance of this one event? What is the chance of two events both happening, or at least one of them? What happens with dice and coins over several rolls or flips? What is the chance now that something already happened? And should you switch doors in the Monty Hall game? Give it favourable and total outcomes and it returns the probability — rolling a 6 is 1/6 = 16.67%. Give it two probabilities and it combines them — two heads in a row is 1/2 × 1/2 = 25%. Give it dice or coins and it counts the outcomes — at least one 6 in 4 rolls is 51.77%. Every answer comes with the step-by-step working so you can verify it by hand — including the famous surprise: switching doors in Monty Hall wins 2/3 of the time, not 1/2.
How to Use the Probability Calculator
The tool has five modes so you can start with whatever your problem gives you.
- Choose a mode that matches your problem (or tap a preset to load a worked example).
- Enter your numbers — counts of outcomes, probabilities between 0 and 1, or a door number.
- Select Calculate to generate the result cards.
- Read the note under the cards for the step-by-step working and a check you can verify by hand.
The built-in check re-derives the answer a second way — the complement (P + P(not) = 1), the dice-sums table adding to 36/36, or the coin outcomes adding to 1 — so a wrong keystroke shows up immediately.
What Is Probability?
Probability is the chance that something happens, written as a number between 0 and 1 — or as a percentage between 0% and 100%. A probability of 0 means the event cannot happen; a probability of 1 (100%) means it is certain. Everything else sits in between: rolling a 6 on a fair die is 1/6 = 16.67%, and flipping heads is 1/2 = 50%.
| Rule | Formula | When to use it | Example |
|---|---|---|---|
| Single event | P = favourable / total | One roll, one draw, one flip | P(6) = 1/6 = 16.67% |
| AND (independent) | P(A and B) = P(A) × P(B) | Both events must happen | Two heads = 1/2 × 1/2 = 25% |
| OR (independent) | P(A or B) = P(A) + P(B) − P(A) × P(B) | At least one must happen | Heads or a 6 = 7/12 = 58.33% |
| Complement | P(not A) = 1 − P(A) | "At least one" problems | At least one 6 in 4 rolls = 51.77% |
| Conditional | P(A|B) = P(A and B) / P(B) | B already happened | P(6 | even) = 1/3 = 33.33% |
| Binomial (coins) | P(exactly k heads) = C(n,k) / 2^n | Exactly k heads in n flips | Exactly 2 heads in 3 flips = 3/8 = 37.5% |
The Complement Rule — The "At Least One" Trick
The hardest-looking probability questions are usually the easiest once you flip them around. "At least one 6 in 4 rolls" sounds like a lot of counting — one 6, two 6s, three 6s, four 6s. The trick is to count the opposite instead: the chance of no 6 at all. Each roll misses with probability 5/6, so four misses in a row is (5/6)^4 = 625/1296 = 48.23%. Then at least one 6 is 1 − 48.23% = 51.77% — more likely than not, even though a single roll only gives you 16.67%. The same trick works for coins: at least one head in 3 flips is 1 − (1/2)^3 = 1 − 1/8 = 7/8 = 87.5%.
The Two-Dice Sums Table
Two dice have 36 equally likely outcomes (6 × 6). The sums are not equally likely — 7 is the most common sum because six different pairs make it, while 2 and 12 have only one pair each.
| Sum | Pairs that make it | Probability |
|---|---|---|
| 2 | (1,1) | 1/36 = 2.78% |
| 3 | (1,2), (2,1) | 2/36 = 5.56% |
| 4 | (1,3), (2,2), (3,1) | 3/36 = 8.33% |
| 5 | (1,4), (2,3), (3,2), (4,1) | 4/36 = 11.11% |
| 6 | (1,5), (2,4), (3,3), (4,2), (5,1) | 5/36 = 13.89% |
| 7 | (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) | 6/36 = 16.67% |
| 8 | (2,6), (3,5), (4,4), (5,3), (6,2) | 5/36 = 13.89% |
| 9 | (3,6), (4,5), (5,4), (6,3) | 4/36 = 11.11% |
| 10 | (4,6), (5,5), (6,4) | 3/36 = 8.33% |
| 11 | (5,6), (6,5) | 2/36 = 5.56% |
| 12 | (6,6) | 1/36 = 2.78% |
AND vs OR — Multiply for "Both", Add (Carefully) for "Either"
Two words decide the whole calculation. AND means both events happen, so you multiply: P(two heads) = 1/2 × 1/2 = 25%. OR means at least one happens, so you add — but you must subtract the overlap, the outcomes counted twice: P(heads or a 6) = 1/2 + 1/6 − 1/12 = 7/12 = 58.33%. The overlap is the outcome where both happen (heads and a 6, 1/12) — adding without subtracting it counts that outcome twice. When the events cannot happen together at all (rolling a 6 or a 5 on one die), there is no overlap to subtract: P(6 or 5) = 1/6 + 1/6 = 1/3 = 33.33%.
Conditional Probability — What Changes When Something Already Happened
Conditional probability is the chance of A given that B already happened, written P(A|B). The formula is P(A|B) = P(A and B)/P(B) — you shrink the world down to just the outcomes where B happened, then count how many of those are also A. Example: you rolled an even number. What is the chance it is a 6? The even outcomes are {2, 4, 6} — three of them — and only one is a 6, so P(6|even) = 1/3 = 33.33%. The unconditional P(6) was 16.67%; knowing the roll is even doubled it, because the new information threw away half the outcomes. Cards work the same way: after one ace is drawn, only 3 aces remain out of 51 cards, so P(second card is an ace | first was an ace) = 3/51 = 5.88% — the deck changed, so the probability changed. That is the difference from coin flips: coins have no memory, but a deck without replacement does.
Probability Calculator Worked Examples
Every row below is computed exactly — hand-verified in Python — so you can check each one by hand.
| Task | Working | Answer |
|---|---|---|
| P(rolling a 6) | 1 favourable / 6 total | 1/6 = 16.67% |
| P(rolling an even number) | 3 favourable / 6 total | 1/2 = 50% |
| P(rolling a 6 or a 5) | 2/6 | 1/3 = 33.33% |
| P(not rolling a 6) | 1 − 1/6 | 5/6 = 83.33% |
| P(drawing an ace) | 4/52 | 1/13 = 7.69% |
| P(drawing a red card) | 26/52 | 1/2 = 50% |
| P(two heads in a row) | 1/2 × 1/2 | 1/4 = 25% |
| P(three heads in a row) | (1/2)^3 | 1/8 = 12.5% |
| P(heads then a 6) | 1/2 × 1/6 | 1/12 = 8.33% |
| P(heads or a 6) | 1/2 + 1/6 − 1/12 | 7/12 = 58.33% |
| P(rolling a 7 with two dice) | 6 pairs / 36 outcomes | 6/36 = 1/6 = 16.67% |
| P(two 6s) | 1 pair / 36 outcomes | 1/36 = 2.78% |
| P(at least one 6 in 2 rolls) | 1 − (5/6)^2 | 11/36 = 30.56% |
| P(at least one 6 in 4 rolls) | 1 − (5/6)^4 | 51.77% (≈ 51.8%) |
| P(at least one 6 in 6 rolls) | 1 − (5/6)^6 | 66.51% |
| P(at least one head in 3 flips) | 1 − (1/2)^3 | 7/8 = 87.5% |
| P(exactly 2 heads in 3 flips) | C(3,2)/8 | 3/8 = 37.5% |
| P(exactly 2 heads in 4 flips) | C(4,2)/16 | 6/16 = 37.5% |
| P(exactly 1 head in 4 flips) | C(4,1)/16 | 4/16 = 25% |
| P(second ace | first ace) | 3 aces left / 51 cards | 3/51 = 5.88% |
| P(ace then king, no replacement) | (4/52) × (4/51) | 16/2652 = 0.60% |
| P(sum 7 | first die is 3) | Second die must be 4 | 1/6 = 16.67% |
| P(6 | roll is even) | (1/6)/(1/2) | 1/3 = 33.33% |
| P(second red | first red) — bag 3 red, 2 blue | 2 reds left / 4 balls | 2/4 = 50% |
| Monty Hall — switching wins | 2/3 | 66.67% |
| Monty Hall — staying wins | 1/3 | 33.33% |
| After 5 heads, P(heads next) | Coin has no memory | 1/2 = 50% |
The Monty Hall Problem: Why Switching Wins 2/3 of the Time
You are on a game show with 3 doors. Behind one door is a car; behind the other two are goats. You pick a door — say Door 1. The host, who knows where the car is, opens a different door — say Door 3 — and shows you a goat. Now he asks: do you want to switch to Door 2, or stay with Door 1? Most people say it does not matter — two doors left, so 50/50. That is wrong. Switching wins 2/3 of the time; staying wins 1/3.
| Your first pick | Car is behind | Host opens | Switching gives you | Staying gives you |
|---|---|---|---|---|
| Door 1 | Door 1 (1/3 of the time) | Door 2 or 3 (a goat) | A goat — you lose | The car — you win |
| Door 1 | Door 2 (1/3 of the time) | Door 3 (a goat) | The car — you win | A goat — you lose |
| Door 1 | Door 3 (1/3 of the time) | Door 2 (a goat) | The car — you win | A goat — you lose |
The reasoning: Your first pick is right only 1/3 of the time — the car is behind one of three doors, and you picked one. So 2/3 of the time, the car is behind one of the two doors you did not pick. The host then opens a goat door from those two, which concentrates the whole 2/3 onto the single remaining door. Switching takes that 2/3; staying keeps your original 1/3. The host's action adds information — he never opens the car door — and switching uses that information.
The Gambler's Fallacy: The Coin Has No Memory
A coin has just landed heads five times in a row. What is the chance of heads on the next flip? Many people say tails is "due" — the coin owes a tails after five heads. It does not. The next flip is still 1/2 = 50% heads. Coin flips are independent: each flip starts fresh, and the coin has no memory of the last five. The confusion comes from mixing up two different questions. The chance of six heads in a row before you start flipping is (1/2)^6 = 1/64 = 1.56% — genuinely rare. But once five heads have already happened, that rare event is in the past; the sixth flip is a brand-new 50/50. The same fallacy ruins roulette players ("red is due after five blacks") and lottery players ("these numbers haven't come up in weeks"). Past results do not change the next independent trial — only a changed deck, a changed bag, or new information (like the Monty Hall host's reveal) changes a probability.
A Real-World Example: The Rain-or-Traffic Commute
You have a 30% chance of rain on your commute (P = 0.3) and a 40% chance of heavy traffic (P = 0.4), and the two are independent. What is the chance of rain or traffic — a bad commute? Add, then subtract the overlap: P(rain or traffic) = 0.3 + 0.4 − (0.3 × 0.4) = 0.7 − 0.12 = 0.58 = 58%. The overlap (rain and traffic together, 12%) was counted in both the 30% and the 40%, so it has to be taken out once. And the chance of both at once is just the product: P(rain and traffic) = 0.3 × 0.4 = 0.12 = 12%. The chance of a perfect commute — no rain and no traffic — is (1 − 0.3) × (1 − 0.4) = 0.7 × 0.6 = 0.42 = 42%. Check: 58% + 42% = 100% ✓.
How to Calculate Probability Step by Step
Follow this recipe for the classic example — at least one 6 in 4 rolls.
- Name the event: "At least one 6 in 4 rolls of a fair die."
- Flip it with the complement rule: "At least one" is hard to count directly (one 6, two 6s, three 6s, four 6s), so count the opposite instead — "no 6 at all" — and subtract from 1.
- Find P(no 6 in one roll): 5 faces out of 6 are not a 6, so P(no 6) = 5/6.
- Multiply for four independent rolls: P(no 6 in 4 rolls) = (5/6)^4 = 625/1296 = 48.23%.
- Subtract from 1: P(at least one 6) = 1 − 0.4823 = 0.5177 = 51.77% (≈ 51.8%).
- Check with the complement: 51.77% + 48.23% = 100% ✓. And sanity-check the direction: four rolls give four chances, so the answer must be bigger than one roll's 16.67% — and it is.
Common Mistakes With Probability
1. The gambler's fallacy — thinking tails is "due" after five heads
After five heads, the next flip is still 1/2 = 50% heads. Independent events have no memory: past flips do not change the next flip. The rare thing (six heads in a row, 1/64 = 1.56%) is the chance before the run starts — not the chance of the next flip once five heads have already happened.
2. Adding probabilities for AND — "two heads" is not 1/2 + 1/2
P(two heads) = 1/2 × 1/2 = 1/4 = 25%, not 1/2 + 1/2 = 1 (100%). AND means both events happen, so you multiply. Adding is for OR — and even then you must subtract the overlap. If your AND answer is bigger than either single probability, you added when you should have multiplied.
3. Forgetting to subtract the overlap in OR
P(heads or a 6) is not 1/2 + 1/6 = 2/3. The outcome "heads and a 6" (1/12) is counted in both halves, so it must be subtracted once: 1/2 + 1/6 − 1/12 = 7/12 = 58.33%. Only when the events cannot happen together (a 6 or a 5 on one die) is there no overlap to subtract.
4. Mixing up P(A|B) and P(B|A) — the direction matters
P(6 | even) = 1/3, but P(even | 6) = 1 — if you rolled a 6, it is certainly even. Swapping the condition changes the answer completely. Always ask: which event is the given one (the world you are now in), and which is the one you are measuring inside it?
5. Computing "at least one" by adding up the cases — and missing one
P(at least one 6 in 4 rolls) by direct counting needs four terms (exactly one 6, exactly two, exactly three, exactly four) — and most people miss one. Use the complement instead: 1 − P(no 6) = 1 − (5/6)^4 = 51.77%. One multiplication, no missed cases.
6. Staying in Monty Hall because "two doors left means 50/50"
Two doors are left, but they are not equally likely — your first pick still carries only its original 1/3, and the host's reveal concentrated the other 2/3 onto the remaining door. Switching wins 2/3, staying wins 1/3. The 100-door version makes it obvious: you would not keep a 1/100 guess over a door the host deliberately left closed.
Benefits and Limitations
Benefits
- Finds single-event probabilities as a fraction, decimal and percentage, with the counting shown.
- Combines independent events with the AND rule (multiply) and the OR rule (add, minus the overlap).
- Handles dice (target sums and "at least one 6") and coins (exact heads in n flips) with the full two-dice sums table.
- Solves conditional probability with the P(A|B) formula, including no-replacement card and bag examples.
- The Monty Hall explainer shows the 3-door table and the 100-door intuition, so the 2/3 answer stops feeling wrong.
- Every answer carries the step-by-step working — fractions first, then decimals and percentages — so homework can be checked by hand.
- Responsive on phones, tablets and desktops.
Limitations
- Assumes fair dice, fair coins and a standard 52-card deck unless you enter your own counts.
- AND/OR mode assumes the events are independent — for dependent events (cards without replacement) use the conditional mode instead.
- Results use JavaScript floating-point arithmetic, so decimals and percentages are rounded to 4 and 2 decimal places.
Quick Definitions
| Question | Direct Answer |
|---|---|
| What is a probability calculator? | A tool that finds the chance of an event as a fraction, decimal or percentage. Rolling a 6 is 1/6 = 16.67%; at least one 6 in 4 rolls is 51.77%; switching in Monty Hall wins 2/3. |
| What is probability? | The chance an event happens, as a number from 0 (impossible) to 1 (certain). P(event) = favourable outcomes / total outcomes. |
| What is P(rolling a 6)? | 1/6 = 16.67% — 1 favourable outcome (the face 6) out of 6 total faces. |
| What is P(two heads in a row)? | 1/4 = 25% — multiply for AND: 1/2 × 1/2. Three heads in a row is 1/8 = 12.5%. |
| What is P(at least one 6 in 4 rolls)? | 51.77% (≈ 51.8%) — use the complement: 1 − (5/6)^4 = 1 − 48.23%. |
| What is conditional probability? | The chance of A given B already happened: P(A|B) = P(A and B)/P(B). Example: P(6 | even) = 1/3 = 33.33%. |
| Should you switch in the Monty Hall problem? | Yes — switching wins 2/3 (66.67%) and staying wins 1/3 (33.33%). The host's reveal concentrates the 2/3 onto the remaining door. |
| What is the gambler's fallacy? | Believing past results change the next independent trial — e.g. that tails is "due" after five heads. The next flip is still 1/2 = 50%. |
Frequently Asked Questions
What is the probability of rolling a 6?
1/6 = 16.67%. A fair die has 6 faces and only one of them is a 6, so P(6) = 1 favourable outcome / 6 total outcomes = 0.1667 = 16.67%. Rolling a 7 with two dice is also 1/6 — six pairs out of 36 make 7.
How do you calculate the probability of two heads in a row?
Multiply: 1/2 × 1/2 = 1/4 = 25%. AND means both events happen, so you multiply their probabilities. Three heads in a row is (1/2)^3 = 1/8 = 12.5%, and at least one head in 3 flips is 1 − 1/8 = 7/8 = 87.5%.
What is the probability of at least one 6 in 4 rolls?
51.77% (about 51.8%). Use the complement rule: the chance of no 6 in one roll is 5/6, so no 6 in four rolls is (5/6)^4 = 48.23%, and at least one 6 is 1 − 48.23% = 51.77%. More likely than not — four rolls give four chances.
Should you switch doors in the Monty Hall problem?
Yes — switching wins 2/3 (66.67%) and staying wins 1/3 (33.33%). Your first pick is right only 1/3 of the time, so the car is behind the other two doors 2/3 of the time. The host opens a goat door from those two, concentrating the whole 2/3 onto the one remaining door. With 100 doors, switching wins 99/100.
What is conditional probability?
The chance of A given that B already happened: P(A|B) = P(A and B)/P(B). For example, P(6 | the roll is even) = 1/3 = 33.33%, because only {2, 4, 6} remain and one of them is a 6. Drawing cards without replacement is conditional too: after one ace is drawn, P(the second card is an ace) = 3/51 = 5.88%.
After five heads in a row, is tails more likely next?
No — the next flip is still 1/2 = 50% heads. Coin flips are independent; the coin has no memory. Six heads in a row is rare (1/64 = 1.56%) only before the flips start. Once five heads have happened, the sixth flip is a brand-new 50/50. Believing otherwise is the gambler's fallacy.
Related Math Tools
Probability Calculator Methodology
This calculator derives every answer from the standard probability definitions, using JavaScript floating-point arithmetic (decimals rounded to 4 places, percentages to 2).
Single-event mode divides the favourable count by the total count and reports the fraction (reduced by GCD), the decimal and the percentage; it rejects favourable counts above the total or negative counts. AND/OR mode takes two probabilities between 0 and 1, multiplies for AND and adds-minus-overlap for OR. Dice mode enumerates the 36 two-dice outcomes for target sums (and generalises the "at least one 6" complement as 1 − (5/6)^n for any number of rolls), while coin mode uses the binomial coefficient C(n,k)/2^n for exact-heads counts and 1 − (1/2)^n for at-least-one-head. Conditional mode divides P(A and B) by P(B) and rejects P(B) = 0 and P(A and B) > P(B). Monty Hall mode computes the win rates from the number of doors: switching wins (n−1)/n and staying wins 1/n, so 3 doors give 2/3 vs 1/3, 100 doors give 99/100 vs 1/100, and 300 doors give 299/300 vs 1/300. Every result carries a complement cross-check (P + P(not) = 1) and the dice and coin totals are checked against 36/36 and 1. The page is intended as an educational calculator and verification tool.
Mathematical References
Switch, Don't Stay — The Odds Are 2 to 1
Enter your event above — a die roll, a coin flip, a card draw, or the Monty Hall doors — and get the probability as a fraction, decimal and percentage, with every step shown.
Use Probability Calculator