What this calculator finds
A "streak" (or run) is a block of consecutive flips that all land the same way — for example five heads in a row. This tool answers a precise question: given n flips of a coin that lands heads with probability p, what is the chance of seeing at least one run of r or more consecutive heads somewhere in those flips? By symmetry, the same numbers apply to a run of tails when the coin is fair; for a biased coin, set p to the probability of the outcome whose streak you care about.
Why it is not simply (1/2)ʳ
A common mistake is to compute (1/2)ʳ and stop. That is the probability of a specific block of r heads at one fixed starting position — for r = 5, that is 1/32 ≈ 3.125%. But in a sequence of n flips a run of length r can begin at many different positions, and those windows overlap, so you cannot just multiply or add them. The correct probability of getting such a run anywhere in n flips is larger. For 10 fair flips and r = 5 the true answer is 11/32 of a naive guess away from intuition: exactly 0.109375 (10.9375%), which is 112 of the 1024 possible sequences.
The exact method
This calculator uses a run-length recurrence (a small dynamic program), which gives the exact probability rather than an approximation. It tracks the length of the current trailing head-run after each flip. Each flip, a head extends the run and a tail resets it to zero; as soon as the run reaches r, that sequence is counted as a success. Summing the probability mass that reaches the "r" state gives P(streak). The chance that no such streak occurs is simply the complement, 1 − P(streak).
Expected longest streak
The calculator also reports the expected length of the longest head-run, computed as E[L] = Σr≥1 P(longest run ≥ r). For 10 fair flips the expected longest head-run is about 2.80; for 100 fair flips it rises to roughly 6. A useful rule of thumb for a fair coin is that the longest run of heads in n flips is close to log₂(n): log₂(100) ≈ 6.64, which is why long sequences almost always contain a surprisingly long streak.
Reference points for a fair coin (p = 0.5)
- 5+ heads in 10 flips: 0.109375 (about 1 in 9).
- 3+ heads in 10 flips: 0.5078125 (just over even odds).
- 5+ heads in 100 flips: about 0.8101 — a 5-streak is the norm, not the exception, over 100 flips.
- 7+ heads in 100 flips: about 0.3175.
- At least 1 head in 10 flips (r = 1): 1 − 0.5¹⁰ = 0.999023.