Coin Flip
Flip a virtual coin and get heads or tails — with a satisfying 3D spin animation.
How to Use
- Click the coin or the Flip button to flip.
- Watch the 3D spin animation and see the result.
- Flip history and running totals are shown below.
- Click Reset to clear the history and start fresh.
When to Use This
- Settling a trivial household question, such as who takes the bins out or which film goes on, when there is no actual coin within reach.
- Teaching probability, where the heads and tails counters let a class watch a fair process throw up long streaks and still drift toward even.
- Picking who starts a board game or a kickabout when nobody has loose change but somebody already has a phone in hand.
- Generating a short sequence of binary choices for a writing or drawing exercise, since the last thirty outcomes stay on screen as a readable strip.
Frequently Asked Questions
About This Tool
A tossed coin is a mechanical system rather than a source of randomness: given the launch speed, the spin rate and the height, the outcome is already determined. Persi Diaconis and colleagues worked out the bias this leaves behind, and a 2023 experiment covering 350,757 real flips found that coins land on the face they started on about 50.8 percent of the time. A simulated flip has the opposite character, perfectly even in the long run but entirely deterministic underneath.
Each flip here calls Math.random() and reads heads when the value falls below 0.5. The outcome is fixed before the coin moves: the spin is a CSS rotateY transition of four to six full turns over about three quarters of a second, and the text updates when it finishes. Running totals and the last thirty results sit in page memory, newest first, until Reset Stats clears them.
Notes & Limits
- Math.random() is a pseudo-random generator seeded by the browser, statistically even over many flips but not unpredictable, so nothing of consequence should rest on one here.
- The history lives in page memory only, so reloading, navigating away or closing the tab wipes the counters, and the sequence cannot be exported.
- One coin per flip, with no multi-coin mode and no bias setting, so modeling ten tosses means ten separate clicks rather than a single batch.
- An animation of roughly 750 milliseconds gates every flip, which rules out large samples; a spreadsheet formula will produce thousands of trials far faster.