Flip a Coin 1 Million Times

Execute 1,000,000 independent coin tosses in milliseconds. Test asymptotic convergence, examine 20+ flip streaks, and visualize the Law of Large Numbers.

1,000,000 Flips Monte Carlo Engine

Simulate thousands of fair binary trials off the main thread with live Binomial Distribution analysis.

Trial Count:
👑Observed Heads
52
52.00% (Expected: 50.0%)
Observed Tails
48
48.00% (Expected: 50.0%)
🔥Longest Streak
6
Consecutive Heads
⏱️Execution Latency
4ms
WebCrypto CSPRNG

Observed vs Theoretical Gaussian Bell Curve

Law of Large Numbers: As N → ∞, Observed Ratio → 0.500

The Statistical Physics of One Million Coin Flips

Conducting one million trials ($N = 10^6$) provides empirical proof of central limit theorems and Bernoulli convergence:

Expected Heads ($\mu$):500,000
Standard Deviation ($\sigma$):500 Flips (0.05%)
Typical Observed Range (99.7%):498,500 to 501,500
Expected Longest Streak:~19 to 21 Consecutive

While an individual flip has a standard 50.0% probability, the probability of obtaining exactly 500,000 heads is approximately 0.0798% (approx 1 / √(2π · 250,000)). However, the observed ratio will almost always land between 49.95% and 50.05%.

Frequently Asked Questions

How can a browser flip a coin 1,000,000 times in under 50 milliseconds?

Our simulation engine utilizes Web Crypto API CSPRNG with 64KB typed buffer batches running directly on your CPU hardware. Instead of rendering individual DOM nodes, it aggregates bitwise entropy and calculates distribution metrics in real time.

What is the Law of Large Numbers in 1,000,000 coin flips?

The Law of Large Numbers (LLN) proves that as the number of trials approaches infinity, the observed proportion of heads converges asymptotically to the theoretical probability of 50.000%. In 1,000,000 flips, the typical deviation is less than ±0.1% (e.g. 500,240 Heads vs 499,760 Tails).

What is the longest expected streak in 1,000,000 coin flips?

In 1,000,000 independent coin tosses, mathematical streak theory (Erdős–Rényi theorem) predicts the longest consecutive run of identical outcomes (all Heads or all Tails) will almost certainly be between 18 and 22 consecutive flips.