Random Chance

Coin flip

Ready ? —
Heads 0 0 flips Tails 0
Seed
Fair · crypto randomness, rejection sampled

Nothing yet. Results appear here so you can prove what came up.

A coin flip gives heads or tails with equal probability. This one draws from the browser’s cryptographic random number generator rather than a simple pseudo-random function, so the two outcomes really are equally likely. Flip once, or flip several hundred at a time and watch the tally converge on fifty–fifty.

How to flip

1 Press Flip. The pause is animation; the result is decided at the end of it.
2 Set "How many" above one to flip a batch and see the tally move.
3 Enter a seed if you want a run somebody else can reproduce exactly.

A real coin is not quite fair. Persi Diaconis and colleagues showed in 2007 that a flipped coin lands the same way up as it started about 51% of the time, because it precesses rather than rotating cleanly. A digital flip has no such bias, which makes it the fairer of the two even though it feels less trustworthy.

What people use it for

  • Settling who goes first, or who takes the job nobody wants
  • Flipping when there is no coin in anybody’s pocket
  • Watching a tally drift towards even over a few hundred flips at once
  • Running a two-way draw someone else can reproduce from the seed
  • Showing that six heads in a row changes nothing about the seventh

Questions

Each flip comes from crypto.getRandomValues, the browser’s cryptographically secure generator, mapped to two outcomes with rejection sampling so neither side is favoured.

Diaconis, Holmes & Montgomery, dynamical bias in the coin toss (2007)MDN, Crypto.getRandomValues()
Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding