Back to coin toss

How it works

How is a coin flip chosen?

Every toss requests a random byte from your browser’s crypto.getRandomValues API. Even values mean Heads; odd values mean Tails. Of the 256 possible byte values, 128 map to each side. This gives an equal split without adjusting for earlier tosses.

The outcome is chosen before the animation starts. Instant result and Show result change only when you see it. Sound is optional and starts off. If the browser’s random source is unavailable, the tool shows an error instead of inventing a result.

The W3C Web Cryptography specification describes this browser API. It does not certify this site or provide an independent record of your toss.

Choose a mode

Custom labels are saved with each result. Editing a label applies to new tosses; it does not rename old results. A best-of match keeps the labels it started with until you choose New match.

The four mode buttons switch within the loaded document and keep its temporary history. Tool links open another document and do not carry unremembered results between pages.

Choose a probability question

Each model uses independent flips with the displayed Heads chance and complementary Tails chance. Calculate uses mathematics without drawing outcomes. Changing a probability model does not change the four coin flip modes’ 50/50 source. Editing inputs keeps the previous result with its original model until you calculate again.

What happens in an experiment?

Run experiments draws fresh outcomes from Web Crypto, mapped to the chosen chance without balancing earlier results. At a 0% or 100% model chance the outcome is deterministic. A failed random source produces an error rather than invented observations.

Each experiment keeps its own model and stopping rule. Best-of trials stop at a winner. Pattern comparison uses two separate fresh series, one per pattern; it is not a race on one shared series.

A waiting trial that reaches its limit without a match is labelled Not reached within N flips. It is not a successful wait. Completed, not-reached and aborted trials stay distinct, and an average of completed waits is not the unconditional expected wait. Stop keeps actual completed trials and identifies a partial experiment separately.

Coin history and statistics

Statistics of retained history describes the results still in your history. It is separate from the current match score and a simulator batch’s summary. It is not a lifetime count or a count of other people’s tosses.

History holds up to 100 runs and 10,000 outcomes. When a limit removes older complete runs, the tool tells you and recalculates the totals. The current complete batch remains available to download. Clear history also clears the displayed result, active match and statistics, while keeping your labels and mode preferences.

History normally lasts only while this page stays open. Remember on this device is optional, with a fixed expiry up to 30 days after you enable it. Read the storage and deletion details.

Remember probability work separately

Probability work starts in page memory. Remember probability work on this device saves separately for a fixed period of 30 days after you opt in. It does not change the coin history preference. It holds up to six setups with their latest calculation, 20 experiment sets, 20,000 trial rows and 512 KiB in total.

Full storage leaves the current result available in memory and for download with Not saved; it does not silently evict old experiment sets. Clear chosen results to make room. Clear saved results keeps setups and the opt-in. Forget probability work removes this separate saved collection. Reset clears the current page’s output and restores its defaults. Loading or restoring work never calculates or draws by itself. Storage, expiry and deletion details.

Copy, export and share

For the coin flip modes, Copy result copies the chosen side and its original labels. JSON preserves the original data. CSV is a text exchange format: import it in Excel with automatic type detection disabled and columns set to Text. Opening CSV directly or saving and reopening it in another program can interpret text differently.

In those modes, Share settings opens an unstarted configuration. Share result opens an existing result marked “Shared result — not independently verified”; it does not count as the recipient’s own toss. Check the preview and choose Include custom labels only if you want those labels in the link.

Coin result links hold up to 100 outcomes within a 2,048-byte URL limit. Their contents can be edited or forwarded. They are not proof of fairness, authorship or a live shared toss. Flip my coin leaves the shared view and makes a new local result.

Probability results can be copied or downloaded with their original setup, model and formula version. Experiment downloads keep the selected trial rows and their completion statuses. A probability Share settings link uses #qct-lab= and carries only its previewed setup within the same 2,048-byte URL limit. It contains no result, history or opt-in, and opening it does not calculate, draw or save preferences. Your next own action removes the imported fragment. Recipients and page scripts can read or edit links.

Presentation and offline use

Present enlarges the same tool for a group; Fullscreen is optional. Neither changes the result or creates another toss. Once the page has loaded, the core tool and local downloads can work without a network connection. A first visit still needs the site to load; feedback and other external services need their own connection.

Why a streak does not predict the next toss