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.

Advertisement
320 × 100

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.

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()
Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING