Flip a Coin

Define both outcomes before flipping. For decisions, both options should be acceptable to everyone involved.

One choice or a repeatable experiment

Define both outcomes before flipping. For decisions, both options should be acceptable to everyone involved.

Step 1

Name the two sides

A | B

Use Heads and Tails or two distinct short labels. Choose a whole-number batch size from 1 to 1,000.

Step 2

Flip the batch

AA  AB
BA  BB

All binary outcomes are generated before the animation. The central coin shows the final toss, not the majority side.

Step 3

Compare counts

6 / 10 = 60%

Read both counts and the batch size. Copy the summary or download CSV; a shared setup does not preserve the outcome.

Five-toss coin batch with separate heads and tails counts
The batch contains five coin tosses. The two side counts summarize the batch, while the central coin shows the final toss, not the majority; another batch can differ.

Practical uses

First turn

Assign a distinct short label to each team and select one flip. Agree what the result means and accept the first completed toss. A batch is a different experiment; do not decide afterward whether to use its final side or majority. Use a method accepted by the people involved and allow discussion before assigning labels.

Classroom samples

Run ten-flip batches and record both counts before running the next. Compare groups using heads divided by total flips, not the average of unequal batch percentages. Export CSV before the 25-batch history window rolls over. Unequal counts and short streaks are observations to explain, not automatic evidence of a broken coin.

Two acceptable plans

Filter unsuitable choices before mapping A and B to two plans. A single toss can break a low-stakes tie when both are acceptable. It does not resolve consent or obligations. If you prefer an odd-batch majority rule, agree on that separately and use counts; the central coin still displays only the last toss.

Two flips, four ordered sequences

A and B represent the two sides. AB and BA are different sequences, so exactly one A in two flips has probability 2/4, not 1/3.

A ritual backed by an agreed rule

Coin tossing remains a formal starting procedure in sport. Under IFAB Law 8, the toss winner chooses a goal to attack or the kick-off. The rule defines what the toss means; the coin itself does not decide the rules.

The same principle helps a casual game: name the outcomes and decide whether a draw will be repeated before starting. Changing the meaning of heads after seeing it defeats the purpose of a neutral choice.

This digital tool preserves the familiar reveal without claiming to reproduce a particular metal coin’s flight. Its visual side and written result describe the same generated bit. Custom labels change the meaning, not the binary probabilities.

Independence is not alternation

The NIST binomial-distribution explanation describes counts of successes in a fixed number of two-outcome trials with a fixed probability. For n fair independent flips, the expected number of heads is n/2, but the count varies from batch to batch.

For ten flips, exactly five heads occurs in 252 of the 1,024 equally likely sequences, about 24.6%. Therefore a batch not split five–five is quite ordinary. A long run of one side also does not make the other side due next.

The history is a record, not a feedback controller: previous heads, tails or streaks are not used to rebalance the next batch. Clearing it removes the record but does not improve your odds. The longest streak is measured within each stored batch, not across boundaries between batches.

Make the two outcomes unambiguous

Labels are trimmed to 18 string units and must differ without case. Blank labels use the standard side names. Long or near-identical descriptions make the result harder to interpret; use short distinct labels and keep the full decision wording outside the tool. Renaming labels does not change the model’s equal binary chances. A completed batch keeps the labels used when generated.

Choose a whole-number quantity from 1 to 1,000. A batch generates all outcomes before one reveal; it is not 1,000 visible coin animations. Theme, sound, vibration and fullscreen change the experience, not probabilities. Space outside editable controls starts a batch. Optional audio or vibration can be unavailable while the written completed result remains usable.

The final side, counts and streak answer different questions

A fixed illustrative sequence A, A, B has two A outcomes, one B and a longest streak of two, but the central coin shows B. The final side is the last generated toss, not the majority or an additional toss. Counts sum to the selected quantity; percentages divide each count by that quantity and may be rounded for display.

Session totals are weighted by flips, not batches. If a one-flip batch is A and a nine-flip batch has four A, the retained total is five A out of ten, or 50%; averaging 100% and 44.4% would be wrong. Longest streak means consecutive identical sides within a batch; stored summaries do not reconstruct a single sequence across batches. Neither a count nor a streak predicts the next toss.

Read the correct result for the task
TaskReadDo not substitute
One tie-breakFinal side with quantity 1A later redraw after disliking the answer.
Batch majorityBoth counts under an agreed ruleThe central final-toss graphic.
Frequency experimentCounts / total flipsAverage of percentages from unequal batches.
Run lengthWithin-batch longest streakA prediction that the other side is due.

Preserve a record without changing the next experiment

CSV records retained batch summaries: quantity, both counts and labels, final side, longest streak and time. It does not contain every flip in sequence, so it cannot reconstruct where a streak began. Copy gives the completed single result or batch summary. Share carries quantity, labels and style, not the generated batch. Those labels become readable URL data; avoid confidential decision descriptions.

Only 25 recent batches are kept locally. Session totals can change when older batches leave that window; they are not lifetime statistics. Reset Setup restores controls and cancels an unfinished reveal, whereas clearing history removes completed records. Storage problems can leave only an in-memory session, so download important summaries before closing or clearing data. Cancelled reveals add no completed batch.

Examples

One toss
P(A) = 1/2

One binary outcome. No third edge-landing outcome is modeled.

Two tosses
AA, AB, BA, BB

The order matters, and each sequence has probability 1/4 under the model.

Ten tosses
E(heads) = 5

Five is an expected count, not a promise. The next independent toss remains 50–50 after any streak.

Method and limits

Each coin uses one bit from a browser cryptographic random value. A batch is generated once and concealed until reveal. Completed batches retain their original labels even when the editor changes. Counts describe the model’s two outcomes; there is no simulated physical edge landing.

Up to 1,000 flips per batch and 25 recent batches are retained when local storage works. Session totals cover only that retained history. Streaks are per batch. Audio, vibration and fullscreen may be unavailable. This is not certified gambling equipment or a measurement of a real coin’s bias.

For confusing results, compare the final-toss label with the batch totals; they answer different questions. Export the batch, quantity and labels, then report the browser, locale and steps. Unreadable storage is preserved until you modify or clear the session.

Common questions

Why does the coin show the side with fewer results?

The coin shows the last toss in the batch, not the side with the larger count. Both values can be correct.

Must a large batch be exactly half heads?

No. Equal probability is a property of each trial, not a requirement that every batch balance exactly.

Can changing labels change an earlier result?

No. A completed batch keeps the labels used when it was generated. New labels apply to later flips.

Why are my labels rejected?

The two trimmed labels must be distinct without case and are limited to 18 string units. Two descriptions that differ only beyond the limit can become identical. Use short names such as Plan A and Plan B, then write their meaning separately. Blank labels fall back to standard side names.

Can a batch decide by majority?

You can read the counts under a majority rule agreed beforehand; the tool’s central result remains the last toss. An even batch may tie, so decide in advance how to handle that. Changing the interpretation after seeing the counts turns it into a different selection procedure.

Does CSV preserve the entire sequence?

No. It exports retained batch summaries, not every individual toss. Counts, final side and longest streak do not uniquely determine the sequence. Use the export for those measurements, not to reconstruct exactly where each outcome appeared.

Why did session totals fall after another batch?

History keeps only the latest 25 batches. When an older batch drops out, totals are recalculated over what remains. Export earlier records if you need a larger experiment; clearing history also resets the observed totals, not the probabilities.

What should I do if generation fails?

Check the whole-number quantity and distinct labels. If browser randomness is unavailable, no completed batch should be accepted; try a supported browser. For clipboard or sound failure, use the written counts and export instead. Do not replace a failed result with an assumed heads or tails.