Skip to main content

Coin Flip Simulator

Simulate coin flips and visualize the distribution of heads and tails. Perfect for learning about probability and the law of large numbers.

Coin Flip Simulator

Simulate coin flips and visualize the distribution of heads and tails

Formula

P(Heads) = P(Tails) = 0.5

For a fair coin, the probability of heads or tails is 50% each. With many flips, the distribution approaches 50/50.

Probability Concepts

🎲 Independent Events

Each coin flip is independent - previous results don't affect future flips. Getting 5 heads in a row doesn't make tails more likely on the next flip.

📊 Law of Large Numbers

As you flip more coins, the percentage of heads approaches 50%. Try 10 flips vs 10,000 flips to see this in action!

🔔 Normal Distribution

With many flips, the number of heads follows a bell curve (normal distribution) centered around 50% of the total flips.

⚖️ Expected Value

The expected number of heads is always n/2 where n is the number of flips. For 100 flips, expect around 50 heads on average.

How to Use

  1. 1
    Set number of flipsChoose how many coin flips to simulate (1 to 10,000).
  2. 2
    Click CalculatePress the Calculate button to run the simulation.
  3. 3
    View resultsSee the distribution of heads and tails with a visual chart.
  4. 4
    Analyze the dataCompare your results to the expected 50/50 distribution.

Frequently Asked Questions

Is this a fair coin simulation?

Yes, this simulator uses a fair coin with exactly 50% probability for heads and 50% for tails. Each flip is independent and random.

Why don't I always get exactly 50% heads?

Random variation is normal. With small sample sizes, you'll often see deviations from 50%. As you increase the number of flips, the percentage tends to get closer to 50% - this is the Law of Large Numbers.

What is the Law of Large Numbers?

The Law of Large Numbers states that as the number of trials increases, the average of the results will get closer to the expected value. For coin flips, this means more flips = closer to 50% heads.

Can I use this for making decisions?

Yes! You can use a single flip to make random decisions. The simulator provides a truly random result based on cryptographic-quality randomness.

What is the probability of getting all heads?

The probability of getting all heads in n flips is (1/2)^n. For example, 10 heads in a row has a probability of about 0.1% (1 in 1,024).