Coin Flip

Flip a coin online for heads or tails. Run one or many flips, view totals and percentages, and keep a local flip history.

Coin flip

Heads: 0 · Tails: 0 · Total: 0

No flips yet.

Longest streak — heads: 0 · tails: 0

Recent flips: –

Flip history

Stored only in this browser.

No flips yet.

    Advertisement

    Every flip is decided by the browser Web Crypto API before any animation plays.

    How to Use

    1. Press Flip once for a single heads-or-tails decision.
    2. Use Flip 10 times or Flip 100 times for batches, or enter a custom count and press Flip custom count.
    3. Check the totals, percentages and longest streaks below the result.
    4. Press Reset to clear the history and counters on this device.

    Advertisement

    How It Works

    A coin has two equally likely outcomes, and this tool models that directly. Each flip calls crypto.getRandomValues() and reduces the result to 0 or 1 with unbiased integer sampling. The outcome is stored first; the animated coin then rotates to display the already-decided face.

    Because every flip is independent, a streak of heads never makes tails more likely on the next flip. The counters simply summarize what happened. Percentages shown over small batches can look far from 50/50, and that is normal: variance shrinks as the number of flips grows.

    All processing happens in your browser. No flip, count or streak is ever transmitted to a server, and history is kept only in local storage until you reset it.

    Examples

    • Single decision: flip once to settle who pays for coffee — the last flip appears as Heads or Tails.
    • Class experiment: flip 100 times and compare the heads percentage with the expected 50%. Typical batches land near 50% without ever guaranteeing it.
    • Best of 25: enter 25 and flip a custom count to see how often the majority side changes within a game-like sequence.

    Common Uses

    • Quick everyday decisions, from chores to who goes first in a game.
    • Sports and playground rules where a fair 50/50 choice is needed.
    • Classroom demonstrations of probability, streaks and the law of large numbers.
    • Board game and tabletop mechanics that call for a coin toss.

    Frequently Asked Questions

    Is the coin flip fair?

    Yes. Each flip is decided by crypto.getRandomValues(), which produces an unbiased 0 or 1. The result is chosen before the animation starts, so the animation can never influence the outcome.

    Does the animation decide the result?

    No. The secure random value is selected first, and the coin animation is only a visual replay of that decision. Disabling animations would not change any result.

    Can I flip a coin 100 times at once?

    Yes. Use Flip 100 times, or enter any count between 1 and 10000 in the custom field. Every flip is independent and keeps its own 50/50 chance.

    Where is my flip history stored?

    Only in your browser’s local storage. Nothing is uploaded, and the Reset button permanently removes the stored history on this device.

    Do the totals and percentages mean the coin is biased?

    No. Short sequences often look uneven. The percentages converge toward 50/50 as the number of flips grows, which is expected behavior for independent fair flips.

    Last updated: