Monte Carlo Probability Calculator

This Monte Carlo probability calculator estimates a probability by simulation and compares the result with the exact answer for dice, coins and the birthday problem.

Checks on your data

  • The generator is seeded, so the same seed and inputs always give the same estimate.
  • Error shrinks like 1 over the square root of the trials. Four times as many trials roughly halves the error.
  • Change the seed to see how much the estimate varies from run to run.

Results

Estimated probability
0.3742
Exact probability
0.375
Error (estimate − exact)
-0.0008
95% interval for the estimate
0.3712 to 0.3772
Standard error
0.00153028
Hits / trials
37420 / 100000
Event
Sum of 3 dice ≥ 12
Running estimate as trials increase
00.10.20.320,00040,00060,00080,000100,000Monte Carlo estimateExact probabilityTrials
Show step-by-step solution
  1. Event: Sum of 3 dice ≥ 12.
  2. Run 100,000 random trials with a seeded generator (seed 42), so the same inputs always give the same result.
  3. Count the trials where the event happened: 37420. Estimate = 37420 ÷ 100000 = 0.3742.
  4. Standard error = √(p̂(1 − p̂) ÷ N) = 0.00153028, so the 95% interval is 0.3712 to 0.3772.
  5. The exact value is 0.375, a difference of -0.0008.
Estimatehits / trials
Error≈ 1/√trials
95% intervalp̂ ± 1.96·SE

What Is Monte Carlo Probability?

Monte Carlo simulation estimates a probability by running a random experiment many times and counting how often the event happens. It is a practical method when the exact calculation is hard.

Choose dice, coin flips or the birthday problem, set the number of trials and a seed. The calculator runs the simulation, shows the estimate with a 95 percent interval, and prints the exact probability next to it.

A graph shows the running estimate settling toward the exact value as the number of trials grows.

How to Use the Monte Carlo Probability Calculator

  1. Pick the experiment and its size.
  2. Set the number of trials and a seed.
  3. Compare the estimate, its interval and the exact value.

Monte Carlo Probability Formula

Estimate

p^=hitsN\hat p=\frac{\text{hits}}{N}

Standard error

SE=p^(1−p^)NSE=\sqrt{\frac{\hat p(1-\hat p)}{N}}

Monte Carlo Probability Variables Explained

SymbolMeaningNotes
NNumber of trials
p̂Estimated probabilityhits / N
SEStandard error of the estimate√(p̂(1 − p̂)/N)
SeedStarting value of the random generatorSame seed, same result

Monte Carlo Probability Worked Example

With the example values loaded in the calculator above, the steps are:

  1. Event: Sum of 3 dice ≥ 12.
  2. Run 100,000 random trials with a seeded generator (seed 42), so the same inputs always give the same result.
  3. Count the trials where the event happened: 37420. Estimate = 37420 ÷ 100000 = 0.3742.
  4. Standard error = √(p̂(1 − p̂) ÷ N) = 0.00153028, so the 95% interval is 0.3712 to 0.3772.
  5. The exact value is 0.375, a difference of -0.0008.

Result: Estimated probability = 0.3742; Exact probability = 0.375.

Worked example: three dice, sum at least 12

Of the 216 equally likely rolls of three dice, 81 give a sum of 12 or more, so the exact probability is 81 ÷ 216 = 0.375.

A simulation with a hundred thousand trials should land within about 0.003 of that.

The birthday problem

With 23 people the chance that two share a birthday is just over 50 percent, assuming 365 equally likely days. Try it with 23 people to see the estimate settle near 0.507.

Where Monte Carlo Probability Is Used

Learning simulation

See how an estimate converges to the exact value.

Checking a probability

Verify a hand calculation for dice or coins.

Teaching the birthday problem

Show how quickly shared birthdays become likely.

Common Monte Carlo Probability Mistakes to Avoid

  • More trials mean a more precise estimate, with diminishing returns.
  • A fixed seed makes your result reproducible.

Monte Carlo Probability Terms and Definitions

Monte Carlo method
Estimating a quantity by repeated random sampling.
Seed
The starting value of the random number generator.

Monte Carlo Probability FAQs

What is a Monte Carlo simulation?

A way to estimate a probability or value by running a random experiment many times.

How many trials do I need?

It depends on the precision you want. The error falls like 1 over the square root of the number of trials.

Why does the estimate differ from the exact value?

Random variation. The difference is usually inside the 95% interval.

Why use a seed?

It makes the simulation repeatable. Change it to see how results vary.

Related calculators

Last updated 2026-11-09. See our disclaimer.