What is the Coin Toss Streak Calculator?
This tool tells you how likely you are to see a streak (run) of k identical coin flips somewhere within n total tosses. It works for a fair coin (\(p = 0.5\)) or any biased coin where one side appears with probability \(p\). It also reports the basic chance that a specific block of k flips all land the same way, and the expected number of such runs.
How to use it
Enter the number of flips (n), the streak length you care about (k), and the probability p of the side you're tracking. The calculator returns the chance of seeing at least one streak of length k or more, the simple \(p^k\) probability, and an estimate of how many runs to expect.
The formula explained
The probability that k flips in a row are all the chosen side is simply \(p^{k}\). The harder question — the chance of at least one run of length k anywhere in n flips — is solved exactly with a dynamic program that tracks the current number of consecutive matching flips and an absorbing "achieved" state. Each flip either extends the run (probability \(p\)) or resets it (probability \(1-p\)).
$$P(\text{run} \ge k) = 1 - Q(n) \\[1.2em] \text{where}\quad \left\{ \begin{aligned} k &= \text{Streak length} \\ p &= \text{Probability} \\ q &= 1 - p \end{aligned} \right.$$
Worked example
For a fair coin (\(p = 0.5\)), \(k = 3\), \(n = 5\): $$p^k = 0.5^3 = 0.125 \ (12.5\%)$$ The exact probability of at least one run of 3 heads in 5 flips works out to \(0.25\) (25%).
FAQ
What if k is bigger than n? A streak of k can't fit, so the probability is 0.
Does this count overlapping runs? The streak probability is "at least one run of length k or more"; the expected-runs figure is an approximate count of distinct runs.
Can I use a biased coin? Yes — set \(p\) to any value between 0 and 1 for the side you're tracking.