Skip to main content
CalcMax

Coin Flipper

Range: 1 – 200

Range: 0 – 4,294,967,295

Result

7

Heads

Tails
3
Share that came up heads
70.00%
Longest run of one side
3
Chance of exactly this split
11.72%
Flip sequence
H, T, H, H, H, T, H, H, T, H

A coin flipper runs a coin toss as many times as you ask it to: flip a coin two hundred times over and the panel counts the heads and the tails, finds the longest run of one side, and works out how likely a fair coin was to split that way at all. The flips come from a seeded random generator rather than a real coin, so the same seed always draws the same sequence — which is what makes a result reproducible, and what turns a claim like "nine heads in a row" into something that can be checked rather than remembered.

Formula

heads = how many H appear in the sequence · tails = flips − heads · longest run = the longest block of identical results · split chance = C(n, heads) / 2ⁿ

flips
How many times to flip a coin. The sequence holds one H or T per flip, and every other output is counted over exactly this many tosses
seed
Which sequence to draw from the generator. The same seed always produces the same heads and the same tails, so a run can be repeated exactly; it does not make either side more likely
H
Heads, one of the two equally likely sides. The sequence prints H and T rather than words, because the letters are the notation the rest of the page uses, and they stay the same in every language
T
Tails, the other side. A fair coin has no memory, so a run of one side is a coincidence of the sequence rather than the coin leaning anywhere
split chance
The probability that a fair coin lands exactly this many heads in this many flips — the chance of this particular split, which is a different question from the proportion that actually came up

Use it when you want to see a run of coin tosses without a coin, or when a sequence of heads and tails needs to be counted rather than eyeballed. The longest run is the part that cannot be read off the sequence by eye, and it is also the part that gets misjudged most often: a run of seven in two hundred flips is ordinary, not evidence that the coin is biased. The split chance answers the companion question — not what proportion came up heads this time, but how likely a fair coin was to produce a split like that at all. The page does not test whether a coin is fair; it assumes it is and shows what fair looks like.

Worked examples

  1. Ten flips: seven heads, three tails, longest run three

    1. Draw ten results from the generator: H, T, H, H, H, T, H, H, T, H
    2. Count the H: there are 7, so the tails are 10 − 7 = 3
    3. The proportion is 7 / 10 = 70%
    4. Walk the sequence once for the longest block of one side: HHH in positions 3 to 5, and again H H in 7 to 8 — the longest is 3
    5. The chance of exactly 7 heads in 10 fair flips is C(10,7) / 2¹⁰ = 120 / 1024 = 11.72%

    Read the last two numbers side by side, because they are the pair this page is most often misread on. 70% is what happened this time; 11.72% is how often a fair coin produces a 7–3 split at all. Neither contradicts the other, and 70% is not a restatement of 11.72% — the first describes this run, the second describes the whole family of ten-flip runs with seven heads in them.

  2. The same ten flips with a different seed: five and five

    1. Seed 7 draws a different sequence: T, T, H, H, H, T, T, T, H, H
    2. Five heads and five tails, so the proportion is 50%
    3. The longest block is again 3 — TTT in positions 6 to 8, and HHH in 3 to 5
    4. A 5–5 split has probability C(10,5) / 2¹⁰ = 252 / 1024 = 24.61%

    Both runs landed on a longest block of 3, and that is the ordinary outcome at ten flips rather than a coincidence worth reading into. What moved is the split chance: 5–5 is more than twice as likely as 7–3, because there are far more ways to arrange five heads among ten positions than seven. This is also why the seed is a field rather than a hidden detail — pressing the same page twice should not silently give a different answer, and a run worth discussing needs to be repeatable.

  3. One flip, the lower bound

    1. Draw a single result: H
    2. One head, no tails, so the proportion is 1 / 1 = 100%
    3. The longest block of identical results is the single flip itself, so 1
    4. The chance of one head in one fair flip is C(1,1) / 2¹ = 1/2, or 50%

    One flip is the smallest input the page accepts, and it shows why the proportion and the probability have to be separate rows. A single flip lands one way, so the proportion is 100% — a number that says nothing about the coin. The split chance is 50%, which is the number that does. At one flip the two rows look almost contradictory; at two hundred they converge, and the gap between them at small counts is the whole subject of sampling.

  4. Two hundred flips and a run of nine

    1. Draw two hundred results from the generator — the sequence row holds all of them
    2. Count the heads: 95, so the tails are 200 − 95 = 105
    3. The proportion is 95 / 200 = 47.5%, which is 2.5 points away from even
    4. The longest block of one side is 9 — nine identical results in a row
    5. The chance of exactly 95 heads in 200 fair flips is about 4.39%

    The run of nine is the number to sit with. People read a run of nine as proof that something is wrong with the coin, and in two hundred fair flips it is unremarkable — the longest block grows with the length of the sequence, slowly but without a ceiling. Note also which way the two rows pull: the proportion is a comfortable 47.5%, close enough to even to look right, while the split chance is only 4.39%, because landing on exactly 95 is one specific outcome among many that all look about the same.

Limitations

The flips are not physical. Each one is drawn from a seeded random generator, so what the page shows is a sequence that behaves like a fair coin, not a record of a real one — and the same seed draws the same sequence every time, which is the point of the field and also the limit of it. Three further limits are worth stating. First, the page never tests whether a coin is fair; it assumes a probability of one half on every flip and reports what follows, so a genuinely biased coin would produce a sequence the page would still describe as if it were fair. Second, 200 flips is the cap, inherited from the draw limit of the shared random kernel rather than chosen for this page, and at 200 the sequence row is long enough to wrap several lines. Third, the page shows a result but does not judge it — a longest run of nine, or a 70% share of heads, is printed without any comment on whether it is surprising, and reading the split chance beside it is how that judgement is meant to be made.

Frequently asked questions

Why does the same seed always give me the same sequence?
Because the flips come from a random generator that is seeded rather than a real coin, and the seed decides which sequence in that generator's stream gets drawn. Enter seed 1 twice and you get the same ten heads and tails; change it to 7 and you get a different run of the same length. That is deliberate: a page that redrew its answer on every visit could not be checked, a result could not be quoted, and the automated tests behind this page would have nothing to compare against. It also makes the seed the one input here that is not a quantity — it selects a sequence, it does not weight either side, so no seed makes heads more likely.
What is the difference between the percentage of heads and the split chance?
The percentage describes the run in front of you; the split chance describes all runs of this length that land on this split. Ten flips that come up seven heads give a percentage of 70%, and the chance of a fair coin producing exactly seven heads in ten flips is 11.72%. They are not two ways of saying the same thing, and they can move in opposite directions: at 200 flips the percentage may sit comfortably near 50% while the split chance is under 5%, because landing on one exact count is a narrow target even when the neighbourhood is crowded. Read the percentage as the result and the split chance as the surprise budget.
Is a run of nine heads in a row a sign that the coin is not fair?
No, and at 200 flips it is not even unusual. The longest block of identical results grows with the length of the sequence — slowly, but without any ceiling — so a long run is what a fair coin is supposed to produce eventually. What a fair coin does not do is remember: after eight heads the ninth flip is still one half, which is exactly why runs of this length show up in sequences this long. Reading a run as evidence of bias means reading the one part of the sequence that grows with length as though it were a constant, and the longest run row is printed precisely so that this intuition can be checked instead of trusted.
Why can I not flip more than 200 times?
Because 200 is the draw limit of the shared random kernel that this page, the dice roller and the random number generator all use — it is inherited rather than chosen here, and keeping it means one seed means the same thing on all three pages. The consequence is visible: at 200 flips the sequence row is long enough to wrap several lines, which is a direct result of the cap rather than a rendering fault. If you need a longer sequence, the honest answer is that the page is not the right tool — you want a program, not a printed sequence you would have to count by eye.
Why is there no table of results below the calculator?
Because the table worth having here is your own sequence, and the code that builds reference tables cannot see what you typed — it runs at build time from the calculator's structure alone, with no access to the inputs. A table of generic odds and probabilities would sit under the panel looking like an answer to your question while answering a different one. So the page prints the sequence itself instead, in the last row of the panel, and leaves the tables to the pages whose subject really is a fixed set of numbers rather than one run.
What do the letters H and T mean, and why not words?
H is heads and T is tails, printed one per flip in the order they were drawn. They are kept as letters in every language because the sequence is a piece of notation rather than copy: the same run of flips has to be readable as the same string regardless of which language the page is in, and a translated sequence would also be impossible to compare with the numbers beside it. The row exists so that the count, the percentage and especially the longest run can all be checked by hand — the longest run in particular cannot be read off a sequence any other way.

References

Related calculators