Tossing a coin is the simplest random experiment: two outcomes, each with probability one half, and no memory of what happened before. Our coin flipper does the same thing with a cryptographically secure random number generator built into your browser, so it is fair, fast and does not tire after the thousandth throw.
Flip a single coin to settle a decision, or flip hundreds at once to see the law of large numbers in action. With ten flips it is common to get 7 heads and 3 tails; with 1,000 flips the share of heads almost always lands between 47% and 53%. The tool also reports the longest run of the same side, which is usually longer than people expect – a streak of 4 or 5 in 20 flips is normal.
You can also make the coin biased, for example 60% heads, to model unfair coins, penalty shoot-outs or any yes/no event with a known chance. Every result is shown as text and as a bar chart of heads and tails, and the button flips everything again.
How to use the Coin Flipper
- Number of coins to flip
- Chance of heads — Leave at 50% for a fair coin.
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
Each flip draws a uniform random number between 0 and 1 and calls it heads when it is below the chosen chance of heads. The tool then counts heads and tails, finds the longest run of identical results and computes the binomial probability of getting exactly that many heads.
Worked example
Ten fair flips came up H T H H T T T T H T: 4 heads and 6 tails, with a longest streak of 4 tails. The chance of exactly 4 heads in 10 flips is C(10, 4) ÷ 2¹⁰ = 210 ÷ 1,024 ≈ 20.51%, while exactly 5 heads has the highest chance, 252 ÷ 1,024 ≈ 24.61%.
What to expect from many flips
| Flips | Expected heads | Typical range (≈95%) | Chance of an exact 50/50 split |
|---|---|---|---|
| 10 | 5 | 2–8 | 24.61% |
| 100 | 50 | 40–60 | 7.96% |
| 1,000 | 500 | 469–531 | 2.52% |
| 10,000 | 5,000 | 4,902–5,098 | 0.80% |
Formula
P(heads) = P(tails) = 1/2 per flip · P(k heads in n flips) = C(n, k) ÷ 2ⁿ
Worked example
Inputs — Number of coins to flip: 10; Chance of heads: 50 %.
Results — Heads = 4; Tails = 6; Results (H = heads, T = tails) = H T H T T T T H H T; Outcome = More tails; Share of heads = 40 %; Longest streak = 4 in a row (tails).
Key terms
- Bernoulli trial
- A single experiment with two outcomes, such as one coin flip.
- Law of large numbers
- As the number of flips grows, the share of heads gets closer to the true probability.
- Streak (run)
- A sequence of identical results in a row.
Frequently asked questions
Is this coin flipper really random?
It uses crypto.getRandomValues(), the browser's cryptographically secure generator, so every flip is independent and equally likely to be heads or tails.
What is the chance of heads?
50% for a fair coin, on every flip, no matter what happened before.
What is the chance of 3 heads in a row?
(1/2)³ = 1/8 = 12.5%.
How many heads should I expect in 100 flips?
About 50, but exactly 50 happens only 7.96% of the time; anything from 40 to 60 is normal.
Are real coin tosses fair?
Very nearly. A 2023 experiment with 350,757 tosses found real coins land on the side they started on about 50.8% of the time, a tiny bias from the way they spin.
After five tails, is heads more likely?
No. Believing that is the gambler's fallacy; the coin has no memory and the next flip is still 50/50.
Can I use it to decide between two options?
Yes – flip one coin and let heads mean the first option.