Coin Flip Calculator

The Coin Flip Calculator runs two modes. In Simulator mode you flip a virtual coin anywhere from 1 to 10,000 times and watch the heads/tails counts and percentages drift toward the expected 50/50 split (or your chosen bias). In Probability mode it computes the exact binomial probability of getting exactly N heads, at most N, or at least N heads in M flips using the formula P(X = k) = C(n,k) × p^k × (1-p)^(n-k). A bias slider lets you simulate loaded coins — set heads probability anywhere from 0 to 1. Use it for probability homework, decision-making, teaching the law of large numbers, or just settling a dispute.

star 4.9
New

Coin Flip calculator

monetization_on

Coin Flip

Always tails (0) Fair (0.5) Always heads (1)
Heads
0 0%
Tails
0 0%
Total Flips
0
Expected Heads
0
Actual vs Expected
Longest Streak
0
history

Recent Flips (last 100)

Flip the coin to start.

tips_and_updates Tips

  • A fair coin has p = 0.5 — set the bias slider to 0.5 for an unbiased simulator
  • Real coins are very close to fair; studies measure bias under 0.51
  • The 'law of large numbers' says results approach the true probability as flips grow — 10 flips can easily deviate 30% from 50/50, but 10,000 flips rarely deviate more than 1%
  • Getting exactly 50% heads is less likely than you think — with 10 flips it is only 24.6%
  • Long streaks are normal: in 100 flips of a fair coin, expect a run of 6+ heads or tails roughly 80% of the time
  • Use Probability mode for homework — it gives exact binomial answers, no sampling noise
  • A bias of 0.6 (slightly loaded coin) flips heads 60% of the time on average

How to Use the Coin Flip

1

Pick a mode

Simulator flips a virtual coin up to 10,000 times. Probability computes exact binomial probabilities.

2

Set number of flips

In Simulator mode, this is how many times to flip. In Probability mode, this is M — the total trials.

3

Set target heads (Probability mode)

N = how many heads you are asking about. We show P(exactly N), P(at most N), and P(at least N).

4

Adjust bias if needed

Default 0.5 is a fair coin. Slide to 0.6 for a slightly loaded heads coin, 0.4 for tails-biased, etc.

The Formula

Each coin flip is an independent Bernoulli trial with probability p of heads. For n independent flips, the number of heads follows a binomial distribution. The probability of exactly k heads is C(n,k) × p^k × (1-p)^(n-k). 'At most k' and 'at least k' probabilities are cumulative sums. When p = 0.5 (fair coin), the distribution is symmetric around n/2 and the most likely outcome is exactly n/2 heads.

P(X = k) = C(n, k) × p^k × (1-p)^(n-k)

lightbulb Variables Explained

  • n Total number of flips
  • k Number of heads outcomes of interest
  • p Probability of heads on a single flip (default 0.5)
  • C(n,k) Binomial coefficient = n! / (k! × (n-k)!)

tips_and_updates Pro Tips

1

A fair coin has p = 0.5 — set the bias slider to 0.5 for an unbiased simulator

2

Real coins are very close to fair; studies measure bias under 0.51

3

The 'law of large numbers' says results approach the true probability as flips grow — 10 flips can easily deviate 30% from 50/50, but 10,000 flips rarely deviate more than 1%

4

Getting exactly 50% heads is less likely than you think — with 10 flips it is only 24.6%

5

Long streaks are normal: in 100 flips of a fair coin, expect a run of 6+ heads or tails roughly 80% of the time

6

Use Probability mode for homework — it gives exact binomial answers, no sampling noise

7

A bias of 0.6 (slightly loaded coin) flips heads 60% of the time on average

The coin flip is the simplest and most intuitive example of a random binary event, making it a cornerstone of probability theory and statistics education. A fair coin has exactly a 50% chance of landing heads and 50% chance of tails on any single flip, but the actual observed distribution in a small sample often deviates from this expectation. Flip a coin 10 times and getting 7 heads is not unusual — it happens about 11.7% of the time. Flip it 1,000 times and the proportion of heads almost certainly falls between 47% and 53%, illustrating the law of large numbers. Coin flips follow the binomial distribution, which gives the exact probability of observing k heads in n flips. This distribution underlies hypothesis testing, confidence intervals, and A/B testing in modern statistics. This coin flip calculator operates in two modes: a simulator that flips a virtual coin up to 10,000 times with animated results and running statistics, and a probability calculator that computes exact binomial probabilities for any number of trials and desired outcomes. Use it for classroom demonstrations, quick decisions, game night, or exploring how randomness behaves at different sample sizes.

Simulator mode vs probability mode

Simulator mode runs actual random coin flips and reports observed heads and tails counts plus a running percentage chart. Because it uses real randomness, 100 flips might give you 47 heads or 56 heads — you can hit 'Flip' again to see the variance.

Probability mode computes exact binomial probabilities with no randomness: the answer is deterministic and matches textbook values.

Use Simulator to teach the law of large numbers; use Probability for homework and exact answers.

Law of large numbers, streaks, and how to spot a biased coin

With 10 flips of a fair coin, deviation from 50/50 is huge — a 7-3 split happens 11.7% of the time. With 1,000 flips, a 7-3 style (700 heads) would be astronomically unlikely (P ≈ 10^-38).

Streaks are common: in 100 fair flips, the longest run of heads averages about 7.

To detect a biased coin, run at least 1,000 flips and compare to the expected standard deviation of √(n × p × (1-p)). Results more than 3 SDs from the mean strongly suggest bias.

How does a coin flip calculator work?

A coin flip calculator models each flip as an independent Bernoulli trial: one event with two outcomes, heads with probability p and tails with probability 1 - p.

In simulator mode it draws a pseudo-random number for every flip and counts it as heads when the draw falls below p, then tallies observed heads and tails. In probability mode it evaluates the binomial distribution, which gives the chance of exactly k heads in n flips as C(n, k) × p^k × (1-p)^(n-k).

Wolfram MathWorld describes this Bernoulli-to-binomial link as the foundation of discrete probability. The calculator therefore separates real sampling from exact math, so you can compare observed outcomes against theoretical expectations.

What are the odds of heads or tails on a single flip?

On a single flip of a fair coin the odds of heads are 50% and the odds of tails are 50%, an even 1-to-1 chance. This is the defining property of a fair Bernoulli trial, where the two outcomes are equally likely and mutually exclusive.

Each flip is also independent, meaning a previous heads does not change the next flip's odds.

According to the Stanford study by Diaconis, Holmes and Montgomery, a physically flipped coin carries a very slight bias toward the side that started face up, on the order of 0.51 rather than 0.50. For virtually every practical or educational purpose, treating a single flip as a clean 50/50 is accurate.

How to calculate the probability of getting exactly N heads

To calculate the probability of exactly N heads in M flips, use the binomial formula P(X = N) = C(M, N) × p^N × (1-p)^(M-N).

First find the binomial coefficient C(M, N) = M! / (N! × (M-N)!), which counts the distinct orderings of N heads among M flips. Then multiply by p raised to N and (1-p) raised to the remaining flips.

For a fair coin flipping 10 times, exactly 5 heads is C(10, 5) × 0.5^10 = 252 / 1024 ≈ 24.61%. Wolfram MathWorld treats this as the canonical binomial example. The calculator's probability mode performs these factorial computations exactly, avoiding the rounding errors common in manual work.

Cumulative probability: at least and at most N heads explained

Cumulative probability answers questions like 'at least N heads' or 'at most N heads' by summing several exact binomial terms rather than reporting a single value.

The probability of at most N heads adds P(X = 0) through P(X = N), while at least N heads adds P(X = N) through P(X = M). These cumulative sums build the binomial distribution's cumulative distribution function, which Wolfram MathWorld and standard statistics texts use to derive tail probabilities.

For example, at least 60 heads in 100 fair flips is roughly 2.8%, since 60 sits two standard deviations above the mean of 50. The calculator computes all three views — exactly, at most, and at least — so you can frame a question either way.

What the law of large numbers means for coin flips

The law of large numbers states that as the number of flips grows, the observed proportion of heads converges toward the true probability, typically 50% for a fair coin.

It does not promise that heads and tails balance out in the short run; a run of 10 flips can easily land 7-3, but a run of 10,000 flips almost always sits within roughly one percent of 50%. The Encyclopaedia Britannica describes this as a foundational theorem of probability, distinct from the 'gambler's fallacy' that a due outcome must appear.

Simulator mode makes the effect visible: flip a few dozen times to see wild swings, then flip thousands of times to watch the percentage settle.

Practical uses: decisions, teaching, and simulations

A coin flip calculator serves several practical purposes beyond settling a friendly dispute.

  • Teachers use simulator mode to demonstrate the law of large numbers, sampling variance, and the shape of the binomial distribution without physical coins.
  • Students use probability mode to check homework answers with exact, noise-free values.
  • Researchers and analysts borrow the same binomial math for A/B test intuition, since a 50/50 split is the null hypothesis baseline in many experiments.
  • Game designers and hobbyists use it for fair randomization or to model loaded coins.

Because every flip is independent, the tool is also a clean introduction to Monte Carlo thinking, where repeated random trials approximate a theoretical probability.

Simulating a biased or loaded coin with the bias slider

The bias slider sets the heads probability p anywhere from 0 to 1, letting you simulate a loaded coin instead of a fair one.

A value of 0.6 flips heads about 60% of the time on average, while 0.4 favors tails; the endpoints 0 and 1 force always-tails or always-heads. Both simulator and probability modes honor this value, so the binomial formula uses your chosen p in P(X = k) = C(n, k) × p^k × (1-p)^(n-k).

Real physical coins rarely show bias beyond about 0.51, as the Stanford Diaconis study documented, so large p values are best treated as teaching or what-if scenarios rather than models of ordinary coins.

Why long streaks of heads or tails are normal, not rigged

Long streaks feel suspicious but are a normal feature of random flipping, not evidence of a rigged coin.

In a sequence of fair flips the longest expected run grows roughly with the base-2 logarithm of the number of flips, so in 100 flips the longest run of one side averages around six or seven in a row. This means multi-flip streaks appear frequently across a session, and treating them as a signal to bet the other way is the gambler's fallacy that Encyclopaedia Britannica warns against.

Because each flip is independent, a streak of heads never raises the odds of the next flip being tails. To distinguish genuine bias from chance, compare totals against the expected spread over many flips rather than reacting to short runs.

Common mistakes when interpreting coin flip probability

  • The most common mistake is the gambler's fallacy — believing that after several heads a tails is 'due.' Each flip is independent, so the odds stay 50/50 regardless of history.
  • A second error is expecting an exact 50/50 split in small samples; even 10 flips land exactly 5 heads only about 24.6% of the time.
  • A third is confusing 'exactly N heads' with 'at least N heads,' which are very different cumulative quantities.
  • People also over-read short streaks as proof of a loaded coin, when streaks are expected.
  • Finally, using a tiny sample to judge fairness is unreliable: Encyclopaedia Britannica notes that only large trial counts reveal true probabilities, so run many flips before concluding a coin is biased.

Frequently Asked Questions

sell

Tags