Coin Flip Simulator
Choose how many flips to run, simulate a fair coin, and review the running counts, observed shares, and recent rounds.
- Total flips
- 0
- Heads
- 0
- Tails
- 0
Round summary
- Flips in this round
- 0
- Heads this round
- 0
- Tails this round
- 0
History
- There is no history yet.
Running totals accumulate during this page session. Reset clears both totals and history.
Running heads and tails share
No flips yet; both observed shares are 0%.
Learn more
Random method and fairness
How a fair coin is simulated
Each flip reads one uniformly random bit: 0 maps to heads and 1 maps to tails. In the model, both outcomes therefore have a 50% probability on each flip.
Random bytes come from the browser's Web Crypto API. If that source is unavailable, the tool stops instead of falling back to Math.random().
Why a short run is not always 50/50
A 50% probability describes each individual flip; it does not require every small batch to split exactly in half. Runs of several heads or tails can occur. The page reports what was observed, not a prediction of the next flip.
How to simulate a batch
Set the number of flips to 2–100,000 and run it once. The tool creates the batch together and presents a round summary, running share, and history instead of animating every flip.
Limits and boundaries
This tool models an ideal fair coin; it does not account for the shape of a physical coin, landing conditions, the surface, or differences in how someone tosses it.
A single simulation can contain up to 100,000 flips to avoid blocking the page for too long. History keeps at most the 100 most recent rounds.
Results are intended for general entertainment, teaching, and quick low-stakes choices. Do not use them for gambling, regulated drawings, cryptographic keys, or formal audits.
Tool information and sources
All computation happens in this browser. The tool does not upload input or use third-party runtime APIs, CDNs, web fonts, or local storage. The method follows the Web Cryptography API and the definition of a binomial distribution.
Frequently asked questions
Is each flip 50% heads and 50% tails?
In this tool's ideal fair-coin model, yes. Each flip reads a uniform random bit and maps it independently to heads or tails.
Does ten heads in a row mean the randomness is broken?
Not necessarily. A low-probability sequence can still happen; the quality of randomness cannot be judged from one short run alone.
Does the animation change the final result?
No. The result is generated from the same random state before the animation only delays its display. Turning the animation off does not change the random method.