Monte Carlo Sample Size Calculator
Determine how many Monte Carlo iterations are needed for a target precision.
About Monte Carlo Sample Size Calculator
Monte Carlo error falls with the square root of iterations, so halving the error requires four times the runs. That square-root convergence is the fundamental cost of simulation. Variance reduction techniques such as antithetic variates or importance sampling improve precision far more cheaply than simply running more iterations.
Formula
Monte Carlo Sample Size
n = (z σ ÷ precision)²
- convergence
- Error falls with the square root of iterations, so precision is expensive
Worked example
With the default values below, Monte Carlo Sample Size Calculator returns Iterations Needed of 3,459. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Standard deviation of the outputminimum 0
- 15
- Desired precision of the meanminimum 0
- 0.5
- Confidence levelaccepts 50–99.9 %
- 95 %
- Seconds per iterationminimum 0 s
- 0.01 s
Results
- Iterations Needed
- 3,459
- Estimated Runtime
- 0.0096 h
- Precision After Ten Thousand Iterations
- 0.29406
- Iterations to Halve the Error
- 13,836
- Standard Error at the Target
- 0.255045
Step by step
- 1Values used
- 2Monte Carlo Sample Size
- 3Iterations Needed= 3,459
- 4Estimated Runtime= 0.0096 h
- 5Precision After Ten Thousand Iterations= 0.29406
- 6Iterations to Halve the Error= 13,836
- 7Standard Error at the Target= 0.255045
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 6 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
How is Monte Carlo Sample Size calculated?
n = (z σ ÷ precision)² Monte Carlo error falls with the square root of iterations, so halving the error requires four times the runs. That square-root convergence is the fundamental cost of simulation.
Why does Monte Carlo Sample Size matter?
Variance reduction techniques such as antithetic variates or importance sampling improve precision far more cheaply than simply running more iterations.
What values do I need to enter?
This calculator takes 4 inputs: Standard deviation of the output, Desired precision of the mean, Confidence level, Seconds per iteration. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Related Calculators
You might also need
- Trimmed Mean CalculatorCommonly used together
- Weighted Mean CalculatorCommonly used together
- Winsorized Mean CalculatorCommonly used together
- A/B Test Duration CalculatorAlso in Data & Analytics
- A/B Test Sample Size CalculatorAlso in Data & Analytics
- A/B Test Significance CalculatorAlso in Data & Analytics
