Coin Flipper — Flip a Coin Online
Every individual flip is logged here. Each circle shows H (Heads) or T (Tails). Flip coins in the Single Flip tab to see your history grow.
The chart below tracks how your cumulative heads percentage changes with each flip. Over time it converges toward the theoretical 50% — this is the Law of Large Numbers in real time. Flip more coins to watch it converge.
Cumulative Stats
Deviation from Theory
What Is a Coin Flipper?
A coin flipper is a tool that simulates a fair coin toss and produces a random 50/50 result of heads or tails. Virtual coin flippers use pseudo-random number generators (PRNGs) to replicate the statistical fairness of a physical coin without any physical bias from weight distribution, flip technique, or landing surface.
Physical coins are not perfectly fair — a 2007 study by Stanford researchers Persi Diaconis, Susan Holmes, and Richard Montgomery showed that coins tend to land on the same side they started on about 51% of the time, due to the mechanics of the flip. A virtual coin flip eliminates all physical bias, making it statistically superior for probability experiments, games, classroom activities, and unbiased decisions.
The tool above runs on Statistics Fundamentals, a statistics education platform built for students, teachers, and data practitioners. Every flip is generated fresh in your browser using JavaScript's Math.random() function, which uses no memory of previous results — each toss is always 50/50.
How to Flip a Coin Online
Flipping a coin online with this tool takes one click and zero setup. Here is the full guide:
The tool loads instantly. Click the coin image, the Flip Coin button, or press the Spacebar shortcut to get your result. The coin animates and lands on either heads or tails.
The result (Heads or Tails) appears immediately with a color-coded badge. Running totals — heads count, tails count, and total flips — update automatically.
Switch to the Multi-Flip tab and enter any number from 1 to 1,000. Quick buttons for 10, 100, and 1,000 flips are provided. Results show total heads, tails, percentages, standard deviation, and deviation from the expected 50%.
The History tab logs every individual flip from your session. Export as a CSV for use in your own probability experiments or class assignments.
The Probability tab displays a live convergence chart showing how your cumulative heads percentage moves toward 50% as your flip count grows.
Flip a Coin Multiple Times — 10, 100, or 1,000 Flips
To flip a coin multiple times, use the Multi-Flip tab above and enter any number between 1 and 1,000. The tool runs all flips instantly and displays full results — no waiting, no animation lag.
Shortcut buttons for 10, 100, and 1,000 flips are available directly in the Multi-Flip tab. Click any one of them and the simulator immediately runs that many coin tosses and displays the heads/tails split, percentage breakdown, expected value, and standard deviation.
Here is what to expect when you flip a coin many times, based on the binomial distribution with p = 0.5:
| Flips | Expected Heads | Typical Deviation from 50% | Std Dev σ | Use Case |
|---|---|---|---|---|
| 10 flips | 5 | ±10–20% | ±1.58 | Quick decisions, games |
| 20 flips | 10 | ±8–15% | ±2.24 | Classroom experiments |
| 100 flips | 50 | ±3–8% | ±5 | Probability demonstrations |
| 1,000 flips | 500 | ±1–3% | ±15.8 | Law of Large Numbers demo |
| 10,000 flips | 5,000 | ±0.3–1% | ±50 | Statistical simulations |
The Central Limit Theorem calculator can show you the full sampling distribution for any number of flips. The coin flip probability calculator computes exact probabilities for specific outcomes across n flips.
How Does a Virtual Coin Flip Work?
A virtual coin flip works by generating a random decimal number between 0 and 1. If the number is below 0.5, the result is heads; if it is 0.5 or greater, the result is tails. This produces a perfectly equal 50/50 probability for each outcome.
// JavaScript coin flip implementation
function flipCoin() {
const rand = Math.random(); // e.g. 0.3271
return rand < 0.5 ? 'Heads' : 'Tails';
}
// Math.random() generates uniform values in [0, 1)
// P(rand < 0.5) = 0.5 → 50% Heads
// P(rand >= 0.5) = 0.5 → 50% Tails
Modern JavaScript engines use the xorshift128+ algorithm internally, seeded by system entropy (CPU timing noise, OS randomness). This produces values that pass all standard NIST randomness tests, making it statistically indistinguishable from a fair physical coin for games, classroom experiments, and decision-making. For a deeper look at random number generation, see our Random Number Generator.
True Randomness vs. Pseudo-Randomness
Virtual coin flippers use pseudo-random number generators (PRNGs), not truly random sources. For all practical uses — coin flips, games, decisions, experiments — they behave as perfectly fair coins.
| Property | Pseudo-Random (PRNG) | True Random (HRNG) |
|---|---|---|
| Source | Deterministic algorithm seeded by entropy | Physical processes: quantum, thermal noise |
| Examples | Math.random() (JavaScript), Mersenne Twister | Radioactive decay, atmospheric noise (random.org) |
| Speed | Extremely fast | Slower (hardware-limited) |
| Reproducibility | Reproducible with same seed | Cannot be reproduced |
| Suitable for coin flips? | Yes — statistically indistinguishable from fair | Yes — mathematically true |
| Suitable for cryptography? | No — use CSPRNG instead | Yes |
Coin Flips as Bernoulli Trials
A coin flip is the most fundamental example of a Bernoulli trial: a single experiment with exactly two mutually exclusive outcomes, each with a fixed probability. Named after Swiss mathematician Jacob Bernoulli (1655–1705), Bernoulli trials are the foundation of probability theory and the binomial distribution.
Single Bernoulli Trial
P(X = 1) = p = 0.5 (Heads)
P(X = 0) = 1−p = 0.5 (Tails)
Where:
X = outcome (1 = heads, 0 = tails)
p = probability of success = 0.5
Binomial Distribution (n flips)
P(X = k) = C(n,k) × pᵏ × (1−p)ⁿ⁻ᵏ
Where:
n = number of flips
k = number of heads
p = 0.5 (fair coin)
C(n,k) = n! / (k! × (n−k)!)
Expected Value & Variance
E[X] = n × p = n × 0.5
Var[X] = n × p × (1−p)
= n × 0.5 × 0.5
= n / 4
Std Dev σ = √(n/4) = √n / 2
Probability — k Heads in n Flips
Example: P(exactly 5 heads in 10 flips)
P(X=5) = C(10,5) × (0.5)¹⁰
= 252 × 0.000977
≈ 0.2461 (24.61%)
Expected heads: 10 × 0.5 = 5
You can compute exact binomial probabilities for any coin flip scenario using our Binomial Distribution Calculator. For combinations and counting, use the Combination Calculator.
🪙 The Fair Flip Framework
The Fair Flip Framework is an original teaching model from Statistics Fundamentals for evaluating any coin flip scenario against three core properties that make it statistically valid.
📊 The Law of Large Numbers and Coin Flips
The Law of Large Numbers states that as the number of coin flips grows, the observed proportion of heads converges toward the true probability of 0.5. This is not a guarantee for any finite sequence — it is a long-run property.
The Probability tab in the coin flipper above charts this convergence live as you flip. The table above (in the "Flip Multiple Coins" section) shows expected deviation at each sample size. Read our full Law of Large Numbers guide for the formal proof and worked examples.
🏆 Famous Coin Flips in History
The coin flip has shaped history in ways most people don't realize. These are four of the most consequential coin tosses ever made — decisions that changed cities, sports dynasties, and lives.
Naming a City
Francis Pettygrove and Asa Lovejoy each wanted to name their 640-acre settlement. They flipped a coin in a best-of-three match. Pettygrove won, naming the city Portland after his hometown in Maine. The coin is now known as the Portland Penny.
First Flight
The Wright brothers flipped a coin on December 14, 1903 to decide who would make the world's first heavier-than-air flight. Wilbur won but crashed on the attempt. Three days later, Orville made the historic successful flight.
Changing Sports History
Before the lottery system, the NBA used a coin flip between the worst teams in each conference to award the #1 draft pick. Multiple legends — including Magic Johnson and Kareem Abdul-Jabbar — landed on their teams because of a 50/50 toss.
Buddy Holly's Fateful Toss
On February 3, 1959, Ritchie Valens won a coin flip against Tommy Allsup for a seat on Buddy Holly's chartered plane. The plane crashed, killing Holly, Valens, and J.P. Richardson — an event immortalized by Don McLean as "The Day the Music Died."
Coin flips have also decided political elections (when two candidates tie in vote count), determined academic authorship order in scientific publications, and settled property disputes in ancient Rome — where coin flip outcomes were legally binding. The study of randomness and probability grew directly from humanity's need to understand and govern these chance events. See our basic probability guide for the mathematical framework behind them.
Using a Coin Flip to Make a Decision
A coin flip is the optimal method for making a random binary decision when two options are equally appealing. Because each outcome has exactly 50% probability, it introduces zero bias when choosing between two choices.
The Freudian Coin Toss — A Psychology Insight
Sigmund Freud reportedly used coin flips in a specific way: after flipping, he would ask his patients not "what did it land on?" but "how do you feel about that result?" The moment the coin is in the air, you suddenly know what you were hoping for. If the result disappoints you, that emotion reveals the choice you actually wanted to make. This technique — sometimes called the Freudian Coin Toss — is most useful when two options feel logically equal but one feels emotionally right.
When to Use a Coin Flip for a Decision
When two options have the same expected value and no objective reason to prefer one, a coin flip produces a statistically unbiased selection — better than prolonged deliberation with no new information.
Sports officiating, classroom group selection, seating arrangements, and friendly disagreements all benefit from a provably 50/50 toss. No one can argue the outcome was unfair.
Clinical trials, A/B tests, and psychological studies use coin-flip logic to randomly assign participants to groups. This eliminates selection bias, the biggest threat to experimental validity. See our randomized controlled trials guide for details.
📋 Worked Case Studies
Case Study 1 — Classroom Probability Experiment
Total flips: 30 students × 20 flips = 600. Each flip has p = 0.5.
E[Heads] = 600 × 0.5 = 300. Std Dev σ = √(600 × 0.25) = √150 ≈ 12.25.
Within 1σ: 288–312 heads (68% of class experiments). Within 2σ: 276–324 heads (95% of class experiments).
Interpretation: Getting 280 heads total is completely normal. Getting 340 heads (57%) would be unusual — beyond 2σ. Pair this experiment with the binomial distribution calculator to compute exact probabilities for any outcome.
Case Study 2 — A/B Test Randomization
Each visitor gets a flip: heads = Group A, tails = Group B. Expected: 500 per group. σ = √(1000 × 0.25) ≈ 15.8. A 95% confidence range for Group A is approximately 469–531 members. For code implementations, see our A/B Test Calculator.
Random assignment through coin-flip logic eliminates selection bias — the gold standard for controlled experiments, from clinical trials to software feature tests.
Case Study 3 — Gambler's Fallacy in Practice
No. The probability of tails on the 8th flip is still exactly 0.5. The coin has no memory. The probability of getting 7 heads in a row is (0.5)⁷ = 1/128 ≈ 0.78%, which is unlikely — but once 7 heads have occurred, that event is in the past and the next flip starts fresh at 50/50.
The Gambler's Fallacy is the mistaken belief that past independent outcomes affect future ones. The independence property of coin flips (the "I" in the Fair Flip Framework) rules it out completely. See our probability rules guide for more on independent events.
Where Are Coin Flips Used in the Real World?
NFL, cricket, soccer, and tennis all use coin tosses to decide which team chooses serve, end, or kick-off. The outcome must be demonstrably unbiased to maintain competitive fairness.
Clinical trials assign participants to treatment vs. control using coin-flip logic. See our randomized controlled trials guide for how this eliminates selection bias.
Coin-flip logic is the foundation of Monte Carlo methods: large-scale random sampling to estimate numerical results. Computing π using random point placement uses the same PRNG principles as this tool.
Coin flip experiments are the first practical introduction to probability, sample space, independence, and the difference between theoretical and experimental probability in most curricula worldwide.
Binary random sequences — equivalent to millions of coin flips — generate cryptographic keys. True random number generators (HRNGs) are used here, since cryptographic security requires genuine non-determinism.
Coin Flip Probability: Complete Formula and Entity Reference
Table: Coin Flip Probability — 12 Key Entities
| Term | Formula / Symbol | Plain-English Definition | Common Misconception |
|---|---|---|---|
| Coin Flip | P(H) = P(T) = 0.5 | A single random binary event where each of two outcomes has equal 50/50 probability | "A coin has memory" — it does not; each flip is independent |
| Bernoulli Trial | X ~ Bernoulli(p) | A single experiment with two outcomes (success/failure), each with fixed probability p and 1−p | Bernoulli trials require p = 0.5; in fact p can be any value |
| Probability | P(A) = favourable / total | A number between 0 and 1 expressing how likely an event is to occur | Probability is not always a percentage; it can be a fraction or decimal |
| Independent Events | P(A∩B) = P(A)×P(B) | Events where the occurrence of one does not change the probability of the other | Coin flips are not independent if the coin is biased or the flip method is predictable |
| Sample Space | S = {H, T} | The set of all possible outcomes; for one coin flip, S has exactly two elements | Some claim the coin could land on its edge — this is excluded from the standard model |
| Binomial Distribution | X ~ B(n, p) | The probability distribution for the number of successes (heads) in n independent Bernoulli trials | Binomial distribution only applies when p is constant and trials are independent |
| Expected Value | E[X] = n × p | The average outcome expected over many repetitions; for n coin flips, E[Heads] = n/2 | Expected value is not the most likely single outcome; it is the long-run average |
| Random Variable | X: S → ℝ | A variable whose value is determined by a random experiment; for a coin flip, X ∈ {0, 1} | Random variables are not truly "variable" — they take one fixed value per trial |
| PRNG | Xₙ₊₁ = f(Xₙ, seed) | Pseudo-Random Number Generator: an algorithm producing sequences that pass statistical randomness tests | PRNGs are not suitable for cryptography, where true non-determinism is required |
| Law of Large Numbers | P̄ₙ → p as n → ∞ | As the number of trials grows, the observed proportion converges to the true probability | The Law of Large Numbers does not guarantee balance in any finite sequence |
| Gambler's Fallacy | P(Tails | n Heads) = 0.5 | The false belief that past outcomes influence future independent coin flips | "Tails is due after 5 heads" — independence means it is always exactly 50/50 |
| Standard Deviation (n flips) | σ = √(n × 0.25) | Measures how much the heads count typically varies from the expected value n/2 | Larger n does not reduce the absolute spread; it reduces the relative spread |
✍ Practice Problems
Easy
C(3,2) = 3. P(X=2) = 3 × (0.5)² × (0.5)¹ = 3 × 0.25 × 0.5 = 0.375 (37.5%).
Medium
P(X=8) = C(10,8) × (0.5)¹⁰ = 45/1024 ≈ 0.0439.
P(X=9) = 10/1024 ≈ 0.0098.
P(X=10) = 1/1024 ≈ 0.0010.
P(X ≥ 8) ≈ 0.0547 (5.47%).
Advanced
Related Tools on Statistics Fundamentals
Frequently Asked Questions
To flip a coin online, visit the coin flipper tool at the top of this page and click the "Flip Coin" button, click the coin image directly, or press the Spacebar shortcut. The tool generates an instant 50/50 heads or tails result with no signup required. For multiple coins, switch to the Multi-Flip tab and enter any number between 1 and 1,000. All results are generated entirely in your browser using a pseudo-random number generator.
The odds of a coin flip are exactly 50/50 — heads has a probability of 0.5 (50%) and tails has a probability of 0.5 (50%). In odds notation: 1:1 (even odds). This applies to every single flip regardless of what came before. The probability of getting heads n times in a row is (0.5)ⁿ — for example, 10 heads in a row has a probability of (0.5)¹⁰ = 1 in 1,024.
Use the Multi-Flip tab above. Enter any number from 1 to 1,000 in the input box, then click Flip. Quick-access buttons for 10, 100, and 1,000 flips are available directly in the tab. Results show total heads, total tails, percentages, expected values, standard deviation, and deviation from the theoretical 50% — all calculated instantly.
Yes — a coin flip is the best method for making an unbiased binary decision. Because each outcome has exactly 50% probability, it introduces no systematic preference. Common decision uses: choosing which team goes first, settling a tie between two candidates, assigning experiment participants to groups, selecting between two equally appealing options, or resolving any disagreement where neither party should have an advantage. For decisions involving three or more options, flip multiple rounds to narrow the field.
Online coin flippers use pseudo-random number generators (PRNGs), which produce results statistically indistinguishable from true randomness for practical uses. This tool's Math.random() function uses the xorshift128+ algorithm seeded by system entropy, passing all NIST randomness tests. True randomness (from hardware entropy sources) is only required in cryptographic applications. For coin flips, games, experiments, and decisions, a PRNG behaves as a perfectly fair coin.
Yes — every coin toss is an independent event. The outcome of one flip has absolutely no effect on any subsequent flip. No matter how many heads in a row you have seen, the probability of heads on the very next flip remains exactly 0.5 (50%). The Gambler's Fallacy — the belief that tails is "due" after a run of heads — is a mathematical error. Independence is what defines a Bernoulli trial and makes coin flips reliable for fair decisions.
A weighted coin flip is one where the probability of heads is not equal to the probability of tails — for example, P(Heads) = 0.6, P(Tails) = 0.4. This is called a biased Bernoulli trial and models situations where two outcomes are not equally likely. Physical coins can be slightly weighted, but online coin flippers like this one produce fair 50/50 results. For calculating weighted coin flip probabilities, use our Binomial Distribution Calculator with a custom p value.
The Law of Large Numbers states that as the number of coin flips grows, the observed proportion of heads converges toward the true theoretical probability of 0.5 (50%). With 10 flips you might see 70% heads — this is normal. With 1,000 flips you will almost certainly be within 3–4% of 50%. With 100,000 flips, within 0.5%. The Probability tab in the tool above charts this convergence in real time as you flip. This law was formally proven by Jacob Bernoulli in his 1713 work Ars Conjectandi.
A fair coin toss is any method that produces heads and tails with exactly equal probability: P(Heads) = P(Tails) = 0.5. A physical coin toss is approximately fair but can carry small biases — Stanford research by Diaconis, Holmes, and Montgomery found coins tend to land on the same side they start on about 51% of the time. Virtual coin flippers eliminate all physical bias through mathematical random generation, making them the most statistically reliable method for a true 50/50 binary outcome.
A Bernoulli trial is a random experiment with exactly two possible outcomes — success (probability p) and failure (probability 1−p) — where p remains constant and each trial is independent. A coin flip is the textbook example: P(Heads) = 0.5 (success), P(Tails) = 0.5 (failure). Repeating n Bernoulli trials produces a binomial distribution. The concept was formalized by Jacob Bernoulli (1655–1705), whose 1713 work Ars Conjectandi proved the Law of Large Numbers and laid the foundations of modern probability theory.