Coin flip & dice roller

Heads or tails, or any dice a game night needs. Fair randomness from your browser's crypto source.

Coin flip

?

No flips yet.

Dice roller

How to flip and roll

  1. For a coin flip, click the Flip button or click the coin itself. The face shows HEADS on blue or TAILS on amber, and a running tally underneath tracks your session.
  2. For dice, pick a die from the standard tabletop set (d4, d6, d8, d10, d12, d20, d100), set how many to roll (1 to 20), and click Roll.
  3. Each die shows its own result, and rolls of more than one die also show the total.

A worked example: rolling for a character stat

The classic tabletop stat roll is several d6 at once. Choose d6, set the count to 3, and click Roll. Suppose the dice come up 5, 2, and 6: the tool displays all three individually and reports "Total: 13 (average roll would be 10.5)". That average figure is the expected value of the roll, calculated as the number of dice times (sides + 1) / 2, so you immediately know whether you rolled above or below par. For a d20 attack roll, switch the die, set the count to 1, and the total line stays out of your way, because a single die needs no summary.

Why streaks do not mean it is broken

Both the coin and the dice draw from crypto.getRandomValues, the browser's cryptographic random source, with rejection sampling so every face is exactly equally likely. That last part matters: naive dice rollers that take a random number modulo six make low faces come up very slightly more often. Fair randomness also produces streaks, and this surprises people every time. Five heads in a row feels rigged, but across 100 flips there is roughly an 81 percent chance of at least one run of five. This is exactly why the tally exists: flip 50 times and watch the percentage wobble toward 50/50 without ever sitting still. If you teach probability, this little coin is a better demonstration than most textbook diagrams, because students can see both the streaks and the long-run convergence in the same minute.

Honest limitations

The tally resets when you reload the page; nothing is stored anywhere, so record any sequence you need before closing the tab. You can roll at most 20 dice per click, and all dice in a roll share one type, so a mixed roll like 2d6 plus 1d8 takes two clicks and your own addition. There is no modifier field either: a d20+5 attack means rolling and adding 5 in your head, which most players do anyway. And the coin has no animation beyond the color change, a deliberate choice, since the result is decided the instant you click and a spinning coin graphic would only pretend otherwise.

Frequently asked questions

Is the coin flip actually 50/50?

Yes, each flip draws from the browser's cryptographic random source, so heads and tails are exactly equally likely and past flips have no effect on the next one.

What dice can I roll?

The standard tabletop set: d4, d6, d8, d10, d12, d20, and d100, up to twenty at once with the individual results and their total shown.

Why did I get heads five times in a row?

Streaks are normal in fair randomness: in 100 flips there is about an 81% chance of at least one run of five. The tally below the coin lets you watch the ratio settle toward 50/50 over many flips.