One draw from the browser’s cryptographic generator per flip
Every flip on this page is a single integer drawn from crypto.getRandomValues, the browser’s
cryptographically secure random source, the same one used to generate keys and passwords, rather
than Math.random.
The draw is also unbiased in the way that trips up naive implementations. Taking a random 32-bit word and reducing it with a modulo is skewed whenever the range does not divide evenly into the word space, so the shared helper behind this page uses rejection sampling instead: a word landing in the uneven tail is discarded and another is drawn. For a two-outcome draw a modulo would in fact have been fine, but the unbiased helper is used anyway, which is what lets the same wording apply here, on the Dice Roller and on the Random Number Generator alike.
Zero maps to heads, one maps to tails. There is no weighting, no house edge and no memory.
The spin is theatre over a decision already made
The 3D coin animation runs for about nine tenths of a second and decides nothing. The result is drawn first, and the rotation is then computed to land on that face: the coin spins forward by between four and a half and five and a half turns, snapping to the half-turn parity belonging to the side already chosen.
So nothing about how you press the button matters. Holding it down, tapping it fast, or clicking during the spin (the button is disabled while the coin is in the air, so that one does nothing at all) changes no odds. An animated flipper invites exactly that suspicion, and the honest answer is that the animation is a reveal rather than a simulation of physics.
Flipping one at a time, then a thousand at once
- Click Flip coin and wait for the coin to settle on Heads or Tails.
- Keep flipping; a tally, a percentage split and a streak line appear under the coin from the first result onward.
- For a batch, type a figure into Number of coins and click Flip coins, or just press Enter.
- Use Reset tally to clear the running single-flip session.
The batch box opens on 100 and takes any whole number from 1 to 10,000. Ask for zero, ask for more than the cap, or leave the box empty, and this widget prints the actual reason in place of a result rather than the generic failure banner most tools here fall back on. A decimal is truncated to its whole part rather than refused, so 5.7 flips five coins.
A batch reports the heads and tails counts, each side’s percentage, the total, the longest run in the sequence and the longest run of each side separately. It also prints a strip of H and T letters, capped at the first 500 so a huge batch does not put ten thousand elements into the page.
Current streak and longest run answer different questions
Two streak numbers sit under the tally and they get mixed up constantly.
The Current streak figure is the run at the end of the sequence: how many identical results have landed in a row right now. It drops back to one the moment the other side comes up.
The Longest run figure is the biggest run of consecutive identical results anywhere in the sequence so far, and it never goes down. Alongside it are separate longest-heads and longest-tails figures, which are the pair to look at when a session feels lopsided.
They are on screen because streaks are the single most misread thing about randomness. After five heads it feels like tails is due. It is not: a coin has no memory, each draw is independent, and the sixth flip is exactly 50/50 again. Flip a thousand coins in the batch box and you will usually find a run far longer than intuition says is reasonable, which argues against chasing streaks better than any explanation does.
Percentages that will not always add up to 100
The two percentages are each rounded to one decimal place independently, and independent rounding does not have to sum to exactly 100. Most splits behave, since a one-in-three split shows 33.3 and 66.7, but others land on 99.9 or 100.1. That is an artefact of rounding twice, not a counting error: the underlying counts always add up to the total exactly.
The related thing to expect is that a large batch lands near 50 percent without landing on it. A thousand-coin batch that came out exactly even every time would be evidence of something wrong. Watching the drift shrink as you move from 10 coins to 100 to 1,000 is about the clearest demonstration of the law of large numbers you can get in four clicks, which is why this page is as useful in a classroom as it is for settling who buys lunch.
Two tallies, and only one of them the reset button touches
The single-flip session and the batch flipper keep separate results. Reset tally clears the running single-flip sequence only; whatever the batch panel last produced stays on screen until you run another batch, so a 1,000-coin batch never pollutes the counts under the coin.
Both live in the tab’s memory and nowhere else. There is no account, no history file, no server call and nothing written to disk, so reloading discards every flip you have made. If the tally itself is the point, write the numbers down before you refresh.
For more than two outcomes, the Wheel of Names spins over a list you type; the rest are on the generators hub.

