Tool

Coin toss and dice

Call heads or tails for the kick-off, or roll a die to see who serves first. Your browser's cryptographic generator supplies the results, so no pattern lurks in them.

Fair by designd4 to d100Running tally

Coin toss and dice: working area

Coin

Tap the coin, or hit Space

Heads0
Tails0
Latest—
Dice

Press Roll or the D key

Dice
Faces
Rolls0
Average per die—
Latest—
Keyboard shortcuts
Space
Flip the coin
D
Roll the dice
M
Mute

Shortcuts pause whenever you're typing in a field.

Stored on this device only. Nothing goes to a server.

Getting started

Tap the coin, click the button or press Space and it spins to heads or tails. Below it a tally counts every flip and shows the latest twenty in order.

Rolling dice? Pick how many (one to six) and how many faces (4, 6, 8, 10, 12, 20 or 100), then press Roll or D. A d6 is drawn with pips and every other die with numerals. Each die appears next to the total, and the tally records how many rolls you’ve made, the average per die and the ten latest totals.

Why sport needs a toss

Almost every match starts with a toss. Football: end or kick-off. Tennis: serve, receive or side, with the other player taking what remains. Cricket: the winning captain picks batting or bowling, a call that can colour a five-day game. American football adds the option to defer the decision until the second half.

Away from officials, a toss decides the everyday arguments, like who serves at the park court, who wears bibs or who’s in goal. With more than two options, switch to a die: assign numbers and roll.

What fair actually requires

Fairness means two things: each side wins half the time, and no flip carries information about the next. A computer can only manage that with genuine unpredictability. Everyday random functions follow a formula. That suits a game animation, but a clever observer could in principle forecast it. This page instead calls the browser’s cryptographic generator, which draws on physical noise inside your device.

Dice bring another pitfall. Map a random number from 0 to 255 onto a face with a remainder after dividing by 6 and the low faces win slightly more often, as 256 doesn’t divide by 6. The roller avoids that by discarding the few values causing the skew and drawing again. The bias would be tiny, but a die shouldn’t have one at all.

You can check it. Over a hundred flips, heads usually lands 40 to 60 times, and a result outside 35 to 65 appears roughly once in 550 sessions. Over six hundred d6 rolls expect about 100 of each face, plus or minus 20.

About the animation

The spin is only for show. The outcome is chosen first, then the animation is rotated to land on it, using six or seven half-turns. On devices set to reduce motion the coin skips the spin and just changes face.

It’s there to settle who starts, serves or picks. The only thing kept is the tally, on your own device, and Reset tally wipes it.

Questions people ask

Can an online coin flip be truly 50/50?
Pretty much. Each flip pulls one random bit from the secure generator inside your browser, the same thing that makes encryption keys. Nothing here can be learned or predicted, and a flip never remembers the one before.
What about a physical coin?
Slightly biased. A flipped coin tends to land on the face it started on, a little over half the time. Diaconis and colleagues' 2007 physics model predicted around 51%, and a recorded experiment of 350,757 flips measured 50.8%. If the caller can't see the starting face, you can call it fair enough for real use.
What does the toss winner get in football?
Law 8 gives the winner one choice, which end to attack in the first half or taking the kick-off. The opposition takes the other. Until 2019 only the end could be chosen. Penalty shoot-outs involve two tosses: one decides the goal, the other who kicks first.
Is five heads in a row a sign of a rigged coin?
Relax. A given run of five is a 1 in 32 event, and in 20 flips you'll see five or more identical results in a row nearly half the time. Streaks are normal in random data. Check the tally under the coin: totals only move towards even after hundreds of flips.
What does a die roll average out to?
Faces plus one, divided by two. That's 3.5 on a d6 and 10.5 on a d20. Roll two d6 and 7 is the most common total, made 6 ways out of 36, whereas 2 and 12 each come up 1 time in 36. Your running per-die average appears in the tool, so you can see it home in.
How can I choose one person from a group at random?
Give each person a number and roll a die that has enough faces, rerolling anything too high. A d6 handles up to six people and a d20 up to twenty. Only two candidates? Flip the coin. Splitting everybody into teams is a job for the team randomizer.

Where the numbers come from

  1. IFAB, Laws of the Game 2025/26, Law 8 (the start and restart of play: the coin toss) and Law 10 (penalties)
  2. Diaconis P, Holmes S, Montgomery R. Dynamical bias in the coin toss. SIAM Review 49(2), 2007, pp. 211–235
  3. Bartoš F, Sarafoglou A, Godmann HR, et al. Fair coins tend to land on the same side they started: evidence from 350,757 flips. arXiv:2310.04153, 2023
  4. MDN Web Docs, Crypto.getRandomValues()

Other tools

Match-day tools