Coin Flip & Dice Roller
This tool flips a virtual coin and rolls a virtual die for you at random. Use the coin to settle a heads-or-tails decision, and use the die to get a random number by choosing how many sides it has — a classic 6-sided die, a 20-sided die for games, or anything from 2 to 100. Every result is generated the moment you click, so it is perfect for making quick decisions, playing board games without physical dice, running classroom activities, or breaking a tie.
Flip a coin
Roll a die
Each throw is independent and uses your browser’s random generator. It is not suitable for legally binding draws.
Publicidad
How it works
When you flip the coin, the tool draws a random number and maps it to one of two equally likely outcomes: heads or tails. Under the hood it calls the browser’s Math.random(), which returns a value between 0 and 1: below 0.5 it shows heads, otherwise tails, so each side genuinely gets a 50% chance. When you roll the die, you first choose the number of sides N, and the tool draws a whole number between 1 and N, with every face having the same chance of coming up. Each throw is completely independent of the previous one — the coin has no memory. This is where the gambler’s fallacy comes in: after five heads in a row, many people feel tails is “due”, but the next flip is still exactly 50/50. Long streaks look unlikely only when you predict them in advance; once the earlier flips have happened, they no longer affect what comes next.
Probability of a run of heads
Because each flip is independent, the chance of getting heads several times in a row is found by multiplying 1/2 by itself once per flip. A single heads is 1 in 2, but ten heads in a row is only 1 in 1024 — rare, yet it happens roughly once in every thousand attempts. The key point: this probability applies before you start flipping. Once you have already seen four heads, the fifth flip is still a plain 50/50.
| Flips in a row | Chance they all land heads |
|---|---|
| 1 | 1/2 (50%) |
| 2 | 1/4 (25%) |
| 3 | 1/8 (12.5%) |
| 4 | 1/16 (6.25%) |
| 5 | 1/32 (3.13%) |
| 6 | 1/64 (1.56%) |
| 7 | 1/128 (0.78%) |
| 8 | 1/256 (0.39%) |
| 9 | 1/512 (0.20%) |
| 10 | 1/1024 (0.10%) |
Publicidad
Preguntas frecuentes
- How random is the coin flip?
- The coin uses the browser’s built-in random number generator, giving heads and tails each a 50% chance. It is more than random enough for everyday decisions, games, and classroom use, though it is not certified for gambling or legally binding draws.
- How many sides can the die have?
- You can set any number of sides from 2 up to 100. Use 6 for a standard die, 20 for tabletop role-playing games, or a custom value like 8, 10 or 12 for other games and lotteries.
- Are past results connected to the next one?
- No. Each flip and each roll is completely independent. Getting heads five times in a row does not make tails any more likely on the next flip — the chance is always the same.
- Can I use this instead of a physical coin or die?
- Yes. It works exactly like a fair coin or die and is handy when you don’t have one nearby, when you need an unusual number of sides, or when you want to avoid a biased or weighted physical object.
- Does it need the internet after the page loads?
- No. Once the page has loaded, the coin and die run entirely in your browser, so you can keep flipping and rolling without any connection.
- Can a coin really land heads 10 times in a row?
- Yes. It is unusual but perfectly possible: the odds of ten heads in a row are 1 in 1024, so on average it turns up about once every thousand attempts. A streak does not mean the coin is broken or biased — with enough flips, even long runs eventually appear, and each one had the same chance as any other exact sequence.