Skip to content

Heads or tails odds

Heads and tails over a million flips of the coin, with the longest streak.

Guide and details

The numbers come from running the coin code, so anyone can repeat the run.

The counts below come from running the code of the tool a million times, not from a claim. They are in the HTML, and the run can be repeated. The p-value is the chance that a fair draw strays at least this far from the expected counts. Values above 0.05 are ordinary; a value near zero would point to bias.

Coin: 1,000,000 flips

In 1,000,000 flips with the code behind the coin flip, heads came up 499,553 times (49.96%) and tails 500,447 times (50.04%). The chi-square test gives p = 0.371, a gap of the size chance alone produces. The longest streak of one side was 18 flips in a row, which is about what a million fair flips give: the streak table on the coin flip page puts a run of 7 at 1 in 64, so a million flips hold runs far longer than any you will see by hand.

SideExpectedFlipsShare
Heads500,000499,55349.96%
Tails500,000500,44750.04%

How the test was run

The test calls the same functions the buttons on this site call. The only change is the source of numbers: each spin reads a stream built from a numbered seed (SHA-256 in counter mode, as in the receipts) instead of crypto.getRandomValues, so anyone can repeat the run and get the same counts. It was run on 2026-12-03 with code fingerprint c6116527fd83, and the site’s own tests fail if the code changes and the numbers are not run again. A run this size cannot prove that a draw is free of bias. It shows that none appears at one million spins.

Why use Choose Tools

  • One source of randomness

    Every draw calls crypto.getRandomValues and throws away the values that would cause modulo bias. A test fails if Math.random ever appears in the source.

  • The result comes first

    The wheel, the coin and the dice pick the outcome before they move. The animation only shows what was drawn.

  • A slice is a chance

    Each option on the wheel is one slice, and the size of a slice is the chance of that option.

  • Lists stay on your device

    They are kept in this browser. Shared links carry the list after the #, a part the browser leaves out of requests to servers. There is no account.

  • Quiet by default

    Sound is off until you turn it on, and with “reduce motion” set in your system the result appears with no animation.

Questions and answers

Does a passing test prove the draw is random?

No. A test of this size shows that no bias appears over a million draws. It cannot show that there is none. What stands behind the result is the method: numbers from crypto.getRandomValues in your browser, with any value that would favour an outcome thrown away and drawn again.

Why numbered seeds instead of the browser’s generator?

So the run can be repeated. Each draw reads a stream built from a numbered seed, and anyone who runs the script gets the same counts. The code path is the one the buttons use.

What does the p-value in the tables mean?

It is the chance that an even draw strays at least as far from the expected counts as this run did. A value above 0.05 is ordinary, and one near zero would point to bias. For the coin it compares heads against tails.