The fair coin and independent events
A fair coin has a probability of 1/2 (50%) of landing heads and 1/2 of landing tails. The key point is that every flip is independent: the coin has no memory. If five heads came up in a row, the sixth flip is still 50/50.
Believing otherwise is called the gambler's fallacy: thinking tails is "due." What is true is that five heads in a row, judged in advance, is an unlikely event (3.125%). But once those five flips have happened, they are in the past and don't affect the next one.
How many heads in a row: the 1/2^n rule
Because flips are independent, probabilities multiply. For n heads in a row (or n tails, or any specific sequence you pick in advance) the probability is 1/2 multiplied by itself n times, that is 1/2^n.
| Flips in a row | Calculation | Probability |
|---|---|---|
| 1 head | 1/2 | 50% |
| 2 heads | 1/4 | 25% |
| 3 heads | 1/8 | 12.5% |
| 4 heads | 1/16 | 6.25% |
| 5 heads | 1/32 | 3.125% |
| 6 heads | 1/64 | 1.5625% |
| 8 heads | 1/256 | about 0.39% |
| 10 heads | 1/1,024 | about 0.098% |
Watch out for a common trap: 1/32 is the probability that the first five flips are heads, but if you keep flipping, a run of five identical results somewhere is normal. Over 100 flips, the probability of a run of at least 5 on the same side (heads or tails) somewhere is around 97%, and of at least 6 around 81%. A long streak in a long series is not a sign that the coin is rigged.
One die and the chance of at least one 6
A fair six-sided die gives each number with probability 1/6, about 16.7%. To find the chance of at least one 6 over several rolls, it is easier to compute the opposite: the probability of no 6 at all, which is (5/6) raised to the number of rolls, and subtract it from 1.
With 4 rolls: 1 − (5/6)^4 = 1 − 625/1,296 = 0.5177, about 51.8%. So when you roll a die four times, getting at least one 6 is slightly more likely than not getting any.
| Rolls of one die | Chance of at least one 6 |
|---|---|
| 1 | about 16.7% |
| 2 | about 30.6% |
| 3 | about 42.1% |
| 4 | about 51.8% |
| 6 | about 66.5% |
| 8 | about 76.7% |
Notice that with 6 rolls you do not reach 100%: six chances of 1/6 do not add up to certainty. Each new roll only shrinks the probability of still having no 6.
Two dice: why 7 is the most common sum
With two six-sided dice there are 6 × 6 = 36 equally likely combinations. The sums are not equally likely because some can be formed in more ways. A 2 only comes from 1+1; a 7 comes from 1+6, 2+5, 3+4, 4+3, 5+2 and 6+1, six different ways.
| Sum | Combinations | Probability |
|---|---|---|
| 2 | 1 of 36 | about 2.8% |
| 3 | 2 of 36 | about 5.6% |
| 4 | 3 of 36 | about 8.3% |
| 5 | 4 of 36 | about 11.1% |
| 6 | 5 of 36 | about 13.9% |
| 7 | 6 of 36 | about 16.7% |
| 8 | 5 of 36 | about 13.9% |
| 9 | 4 of 36 | about 11.1% |
| 10 | 3 of 36 | about 8.3% |
| 11 | 2 of 36 | about 5.6% |
| 12 | 1 of 36 | about 2.8% |
Other facts from the same table: rolling two sixes is 1/36 (about 2.8%), rolling matching numbers (doubles) is 6/36 = 1/6, and getting at least one 6 on a two-dice roll is 11/36 (about 30.6%), the same as rolling one die twice. A 12-sided die is not the same as two 6-sided dice: the d12 gives a 7 with probability 1/12 (about 8.3%), while 2d6 gives it with 1/6.
Role-playing dice: d4, d6, d8, d10, d12 and d20
The number after the "d" is the number of sides: a d20 gives a number from 1 to 20 with equal probability, 5% each. The average of a die with n sides running from 1 to n is (n + 1) / 2: 3.5 for a d6, 10.5 for a d20.
Many role-playing games use an advantage and disadvantage rule: you roll two d20s and keep the higher one (advantage) or the lower one (disadvantage). The math, over 400 possible combinations, looks like this:
| Goal | One d20 | With advantage | With disadvantage |
|---|---|---|---|
| Roll 11 or higher | 50% | 75% | 25% |
| Roll 15 or higher | 30% | 51% | 9% |
| Roll a 20 | 5% | 9.75% | 0.25% |
| Average result | 10.5 | 13.825 | 7.175 |
Advantage does not add 10 points: to need an 11 or higher, it goes from 50% to 75%; for a 20, from 5% to 9.75%. The effect is largest when the target sits in the middle of the scale. Also, the tool applies no game rules, so to do this, roll two d20s and keep the higher or lower one yourself.
How to use Coin flip, Dice roller and Random number
- In "Coin flip," choose how many coins you want (up to 10) and tap "Flip coin" or press the space bar. Each coin is shown, along with the summary and, below, the running count. "Reset count" starts from zero.
- In "Dice roller," choose the number of dice (1 to 10) and the sides (4, 6, 8, 10, 12, 20 or 100), and tap "Roll." You see each die, the total and a history of rolls that you can empty with "Clear history."
- In "Random number," set the minimum, the maximum (both included) and the quantity. If you don't want repeats, turn on "No repeated numbers" and tap "Generate."
- To check the tables in this guide, flip 10 coins many times: the most common result is 5 heads (24.6% of the flips) and 4 to 6 heads add up to about 65.6%. Seeing 0 or 10 heads happens about 1 in every 512 flips.
Everything is calculated on your device, without sending anything to a server. The coin count and the dice history are lost when you reload the page.
Deciding something fairly
For two options, heads or tails is the simplest. For more, use a die or a random number, assigning one option to each number. A useful trick: with four options, flip a coin twice (HH, HT, TH, TT) or roll a d4. With five or more, a random number with the exact range works better.
It helps if the draw is visible: everyone should see the screen, and the rules should be agreed before rolling (which side is which option, and that the first result counts). Changing your mind after seeing the result removes all fairness. For draws with legal consequences or that need a notary, an online tool is not enough.
What random means in a browser
A computer doesn't toss anything: it uses a random number generator. For Dice roller and Random number, the site uses the browser's cryptographic generator, designed so results can't be predicted and every number in the range has the same probability. The coin uses the browser's random number generator with 50% for each side.
Two honest warnings. First, on the coin the animation is purely visual: the result is decided before it spins. Second, with few flips it is normal for results to look uneven: in 100 coin flips, 40 to 60 heads is typical (about 96% of the time), not exactly 50.
Frequently asked questions
If five heads came up in a row, is tails more likely now?
No. Each flip is independent, so the sixth is again 50% heads and 50% tails. Thinking otherwise is the gambler's fallacy.
What is the probability of 3 heads in a row?
It is 1/2 × 1/2 × 1/2 = 1/8, which is 12.5%. For 5 heads in a row it is 1/32, 3.125%.
Why does 7 come up more than 12 with two dice?
Because 7 can be formed in six ways (1+6, 2+5, 3+4, 4+3, 5+2, 6+1) out of 36 combinations, 16.7%, while 12 only comes from 6+6, which is 2.8%.
What is the chance of at least one 6 in 4 rolls of a die?
1 − (5/6)^4, which is about 51.8%. You get it by subtracting from 1 the probability of rolling no 6 in all four rolls.
Are the coin and dice results really random?
They are generated with the browser's random number generator, with no bias toward any side. They are fine for deciding and playing, but not as proof of an official draw.