Monte Carlo Simulation in Excel: Free Template | Vose

Monte Carlo Simulation in Excel

A step-by-step guide, with or without an add-in

How do you run a Monte Carlo simulation in Excel?

Last updated September 2026

You can do it with nothing but built-in formulas, in five steps:

  1. Build the model with a single value for each uncertain input.
  2. Replace each of those inputs with a random draw from a probability distribution, using RAND() and an inverse function such as NORM.INV.
  3. Recalculate the model thousands of times, one row per iteration or with a Data Table.
  4. Collect the output of every iteration.
  5. Summarise those outputs: mean, percentiles, the chance of exceeding a target, a histogram and an S-curve.

That covers simple models well. An add-in takes over when you need correlated inputs, a wide choice of distributions, sensitivity analysis or speed.

This guide works through one example both ways. Path A uses plain Excel, and every formula is shown. Path B builds the same model in the ModelRisk add-in and then adds the one thing plain Excel handles badly. Both are in a free workbook: download it and follow along. If you want the idea behind the method first, start with what Monte Carlo simulation is and how it works.

What does the worked example model?

A warehouse fit-out with six cost items. For each one the estimator gives a minimum, a most likely value and a maximum, in thousands of euros. Add up the most likely values and the estimate is €2,850k. We want to know how likely the project is to come in at or under that figure, and what budget gives an 80% chance of not overspending.

Cost itemMinimum (€k)Most likely (€k)Maximum (€k)
Design and permits180200260
Groundworks350400560
Structure and envelope9001,0001,300
Mechanical and electrical6007001,000
Fit-out400450600
Commissioning80100160
Total2,5102,8503,880

Every range is lopsided: things can go a lot worse than expected but only a little better. That is typical of cost estimates, and it is the reason the answer below surprises people.

How do you generate random values from a distribution in Excel?

Use RAND() to produce a random number between 0 and 1, then pass it to the inverse of the distribution you want. The inverse turns “a random position between 0 and 1” into a value from that distribution. This is called inverse transform sampling, and it is how simulation software does it too.

Excel has inverse functions for some common distributions:

DistributionExcel formula for one random draw
Uniform between a and b=a+(b-a)*RAND()
Normal=NORM.INV(RAND(),mean,sd)
Lognormal=LOGNORM.INV(RAND(),mu,sigma) (mu and sigma of the log)
PERT (min, most likely, max)=BETA.INV(RAND(),1+4*(m-a)/(b-a),1+4*(b-m)/(b-a),a,b)
Triangular (min, most likely, max)No built-in function: use the formula below

The example uses triangular distributions because they are the easiest three-point estimate to explain. With the random number in cell B2 and the minimum, most likely and maximum in C5, D5 and E5, one draw is:

=IF(B2<(D5-C5)/(E5-C5), C5+SQRT(B2*(E5-C5)*(D5-C5)), E5-SQRT((1-B2)*(E5-C5)*(E5-D5)))

Keep the random number in its own cell, as above. The formula uses it twice, and two separate RAND() calls would give two different numbers and a wrong result. One random number per input per iteration is the rule.

Triangles are simple, but they put a lot of weight near the extremes. For expert estimates, a PERT distribution is usually more realistic, and the BETA.INV row in the table gives it to you in plain Excel.

How do you repeat the calculation thousands of times?

There are two ways, and the workbook uses the first.

One row per iteration. Lay the model out across a row: six random numbers, six cost draws and a total. Then copy the row down 5,000 times. Every row is one possible version of the project. It is transparent, you can inspect any single iteration, and it needs no special features. The workbook's Iterations sheet is built this way.

A Data Table. If the model is too big to fit on one row, keep it where it is and let Excel re-run it:

  1. Type the numbers 1 to 5,000 in a column.
  2. In the cell above and to the right of that column, link to the output cell (for example =Total).
  3. Select both columns and choose Data › What-If Analysis › Data Table.
  4. Leave Row input cell empty and set Column input cell to any blank cell.

Excel recalculates the whole model once per row and stores each output. It works, but it slows the workbook down. Setting calculation to Automatic except for data tables helps, and then you press F9 when you want a fresh run.

Either way, the simulation re-runs every time the workbook recalculates, and the results move slightly each time. That is sampling noise. The next section shows how big it is.

How do you read the results?

Summarise the column of 5,000 totals with ordinary functions: AVERAGE for the mean, PERCENTILE.INC(range,0.8) for the P80, and COUNTIF(range,">"&budget)/5000 for the chance of overspending. A P80 is the value with an 80% chance of not being exceeded. Count the totals into bins with COUNTIFS for a histogram, and the running share below each bin gives the S-curve.

Histogram of simulated total cost from about 2,650 to 3,650 thousand euros, peaking near 3,070. Lines mark the 2,850 estimate on the far left, the 3,080 mean and the 3,197 P80.

ResultValue
Estimate (sum of the most likely values)€2,850k
Mean total cost€3,080k
Chance of spending more than €2,850k96%
P50 (median)€3,074k
P80: budget with an 80% chance of not overspending€3,197k
P90€3,262k
Contingency needed for P80 (P80 minus the estimate)€347k (12%)

The estimate everyone started from has a 96% chance of being exceeded. Nothing in the model is pessimistic: each item's most likely value is exactly what the estimator said. But every range has a longer tail on the high side, so each item's average sits above its most likely value, and the averages add up. The sum of the most likely values is not the most likely total. Our guide to calculating cost contingency works through what to do with that gap, including why you cannot add up line-item P80s: here they sum to €3,349k, well above the real P80.

How many iterations do you need? With 5,000 rows, the P80 moves by only a few thousand euros between runs (we re-ran it 200 times: 95% of runs landed between €3,190k and €3,203k). That is precise enough for a budget decision. Means settle quickly and extreme percentiles need more iterations; how many Monte Carlo iterations you need covers the rule of thumb and the reason behind it.

Where does plain Excel run out?

The plain-Excel version gives the right answer to the question it asks. The trouble is the questions it cannot easily ask:

  • Correlation. Every RAND() is independent. Real cost items often overrun together (a tight labour market or a late design hits several at once), and linking the draws in plain Excel means building a correlation engine by hand.
  • Distributions. Excel has inverse functions for a handful of distributions. Anything else, from triangular upwards, has to be written as a formula.
  • Which input matters? There is no sensitivity analysis. Finding the item that drives the risk means re-running the model with each input fixed in turn.
  • Fitting to data. If you have historical data rather than expert ranges, Excel has no tool to choose and fit a distribution (distribution fitting in Excel shows the manual route and the add-in route).
  • Speed and repeatability. Thousands of rows of formulas get slow as the model grows, and RAND() cannot be seeded, so you cannot reproduce a run exactly.

Correlation is the one that changes the answer. If the six items tend to move together, with a correlation of 0.6, the mean does not change, but the spread widens and the P80 rises from €3,197k to €3,293k. A model that treats the items as independent would under-budget by about €96k, and nothing in its output would warn you.

Two S-curves of total cost. With independent cost items the P80 is 3,197 thousand euros; with items correlated at 0.6 the curve is flatter and the P80 is 3,293.

How do you run the same simulation with an add-in?

A Monte Carlo add-in keeps the model in Excel and supplies the distributions, the simulation engine and the results analysis. In ModelRisk the whole Path A model shrinks to a few cells. Each cost item becomes one formula:

=VoseInput("Groundworks")+VoseTriangle(350,400,560,U)

Here U is a correlated random number from a copula, one array formula across the six items: {=VoseCopulaMultiNormal(CorrelationMatrix)}. The total is marked as the output with =VoseOutput("Total cost")+SUM(...). Then you set the number of iterations (10,000 here) and click Start. ModelRisk runs them without adding a single row to the workbook. The Results Viewer shows the histogram, the S-curve and a tornado chart of which item drives the risk. VoseSimPercentile(Total,0.8) writes the P80 back into a cell for your report.

The workbook's Path B sheet is this model, with the correlation on the Inputs sheet. Run it at 0 and the results match Path A to within sampling noise. Set it to 0.6 and the P80 moves up as described above. From there, try swapping VoseTriangle for VoseModPERT (the PERT shape estimators usually find more realistic), or read the tornado chart to see which item deserves attention first.

ModelRisk is one of several Excel add-ins that do this, some of them free for basic work. Our comparison of the top risk analysis add-ins for Excel covers features and published prices side by side.

What is in the free workbook?

  • Inputs: the six three-point estimates, a budget to test and the correlation setting. Change any of them and both paths update.
  • Path A: plain Excel: the results table, histogram and S-curve, driven by the Iterations sheet (5,000 rows of RAND() and the triangular formula). Works in any version of Excel. Press F9 to re-run.
  • Path B: ModelRisk: the same model in ModelRisk functions, with correlation, and a table of reference results so you can check your run.

Download the Monte Carlo in Excel workbook (.xlsx). It is free and needs no registration. To run Path B, start the free 15-day ModelRisk trial. The trial is fully functional.

ModelRisk logo

ModelRisk

Adding risk and uncertainty to your Excel model

Correlated inputs, 135 distributions, distribution fitting and tornado charts, inside the spreadsheet you already use. Try it free for 15 days.