Flip a Coin
Enter how many times to flip and the calculator tosses a virtual coin that many times with your browser's random number generator. One flip gives heads or tails. More flips give the heads and tails counts with percentages, plus the full sequence for up to 100 flips.
Last updated by Ultra Calculator
Coin Flip
How to calculate it
result = heads if r < 0.5, otherwise tails
- result
- the side the coin lands on
- r
- a random fraction from 0 up to, but not including, 1, supplied by your browser
Each flip draws a new r. Heads share = heads ÷ flips × 100.
Worked example
One toss
A single flip shows Heads or Tails, a quick way to settle a choice between two options.
| Number of flips | 1 |
|---|
| Result | Heads |
|---|
How to use this calculator
- Enter the Number of flips: 1 for a single toss, or any whole number up to 1,000,000.
- Read the Result: Heads or Tails for one flip, or the heads and tails totals for more. Press Flip again for a new toss.
- For more than one flip, check the Heads and Tails lines for each side's percentage.
- For 2 to 100 flips, the Sequence shows every toss in order, with H for heads and T for tails.
Frequently asked questions
Is a coin flip 50/50?
Here it is by design: each flip is heads when the browser's random fraction is below 0.5 and tails otherwise, so both sides get the same share of the generator's range. The calculator models an ideal coin with no lean towards either side.
What are the odds of getting heads three times in a row?
For a fair coin it is 1 in 8, or 12.5%, because each flip halves the chance: 1/2 × 1/2 × 1/2. Five in a row is 1 in 32 and ten in a row is 1 in 1,024.
After five tails in a row, is heads more likely next?
No. Each flip is independent, so the next one is still an even chance. Expecting a result to be 'due' after a streak is known as the gambler's fallacy.
Why don't I get exactly half heads?
Random results wobble around 50%. With 10 flips, an exact 5 to 5 split happens only about 25% of the time. The more flips you make, the closer the heads percentage tends to get to 50%, even though the gap in raw numbers can grow.
How do I use a coin flip to make a decision?
Agree which option is heads and which is tails before you flip, and whether one flip decides it or the best of three. Then enter 1 or 3 and go with the result.
Learn more
Independent flips
A coin has no memory. The chance of heads is the same on every flip, whatever came before, which is why a run of tails says nothing about the next toss.
Streaks are normal
Long runs turn up more often than most people expect. In 100 fair flips, a run of at least five heads or five tails in a row appears about 97% of the time, and a run of six or more about 81% of the time.
Large numbers even out
Over many flips the heads percentage settles close to 50%. With 10 flips, 7 or more heads happens about 17% of the time; with 1,000 flips, landing outside 47% to 53% happens only about 1 time in 20.
- Deciding who kicks off or bats first in a casual match
- Settling a choice between two options
- Picking a starting player or side in a board game
- Classroom probability lessons: flip 10, 100 and 1,000 times and compare the heads percentage
Expecting the results to even out straight after a streak
Each flip is still 50/50. Results only tend towards half heads over a large number of flips, not by correcting the next few.
Calling a coin biased after a few flips
Lopsided small samples are common: 7 or more heads in 10 flips happens about 17% of the time. Flip a few hundred times before reading anything into the split.
Agreeing what heads means after the flip
Decide which option goes with heads before you flip, or the toss won't settle anything.
Methodology and sources
Each flip draws a fraction from your browser's Math.random function, which MDN describes as pseudo-random and approximately uniform from 0 up to 1. A value below 0.5 counts as heads and 0.5 or above as tails, so the calculator models a coin with no lean towards either side. Flips are independent and the counts are exact; percentages are rounded to one decimal place. The sequence is shown for 100 flips or fewer to keep the page readable. Math.random is not cryptographically secure, so don't use it where money or security depends on the outcome.