Dice and Coin Probability Simulator (with animated chart)

Dice and Coin Probability Simulator

The same seed and settings give the same run. Change the seed for a new run.

Observed frequency of:

-

Theoretical probability:

-

Difference (percentage points):

-

Typical error expected:

-

Seed of this run:

-

Calculation:

-

This probability simulator rolls one or two dice, or flips a coin, as many times as you like and draws an animated chart with the frequency of each outcome. An orange mark shows the theoretical probability, so you can see how close your run comes to what theory says.

Further down, a second chart follows one outcome through the run and shows the law of large numbers with your own data. The numbers are pseudorandom and come from a seed, so you can repeat any run.

How to use the dice and coin simulator

Step 1: Choose what to simulate: one die, two dice (added together) or a coin.

Step 2: Enter the number of trials (1 to 100,000) or move the slider. With few trials you will see a lot of variation, and with many the result settles down.

Step 3: Click Simulate or Random seed for a new run. The bars rise as the trials pile up.

Step 4: Pick the outcome to follow to see in the second chart how its frequency closes in on the theoretical probability. Repeat a run with the same seed.

Probability formulas

When every outcome is equally likely, the probability of an event is:

P = favorable outcomes ÷ possible outcomes

The observed frequency is the share of trials in which the outcome came up, and the law of large numbers says it approaches P as the trials grow. The typical error of that frequency is:

typical error = √(P × (1 - P) ÷ n)

With two dice there are 36 equally likely combinations, and each sum has its own number of ways:

SumWaysProbabilityPercent
211/362.78 %
322/36 = 1/185.56 %
433/36 = 1/128.33 %
544/36 = 1/911.11 %
655/3613.89 %
766/36 = 1/616.67 %
855/3613.89 %
944/36 = 1/911.11 %
1033/36 = 1/128.33 %
1122/36 = 1/185.56 %
1211/362.78 %

Dice and coin probability examples

Example 1: Probability that two dice add up to 7

There are 6 combinations that add up to 7: 1+6, 2+5, 3+4, 4+3, 5+2 and 6+1. So P = 6 ÷ 36 = 1/6 = 16.67 %. It is the most likely sum.

Example 2: Probability of getting 10 or more with two dice

The sums 10, 11 and 12 have 3, 2 and 1 ways. So P = (3 + 2 + 1) ÷ 36 = 6 ÷ 36 = 1/6 = 16.67 %.

Example 3: The law of large numbers with a coin

With 10,000 coin flips and seed 2024, the frequency of heads went like this (you can reproduce it in the simulator):

TrialsFrequency of headsDifference from 50%
1030 %-20
10052 %+2
1,00049.5 %-0.5
10,00050.55 %+0.55

With few trials the frequency strays far from 50%. With many, the gap nearly disappears, although an exact match is never guaranteed.

Example 4: One die rolled 600 times

Theory expects about 100 of each face. With seed 2024, faces 1 to 6 came up 96, 104, 95, 107, 106, 92 times. The most common face came up 107 times and the least common 92, which is normal for only 600 rolls.

Frequently asked questions

What is the law of large numbers?

It says that the frequency of an outcome gets close to its theoretical probability as the number of repetitions grows. It does not say that differences get "made up for": only that they matter less and less against the total.

Why is 7 the most likely sum with two dice?

Because it has the most combinations: 6 out of 36, against 1 out of 36 for a 2 or a 12. That is why the theory chart for two dice has a triangle shape.

If heads comes up many times in a row, is tails more likely next?

No. Each flip is independent and keeps its 50 % probability. In the long run the frequency approaches that value because new flips dilute the old ones, not because the coin makes up for them.

What is the seed?

It is the number the pseudorandom generator starts from. With the same seed and settings you get exactly the same run, which helps you compare or repeat an experiment.

Are the results truly random?

They are pseudorandom: they look random and spread the outcomes well, but they come from a formula. For studying probability that is more than enough.

Learn more

Related calculators

You can explore other calculators here.