Tool

Coin toss and dice

Heads or tails for the kick-off, a die for who serves first. The results come from your browser’s cryptographic generator, not from a pattern.

Coin

Tap the coin or press 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 are off while you type in a field.

Saved on this device. Nothing is sent to a server.

How to use it

Tap the coin, press the button or hit Space. The coin turns over and lands on heads or tails. The tally keeps count and shows the last twenty results in order.

For dice, choose how many (one to six) and how many faces (4, 6, 8, 10, 12, 20 or 100), then press Roll or the D key. Six-sided dice are drawn with pips, the others with numbers. The total is shown with the individual dice, and the tally keeps the number of rolls, the average per die and the last ten totals.

Where sport uses a toss

Almost every match starts with one. In football the winner chooses an end or the kick-off. In tennis the winner chooses to serve, to receive or an end, and the opponent takes the remaining choice. In cricket the winning captain decides whether to bat or to bowl first, a decision that can shape a five-day match. In American football the winner can also defer the choice to the second half.

Away from the referee’s pocket, a toss settles the small things: who serves first on the park court, which team wears bibs, who goes in goal. A die does the same job for more than two options: number the players and roll for who starts.

What “fair” means here

A fair coin toss has two properties: each side comes up half the time, and no flip tells you anything about the next. A computer needs a source of unpredictability to do that. Simple random functions produce numbers from a formula, which is fine for a game animation but could in principle be predicted. This page uses the cryptographic generator of the browser, which is seeded from physical noise in the device.

For dice there is a second trap. A random number from 0 to 255 turned into a die face by taking the remainder after division by 6 slightly favours the low faces, because 256 is not a multiple of 6. The roller avoids this by discarding the few values that would cause the imbalance and drawing again. The effect is tiny, but a die should not have one at all.

You can check the result yourself. Flip a hundred times and the count of heads will usually fall between 40 and 60; values outside 35 to 65 happen about once in 550 sessions. Roll the d6 six hundred times and each face should appear about 100 times, give or take 20.

A note on the animation

The coin always shows the face that was drawn: the result is decided first and the animation is turned to match, six or seven half-turns as needed. If your device is set to reduce motion, the coin changes face without spinning.

The tool is meant for deciding fairly who starts, who serves and who picks. It keeps no record beyond the tally on your own device, and Reset tally clears that.

Frequently asked questions

Is an online coin toss really 50/50?
This one is, as closely as a computer can make it. Each flip takes one random bit from the cryptographic generator of your browser, the same source that is used to create encryption keys. There is no pattern to learn and the previous flips have no influence on the next one.
Is a real coin toss exactly 50/50?
Not quite. A flipped coin spends slightly more time in the air with its starting side up, so it lands the way it started a little more than half the time. A physical model published in 2007 predicted about 51%, and an experiment that recorded 350,757 flips found 50.8%. If the caller cannot see which side starts face up, the toss is fair for practical purposes.
Who gets to choose after the coin toss in football?
Under Law 8 of the Laws of the Game the team that wins the toss decides either which goal to attack in the first half or to take the kick-off. The other team gets what is left. Before 2019 the winner could only choose an end. For a penalty shoot-out there are two tosses: one for the goal, one for which team kicks first.
I got five heads in a row. Is something wrong?
No. Any particular run of five has a probability of 1 in 32, and in a session of 20 flips a run of at least five identical results turns up almost half the time. Streaks are what randomness looks like. The tally under the coin shows the totals, which drift towards an even split only over hundreds of flips.
What is the average roll of a die?
Half the number of faces plus one half: 3.5 for a six-sided die, 10.5 for a d20. With two six-sided dice the most likely total is 7, which comes up in 6 of the 36 combinations, and 2 and 12 are the rarest at 1 in 36 each. The tool shows the average per die of your rolls so you can watch it settle.
How do I pick one person at random from a group?
Number the people and roll a die with at least that many faces, rolling again if the number is too high. For up to six people use the d6, for up to twenty the d20. To choose between two, flip the coin. To split a whole group into sides, the team randomizer does it in one press.

Sources

  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

Tools