Coin Flip

Share:

Flip a virtual coin with unbiased cryptographic randomness — single flip or batch of up to 1,000.

RT-FUN-040 · Fun & Misc

Coin Flip Tool

?
Press flip
Advertisement
After results · AD-W1 Responsive · Post-tool — peak engagement

How to use the coin flip

Single flip

Click "Flip the coin" — the coin spins and lands on heads (H, gold) or tails (T, slate). Each flip is added to the running total below.

Batch mode

Type a number between 2 and 1,000 in the batch box, then click "Flip batch". You'll get a horizontal bar showing the H/T split and exact percentages — handy for visualising probability convergence.

Read the recent strip

Below the totals, the last 30 single flips are shown as coloured pips, newest on the left. Useful for spotting "runs" of heads or tails — they happen more often than people expect.

Clear and start over

Hit "Clear stats" to reset all totals and the recent-flips strip. The session totals reset, the coin state resets, and you can start a fresh experiment.

Advertisement
After how-to · AD-W2 Responsive

Heads or tails — the world's oldest tie-breaker

Coin flipping is the simplest of all randomisers — one physical action, two equally likely outcomes, no calibration needed. Romans called it navia aut caput ("ship or head") after the ship and Caesar's head on imperial coinage. Twenty-one centuries later it still resolves coin tosses at the start of every English Premier League match, the FA Cup draw, the start of every NFL game, every cricket Test, and informal disputes at every Singapore hawker centre when two friends both reach for the last karipap. The mathematics is trivial, but the human use of "the coin" as final, fair arbiter is remarkable.

Why this tool uses crypto.getRandomValues, not Math.random

JavaScript's Math.random() is not cryptographically secure. Modern engines (V8, JavaScriptCore, SpiderMonkey) seed it from a clock-based source and use an algorithm like xorshift128+ — fine for casual use, but the output is predictable if you can observe a few prior values. For a coin-flipping tool that emphasises fairness, that's the wrong default. This tool uses window.crypto.getRandomValues(), which on every modern browser is backed by the operating system's secure entropy source (Linux /dev/urandom, macOS SecRandomCopyBytes, Windows RtlGenRandom) — the same source TLS uses to generate session keys. We then apply rejection sampling to avoid the modulo bias that would otherwise tilt the H/T split by a few parts per ten thousand.

Why a "fair" coin runs hot

A fresh visitor to this tool will often hit five heads in a row, watch the next flip with anticipation, and call the result "not fair" when it lands on heads again. This is the gambler's fallacy in miniature — humans expect randomness to look more distributed than it actually is. In 100 flips of a genuinely fair coin, runs of 5+ same-side flips happen on average 3.2 times. Runs of 7 happen about once every 200 flips. Use the batch mode to see this — flip 1,000 coins and you'll usually see at least one run of 8 or 9 buried in the sequence. The tool is fair; your intuition isn't.

ASEAN coin-flip culture

Cricket-style "heads or tails" is universal across Southeast Asia but the local variant has its own quirks. Singaporean and Malaysian children call it "head or tail" (singular), and the loser of a flip often gets to "request" a best-of-three. Indonesian schoolchildren play suit (gem-bunting-batu — rock-paper-scissors with a finger gesture) far more often than coin flips, since coins are now a less common everyday object. Thai monks famously use a four-stick siam si oracle for important decisions rather than coins. Filipino kids use the local 1-peso coin, which has a portrait of José Rizal on the "heads" side and an emblem of the Philippines on tails — calling "Rizal" instead of "heads" is normal.

When coin flipping is the right tool

For trivial decisions ("who orders first"), an unbiased pick between two options. For weightier decisions, behavioural economist Steven Levitt famously ran an experiment where 20,000 people on the fence about a major life change (quitting a job, ending a relationship, moving city) flipped a coin and committed to the result. Six months later, the people who'd flipped heads (and acted) reported being substantially happier than those who'd flipped tails (and stayed). The point isn't that coins predict happiness — it's that being on the fence is itself a hidden preference, and a flip forces commitment. Use this tool for the trivial stuff. Use it for the big stuff too if you've been deliberating too long.

10 coin-flip facts you can use to win arguments

01

A real-world coin flip is slightly biased toward the side that started face-up — about 51% vs 49% per a 2007 Stanford study by Persi Diaconis. This browser-based version is genuinely 50/50.

02

Caesar's coin tosses gave us the modern phrase. In ancient Rome the call was "navia aut caput" — ship or head — for the imagery on the early imperial denarius.

03

In 100 truly fair flips, runs of 5 same-side flips happen 3.2 times on average. Most people guess less than 1. The intuition for randomness is poorly calibrated.

04

The 2003 Major League Baseball season's tiebreaker rules used a coin flip to decide home-field advantage. The Cubs lost the flip, lost the wildcard game, and skipped the playoffs.

05

NFL overtime games begin with a coin flip. From 2012-2022, the team that won the toss won the game 52.8% of the time — a small edge that rule changes have since closed.

06

The 1969 World Series of Poker championship was decided by a coin flip after the final hand was a tie. Johnny Moss won the toss and the title.

07

Singapore's 50-cent coin (1985-2013 series) had no "heads" side in the conventional sense — both faces showed local flora rather than the typical portrait/emblem split.

08

The Philippine 1-peso coin features José Rizal; calling "Rizal" instead of "heads" is conventional. The 5-peso coin replaced Andrés Bonifacio with Emilio Aguinaldo in 2017.

09

In 2009 a Romanian goalkeeper avoided a 5-game suspension by winning a coin flip against the referee. The referee tossed; the keeper called correctly.

10

The "two-headed coin" trick used by magicians and street hustlers is real — milled by altering one face. The presence of an opposite design is the only telltale.

Frequently asked questions

Yes. The tool uses window.crypto.getRandomValues(), which on every modern browser is backed by the operating system's secure entropy source. Rejection sampling avoids the small modulo bias that a naive random & 1 would introduce. Over enough flips the H/T split converges to 50.0%.
It isn't. Runs of 5+ same-side flips happen on average 3 times per 100 flips. Humans systematically underestimate the frequency of such runs, so a fair coin can feel "stuck" on heads or tails. Use the batch mode to flip 1,000 and watch the percentage converge to 50%.
Yes. After the page loads, every flip happens inside your browser with no network calls. The page itself is a single HTML/JS bundle.
The recent-30 strip and running totals persist for the lifetime of the page only. Refresh or close the tab and they reset. For permanent records, screenshot the stats panel.
1,000 per batch. Larger batches don't add statistical value (1,000 flips already converges to ±1.5% of the true 50% mean), and keep the UI responsive on any device.
For casual JS it's fine. For a "fairness" tool it's the wrong default — its sequence is predictable to someone who can observe prior outputs. crypto.getRandomValues() isn't. The difference is invisible at the user level but matters as a principle for a tool labelled "coin flip".
Behavioural economist Steven Levitt ran a 20,000-person study where coin flips resolved major life decisions. Six months later, the "heads / change your life" group reported greater happiness than the "tails / stay" group. Being on the fence is itself a hidden preference; a flip forces commitment.
Not quite. Persi Diaconis' 2007 Stanford study showed real coins are about 51% likely to land on the side that started face-up. This digital flip has no physical bias — it's as close to 50/50 as the OS entropy source allows.
Gold for heads (the side traditionally bearing the portrait or "head") and slate for tails. The distinction is purely cosmetic — both outcomes are equally likely.
No, official matches use a physical referee's coin. This tool is for personal use only — entertainment, statistics demos, breaking everyday ties.

Related News

You may be interested in these recent stories from our newsroom.

No related news yet for this tool. Our editorial team publishes new pieces every week.

Browse all news →
Advertisement
Pre-footer · AD-W3 728 × 90

75 more free tools

Calculators, converters, security tools — no signup.