Flip a Coin
Choose how many coins to flip, from 1 to 1,000, and press Flip: every coin lands heads or tails with an exact 1 in 2 chance, and the page tallies the heads and tails (counts and percentages), the longest streak and how likely a streak that long is. The printed example below is not a real flip: its 20 fixed flips gave 11 heads, 9 tails (55.0% and 45.0%) with a longest streak of 4 tails in a row. In 20 fair flips, a streak of 4 or longer (of either side) happens 76.84% of the time. Each coin is one bit from your browser’s cryptographic random number generator, so heads and tails are exactly as likely, and nothing is sent anywhere.
Updated Runs in your browser: nothing you enter is uploadedHow this tool works
Your flips
Example result with 20 fixed flips, not a random one. Press Flip for a real one.
11 heads, 9 tails
- Heads
- 11 55.0%
- Tails
- 9 45.0%
- Longest streak
- 4 tails in a row
In 20 fair flips, a streak of 4 or longer (of either side) happens 76.84% of the time.
Show the flips as text
HTTHHTHTTTTHHTHHHTHH
H is heads and T is tails, in the order flipped.
How likely is a streak?
| Streak of at least | 10 flips | 20 flips | 50 flips | 100 flips | 500 flips | 1,000 flips |
|---|---|---|---|---|---|---|
| 3 in a row | 82.62% | 97.91% | more than 99.99% | more than 99.99% | more than 99.99% | more than 99.99% |
| 4 in a row | 46.48% | 76.84% | 98.12% | 99.97% | more than 99.99% | more than 99.99% |
| 5 in a row | 21.68% | 45.84% | 82.09% | 97.17% | more than 99.99% | more than 99.99% |
| 6 in a row | 9.38% | 23.69% | 54.41% | 80.68% | 99.98% | more than 99.99% |
| 8 in a row | 1.56% | 5.44% | 16.20% | 31.48% | 86.31% | 98.17% |
| 10 in a row | about 1 in 512 | 1.17% | 4.05% | 8.67% | 38.43% | 62.39% |
| 15 in a row | impossible | about 1 in 4,681 | about 1 in 886 | about 1 in 377 | 1.48% | 2.97% |
| 20 in a row | impossible | about 1 in 524,288 | about 1 in 32,768 | about 1 in 12,788 | about 1 in 2,176 | about 1 in 1,068 |
| Average longest streak | 3.7 | 4.7 | 6.0 | 7.0 | 9.3 | 10.3 |
How many heads to expect
| Flips | Average heads | Standard deviation | Within 2 standard deviations | Chance of landing there |
|---|---|---|---|---|
| 10 | 5 | 1.58 | 2 to 8 heads | 97.85% |
| 100 | 50 | 5.00 | 40 to 60 heads | 96.48% |
| 1,000 | 500 | 15.81 | 469 to 531 heads | 95.37% |
Ten flips: the chance of each number of heads
| Heads | Ways | Chance |
|---|---|---|
| 0 | 1 of 1,024 | about 1 in 1,024 |
| 1 | 10 of 1,024 | about 1 in 102 |
| 2 | 45 of 1,024 | 4.39% |
| 3 | 120 of 1,024 | 11.72% |
| 4 | 210 of 1,024 | 20.51% |
| 5 | 252 of 1,024 | 24.61% |
| 6 | 210 of 1,024 | 20.51% |
| 7 | 120 of 1,024 | 11.72% |
| 8 | 45 of 1,024 | 4.39% |
| 9 | 10 of 1,024 | about 1 in 102 |
| 10 | 1 of 1,024 | about 1 in 1,024 |
How to flip a coin online
- Choose how many coins. Type a number from 1 to 1,000 or press one of the quick buttons (1, 10, 100 or 1,000). One coin is a plain heads-or-tails decision; more coins make a tally.
- Press Flip. The coins appear in the order they landed (H for heads, T for tails) and the result is announced to screen readers. The short flip animation only plays when your device allows motion.
- Read the tally. Heads and tails are counted with their percentages, and the longest streak of the same side is shown with the exact chance of seeing a streak that long or longer in that many fair flips.
- Flip again or copy the result. Flip as often as you like: every flip is independent of the one before. Copy result puts the tally and the H/T sequence on your clipboard.
Frequently asked questions
- Is the flip really 50/50?
- Yes. Each coin is a single bit from your browser’s cryptographic random number generator (crypto.getRandomValues), and a bit is 1 or 0 with equal probability, so heads and tails are exactly equally likely with no rounding or modulo bias. The tool never uses Math.random.
- Why do I get long streaks? Is something wrong?
- No: streaks are normal. In 20 fair flips a streak of 4 or more happens 76.84% of the time, and in 100 flips a streak of 6 or more happens 80.68% of the time. The longest streak in 1,000 flips averages about 10.3. Truly random sequences look streakier than people expect.
- If I get five heads in a row, is tails “due”?
- No. Every flip is independent, so the next coin is still 1 in 2 whatever came before. Believing otherwise is the gambler’s fallacy. A long streak does not get “paid back”; it just becomes a smaller share of a longer run of flips.
- How is the chance of the streak worked out?
- By counting, not by simulation. The tool follows every possible sequence of fair flips at once, tracking how long the current run is, and adds up the probability of the run first reaching the observed length at some flip. The result is the exact chance that n fair flips contain a streak of that length or longer, of either heads or tails.
- What does the streak chance tell me about my flips?
- It is the chance, before flipping, of a streak at least as long as the one you got. A high figure means a streak like yours is ordinary; a small one, such as about 1 in a thousand, means it is rare for a fair coin, although with enough flips rare things do turn up.
- Why is a result like 500 heads and 500 tails unlikely?
- Because there are many other counts nearby. In 1,000 flips exactly 500 heads has a chance of only about 2.5%, and the number of heads usually lands within about 31 of 500 (two standard deviations, which covers 95.37% of results). The percentages get closer to 50% as you flip more, even though the gap in counts tends to grow.
- Is a real coin toss exactly 50/50?
- Very nearly. Careful studies of coins tossed by hand found a slight tendency, about 51%, for a coin to land the way it started. This page does not toss a physical coin, so it has no such bias: it is a fair 1 in 2 chance on every coin.
- Why is the limit 1,000 coins?
- So every coin can be shown and the whole sequence stays readable and copyable. 1,000 coins is plenty to see the share of heads settle near 50% and to watch streaks appear. For a decision, a single coin is all you need.
- Are my flips saved or sent anywhere?
- No. The flips exist only on this page and disappear when you reload it. Nothing is uploaded; if you allow analytics, the site only learns that Flip was pressed, never how many coins or what they showed.
- Does it respect reduced motion?
- Yes. The short flipping animation only plays when your device allows motion. With “reduce motion” turned on, the result simply appears, and it is announced politely to screen readers either way.
How it works
Each coin is one bit. The page asks the browser for random 32-bit words with crypto.getRandomValues and reads the bits of each word one by one: a 1 is heads and a 0 is tails. Because the range of a bit is a power of two, no value has to be thrown away and no modulo is used, so heads and tails are exactly equally likely and the coins are independent. Up to 1,000 coins come from 32 words. The tally counts heads and tails, shows each as a share of all flips (rounded to one decimal) and finds the longest run of the same side; if several runs tie, the first is shown. The chance of a streak is exact, not simulated. For n fair flips and a streak length L, the tool keeps the probability that no streak of L has happened yet and that the current run is k long, for each k below L; every new flip extends the run with probability 1/2 or starts a new one with probability 1/2, and the probability mass that reaches length L is added up as it first does. This covers streaks of either side together. The average longest streak is the sum, over every length L, of the chance that the longest streak reaches L. The number of heads in n flips is binomial: exactly k heads has probability C(n, k) ÷ 2^n, with mean n ÷ 2 and standard deviation √n ÷ 2. Percentages and chances are rounded only for display.
Sources
More free tools
- Dice RollerRoll d4 to d100 or any custom die with dice notation like 3d6+2, 4d6kh3 or 2d20kl1, and see the exact odds of every total. Fair and rolled on your device.
- Random Number GeneratorPick a random number between any two numbers, draw several with or without repeats, flip a coin or roll dice. Fair, unbiased and drawn on your device.
- Random Name PickerPaste a list and pick a random winner, shuffle it or split it into teams. Every entry has the same chance, and your list never leaves your device.
- Random Team GeneratorPaste names, choose how many teams or people per team, and split them randomly and evenly. Reshuffle, copy the teams or share a link to the same split.
- Tally CounterOnline tally counter with big + and − buttons: several named counters, shortcuts, step and target, total, undo and CSV export. Saved in your browser.
- Matrix CalculatorAdd, subtract and multiply matrices up to 6×6, then find the determinant, inverse, rank, transpose and RREF in exact fractions, with the row steps shown.
More: Random picks and gamesAll math & numbersAll toolsHome & DIY calculators