Coin Flip Streak Calculator
Calculate the exact probability of getting at least one run of k consecutive heads in n coin tosses, for a fair or biased coin — plus the expected number of streak opportunities and average wait time.
Chance of seeing k consecutive heads at least once in n flips
How does this calculator work?
The exact probability of at least one run of k consecutive heads in n coin flips (P(head) = p) is computed by Markov-chain DP: track the current consecutive-head count, absorb probability whenever it hits k. For a fair coin and k = 5, you need ~23 flips for a 50% chance and ~62 flips on average before the first streak.
Formula
How this is calculated
The probability of at least one streak of k consecutive heads is not simply p^k — that is only the probability of the first k flips all being heads. Once you have n flips, there are n−k+1 overlapping windows of k consecutive flips, and streaks can start at any of them, making an exact closed-form solution complex.
This calculator uses an exact Markov-chain dynamic programming approach. The state is the length of the current run of consecutive heads (0 to k−1). On each flip: a tails resets the run to 0 (probability 1−p), while a heads advances the run by 1 (probability p). If the run reaches k, the flip is absorbed into a "streak achieved" state and contributes to the total probability. After n steps, the total absorbed probability is exactly P(at least one streak of k).
The expected number of streak-starting positions, (n−k+1)×p^k, is an approximation that counts each window independently — it overestimates slightly because streaks can overlap. The expected flips until the first streak of k uses the known formula E[W_k] = (1−p^k) / ((1−p)×p^k), which for a fair coin and k=5 gives 62 flips on average before seeing five consecutive heads.
Frequently asked questions
p^k is only the probability that the very first k flips are all heads. With n flips there are n−k+1 overlapping windows where a streak could start, so the overall probability of at least one streak is much higher than a single window.
For a fair coin (p = 0.5) and k = 5, the probability crosses 50% at around n = 23 flips. You can verify this in the calculator by sliding n from 20 to 30.
Yes — for a symmetric fair coin the probability is identical. For a biased coin, set P(head) to 1 − P(tail) and the result gives the streak probability for heads. For a tails streak on a biased coin, set P(head) to 1 − P(tail of interest).
Also known as
TG we-Calculate Editorial Team. (2026). Coin Flip Streak Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/coin-flip-streak-calculator
TG we-Calculate Editorial Team. "Coin Flip Streak Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/coin-flip-streak-calculator.
TG we-Calculate Editorial Team, "Coin Flip Streak Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/coin-flip-streak-calculator
@misc{wecalculate_coin_flip_streak_calculator, title = {Coin Flip Streak Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/coin-flip-streak-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
