Written by Alex Chen ยท Reviewed by Jane Smith ยท July 28, 2026
Flip a virtual coin or roll dice with 4 to 20 sides. Tracks history and statistics.
No results yet.
Flip or roll to see statistics.
This tool bundles a coin flip and a dice roller into one page, giving you a fair heads-or-tails toss and a range of standard polyhedral dice whenever you need a quick random result. It is built for games, casual decisions, and probability experiments, anything where you want the outcome to be out of your hands. Everything runs locally, so there is no network round-trip and no record of what you rolled.
A single button switches between coin mode and dice mode. In coin mode you get heads or tails with equal probability; in dice mode you pick from the common polyhedral set, four, six, eight, ten, twelve, or twenty sides, and the page rolls one die of that type. Each result is added to an on-screen history, newest first, capped at fifty entries, so you can watch streaks develop without the list growing out of control. A running tally next to the history counts how many times each outcome has appeared during the session.
When you click, the page runs a short animation: the coin or die cycles through roughly ten rapid re-rolls before settling on the final value. Each intermediate result is generated the same way as the last one, by sampling a pseudo-random number from the JavaScript engine. The coin decides heads when the sampled value lands below 0.5 and tails otherwise, while a die computes the integer result by scaling that sample across the number of sides and rounding down.
Next to the history, the page keeps a running count of every outcome. Coin results are tallied as heads and tails, while each die face is tracked with a label that names the die type, such as D6=4 or D20=17. Because the tally only covers the current session, it resets when you reload the page; the fifty-entry history and the tally together show both the sequence of rolls and the totals at a glance.
With a fair D6, the average roll approaches 3.5 as the sample grows, the midpoint between one and six, while a D20 averages 10.5. These expected values are handy for comparing dice to card draws or for estimating how a game turn might play out, and they turn the tool into a small probability lab: roll fifty D6s and the tally will sit close to the expected distribution across the six faces.
The law of large numbers means short streaks tell you little: ten heads in a row is unusual but possible, while a million flips will land very close to half and half. That distinction matters when judging whether a game or a dice-rolling routine is behaving as expected.
A point worth being straight about: this page uses the standard Math.random() generator, which produces statistically uniform sequences that are more than adequate for games, school experiments, and casual decisions. It is not cryptographically secure, meaning it should not be used to pick passwords, tokens, or anything with security value. For genuinely unpredictable results of that kind, use a dedicated secure random generator instead.
The die selector offers D4, D6, D8, D10, D12, and D20, the shapes used in tabletop roleplaying games and board games. A D6 is the familiar cube used in most board games, while the D20 carries the critical rolls in many tabletop systems. Each side is equally likely regardless of how many sides the die has, which makes the tool handy for demonstrating probability distributions in a classroom: roll a D6 fifty times and the tally will typically spread across all six faces.
Beyond resolving who goes first, a coin flip is a clean tiebreaker for choosing between two roughly equal options, which restaurant to visit, which movie to watch, which route to drive. Dice bring more outcomes into play: D4 and D8 for small groups, D12 for twelve-way choices, D20 when you want a wide spread. The history and tally also make it useful for running informal probability experiments or settling disputes with a visible, replayable record.
Both faces are chosen with exactly equal probability, so the previous outcome never influences the next one. A coin that came up heads three times in a row still has a 50 percent chance of tails on the fourth toss.
The history lists the most recent result at the top so the last outcome is always the easiest to see; older entries scroll down as the list fills.
The history holds the fifty most recent results and drops the oldest entry when the list fills up, so the tally always reflects recent activity.
Assign each person a side or a face, then roll once; the outcome names the winner. For more than two people, a die whose side count matches the group size works cleanly.
For gameplay and casual decisions, yes, the distribution is uniform across the supported outcomes and there is no measurable bias for this purpose. It simply is not designed for security applications.
Each click rolls a single die of the selected type. For multiple dice, roll repeatedly and use the history to total the results.