Coin Flip Streak Probability Explained
Published
The probability of k consecutive heads on the next k fair flips is 1/2^k. However, the probability of at least one such streak appearing anywhere in a longer series is a different calculation.
Fixed consecutive flips
For the specific next five flips to all be heads, multiply one half five times. Only HHHHH satisfies the condition, out of 32 equally likely ordered sequences.
| Next flips all heads | Exact probability | Percentage |
|---|---|---|
| 2 | 1/4 | 25% |
| 3 | 1/8 | 12.5% |
| 5 | 1/32 | 3.125% |
| 10 | 1/1,024 | 0.09765625% |
| 20 | 1/1,048,576 | about 0.0000953674% |
The same values apply to a specified all-tails sequence.
If the question instead allows either all heads or all tails, there are two qualifying sequences for a positive number of flips. That is not the same as asking for a specified side.
A streak anywhere within a series
Suppose you want at least two consecutive heads within three flips. The qualifying sequences are HHH, HHT and THH. There are eight possible three-flip sequences, giving probability 3/8 = 37.5%.
If you only asked whether the first two flips are heads, the answer would be 1/4 = 25%.
The additional opportunity at positions two and three increases the probability of a run. But you cannot simply add 25% for each possible starting position. HHH satisfies both conditions, so adding them would count it twice.
Examples of overlapping opportunities
The following table counts all sequences that contain at least one run of two heads. Each sequence is counted once, regardless of how many qualifying windows it contains.
| Total flips | Favorable sequences | Probability |
|---|---|---|
| 2 | 1 of 4 | 25% |
| 3 | 3 of 8 | 37.5% |
| 4 | 8 of 16 | 50% |
| 5 | 19 of 32 | 59.375% |
| 6 | 43 of 64 | 67.1875% |
These small examples agree with the fair-coin run counts tabulated by Wolfram MathWorld. They show why an experiment involving many flips may contain noticeable streaks even when the coin is fair.
How to calculate a streak exactly
A useful approach is to count sequences that avoid the target streak, then subtract from the total. This avoids double-counting overlapping runs.
Let A(m) be the number of m-flip sequences with no run of k consecutive heads.
- When m is smaller than k, every sequence qualifies: A(m) = 2^m.
- When m equals k, exclude the single all-heads sequence: A(k) = 2^k − 1.
- For m greater than k, A(m) = 2 × A(m−1) − A(m−k−1).
The last expression first extends every valid shorter sequence with either outcome, then removes the extensions creating a forbidden run at the end. Divide the count of avoided sequences by 2^n and subtract from one.
For two consecutive heads in four flips, A(0)=1, A(1)=2, A(2)=3, A(3)=5 and A(4)=8. Eight of the 16 sequences avoid the run. Therefore the chance of at least one run is 1 − 8/16 = 50%.
Coinflip.xyz uses exact integer arithmetic to carry out this calculation for up to 1,000 flips. Choose the streak-anywhere mode in the probability calculator.
A streak of heads versus a streak of correct predictions
In the prediction game, a correct prediction is not the same as a head. You can predict either side on each round.
If each prediction is made before the independent fair outcome, the conditional chance of being correct is one half on each round. Consequently a specified series of five correct predictions has the same theoretical probability as five consecutive heads: 1/32.
A personal best accumulated over many attempts is a different event. More attempts offer more opportunities for a streak.
Does a streak change the next flip?
Under the independent fair-coin model, previous heads or tails do not affect the next outcome. Even after ten heads in a row, the next flip has a 50% chance of heads.
The probability of observing ten heads before an experiment begins is small. Once the ten heads have occurred, they are part of the observed history, not ten future uncertain events. The next flip is still a separate trial.
Read the coin flip probability guide for the related distinction between a specific ordering and the total number of heads.
Frequently asked questions
What are the odds of five heads in a row on the next five flips?
1/32, or 3.125%, assuming independent fair flips.
What are the odds of ten heads in a row on the next ten flips?
1/1,024, or 0.09765625%.
Is a run anywhere more likely than a fixed sequence?
For a longer series there are additional opportunities for a run. Overlapping opportunities must be counted carefully.
After five heads, is tails more likely?
No. In an independent fair model the next flip is still 50% heads and 50% tails.
Sources and further reading
Try it yourself
Use the free Coinflip.xyz tools.