01What is Coin Flip?
Coin Flip tosses between 1 and 100 virtual coins in one go and tells you how the batch landed. It sounds trivial, and mostly it is. The interesting part is where the randomness comes from. Each coin uses one call to crypto.getRandomValues, the browser's cryptographically secure random source defined in the W3C Web Cryptography API. The tool asks for a single random byte and looks only at its lowest bit. If that bit is 1 the coin is heads, if it's 0 it's tails. A byte has 256 values and exactly 128 of them are odd, so each side has a clean one-in-two chance. Every coin gets its own fresh byte. There is no seed you could replay and no Math.random() state to predict. Using it is quick. Pick a count from the preset buttons (1, 2, 5, 10, 20, 50 or 100) or type a number into the field. Typed values are clamped, so 250 becomes 100 and 0 or blank becomes 1. Then press the Flip button, which reads something like Flip 10 Coins. After a short 300 ms pause for effect, you get a row of H and T coins, the heads and tails counts, and a bar with both percentages to one decimal place. Here's a worked example. Flip 10 coins and say six come up heads. The Copy Summary button puts exactly this on your clipboard: Heads: 6 (60.0%), Tails: 4 (40.0%). That one line is handy for pasting into a chat when the team let a coin settle an argument. A few honest limits. Each flip replaces the previous batch. There is no running tally across flips and no history, so for a longer experiment you'll want to write the counts down yourself. The cap is 100 coins per batch. The coin draws happen in your own browser tab with no network call, and the results disappear when you leave the page. Reset puts the count back to one coin and clears the row. One more thing worth knowing. Fair coins look less fair than people expect. With 10 coins, a 7 to 3 split is ordinary. With 100 coins the heads count has a standard deviation of 5, so landing anywhere from 40 to 60 is normal. Streaks of four or five in a row also turn up all the time in long runs. None of that points to a broken generator. It's just what real randomness looks like up close.
Developers and teachers who want a fair, unpredictable heads-or-tails call, or a small batch of them, without writing any code. The tool runs entirely in your browser, so your data never leaves your device.
02How to use Coin Flip
- Under Number of Coins, click a preset (1 to 100) or type a number in the field.
- Click the Flip button, which shows the count, such as Flip 10 Coins.
- Read the H and T row, the Heads and Tails counts and the percentage bar.
- Click Copy Summary to copy the one-line result.
- Click Reset to go back to a single coin and clear the results.
03Worked examples
- Input:
10 coins, result with 6 heads - Result:
Heads: 6 (60.0%), Tails: 4 (40.0%) - This is the exact Copy Summary format from the component. Which coins land heads changes on every flip.
- Input:
1 coin, result heads - Result:
Heads: 1 (100.0%), Tails: 0 (0.0%) - Percentages always show one decimal place, even for a single coin.
- Input:
Random byte 0x01 or 0xFF - Result:
heads - The low bit is 1. The tool checks (byte & 1) === 1 on a byte from crypto.getRandomValues.
- Input:
Random byte 0x00 or 0x80 - Result:
tails - The low bit is 0, so the coin is tails.
- Input:
Typed count 250 - Result:
100 - The number field clamps input to the 1 to 100 range before flipping.
04Common use cases
- Settling which of two equally good library choices the team tries first in a spike
- Deciding who presents first in a demo day when nobody volunteers
- Showing a class that 10-coin batches swing wildly while 100-coin batches hover near 50/50
- Producing a short random heads/tails sequence to use as a test fixture for a game rule
- Breaking a tie in a code review poll or a sprint planning vote
- Running a quick sanity check on your intuition about streaks by flipping 100 and counting runs
05Tips
- To pick among more than two options, a dice roller with the right number of sides is cleaner. Combining coins only splits evenly when the option count is a power of two.
- The tool keeps no running total. For a 1,000-flip experiment, do ten batches of 100 and add the counts yourself.
- A 45/55 split on 100 coins is well inside normal variation, so don't read bias into it.
- Typing 0 or clearing the field sets the count to 1, and anything above 100 is capped at 100.
06Related concepts
Cryptographic randomness, Bernoulli trial, Law of large numbers, crypto.getRandomValues.
Frequently Asked Questions
What is Coin Flip?
Coin Flip is a free, browser-based developer tool on AIDToolStack. Flip a virtual coin with customizable sides and history tracking. It requires no installation or sign-up and works entirely in your browser.
Is Coin Flip free to use?
Yes. No sign-up, no fees and no usage cap.
Does Coin Flip store my data?
No. It runs in your browser; nothing is uploaded.