ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Productivity
  3. Monte Carlo Simulation in Excel With RAND and a Data Table

Monte Carlo Simulation in Excel With RAND and a Data Table

By ExcelReady Team·Updated November 3, 2026·5 min read

The short answer

A Monte Carlo simulation runs a model many times with random inputs to show the range of likely results. In Excel, make each uncertain input random with RAND or NORM.INV(RAND(),mean,sd), use a one-column Data Table to recalculate the model 1,000 times, then summarise the outcomes with AVERAGE, MIN, MAX, PERCENTILE and COUNTIF.

Key takeaways

  • A Monte Carlo simulation replaces one fixed guess with thousands of random trials, so you see a range of outcomes and their chances.
  • =NORM.INV(RAND(),mean,sd) makes a random value from a normal (bell-shaped) distribution. RANDBETWEEN gives random whole numbers.
  • A Data Table with an empty column input cell recalculates the model once per row, giving one trial per row.
  • The share of trials that meet a condition, such as =COUNTIF(results,"<0")/COUNT(results), estimates its probability.
  • Random results change on every recalculation. Paste them as values to keep one run.
On this page+
  1. What a Monte Carlo simulation does
  2. Step 1: Build the model with fixed inputs
  3. Step 2: Make the inputs random with RAND
  4. Step 3: Run 1,000 trials with a Data Table
  5. Step 4: Summarise the results
  6. Step 5: Chart the outcomes
  7. Tips for a reliable simulation
  8. Practise it

A Monte Carlo simulation in Excel runs the same model hundreds or thousands of times with random inputs, then shows you the spread of results. Instead of one forecast ("profit will be 240"), you get a range and its chances ("profit is negative in about 37% of trials"). You build it with RAND, a one-column Data Table and a few summary formulas. This guide is for analysts, students and planners who want to show risk, not just a single number.

What a Monte Carlo simulation does#

A Monte Carlo simulation answers "what could happen, and how likely is it?" It works in three steps:

  1. Model: build a normal formula model, such as profit = units × margin − fixed costs.
  2. Randomise: replace each uncertain input with a random value drawn from a realistic range.
  3. Repeat and summarise: recalculate the model many times, store each result, then look at the average, the extremes and the share of bad outcomes.

Each recalculation is called a trial. One trial is a guess; a thousand trials show a pattern.

Step 1: Build the model with fixed inputs#

Start with a model that works with ordinary numbers. A small business sells about 530 units a month, earns 8 per unit and has fixed costs of 4,000:

AB
1Average units530
2Units std dev90
3Margin per unit8
4Fixed costs4000
5
6Units (this trial)530
7Profit=B6*B3-B4

With 530 units, profit in B7 is 530 × 8 − 4,000 = 240. The std dev (standard deviation) in B2 says how far monthly sales usually stray from the average. The standard deviation guide shows how to calculate it from past data.

Step 2: Make the inputs random with RAND#

Replace the fixed 530 in B6 with a random value. Excel has three useful random functions:

FunctionReturnsExample
RAND()A decimal between 0 and 10.6213…
RANDBETWEEN(bottom,top)A whole number in a range=RANDBETWEEN(400,650)
NORM.INV(RAND(),mean,sd)A value from a normal (bell-shaped) distribution=NORM.INV(RAND(),530,90)

Sales usually cluster around an average, so a normal distribution fits. In B6, type:

Excel formula
=ROUND(NORM.INV(RAND(),B1,B2),0)

RAND gives a random probability, and NORM.INV turns it into the matching number of units. Most results land between about 440 and 620, and only rarely outside that. ROUND keeps the units whole. Press F9 (Mac: ⌘=) and B6 and B7 change each time. That's one new trial per press. The guide to randomising a list explains why RAND changes on every recalculation.

Step 3: Run 1,000 trials with a Data Table#

A one-column Data Table recalculates the whole model once for every row, and stores each result. The trick is to point it at an empty input cell, so the only thing that changes between rows is the random numbers.

  1. In D2:D1001, enter the trial numbers 1 to 1,000. In Excel 2021 or Microsoft 365, type =SEQUENCE(1000) in D2. In older versions, type 1 and use Home > Fill > Series.
  2. In E1, the cell above the first result, link to the output: =B7.
  3. Select D1:E1001.
  4. Go to Data > What-If Analysis > Data Table.
  5. Leave Row input cell empty. In Column input cell, pick any empty cell, such as G1. Click OK.

E2:E1001 now holds 1,000 profits, one per trial. Excel writes the range as {=TABLE(,G1)}, and you can't edit single cells inside it.

A Data Table recalculates every time anything in the workbook changes, which can make a big file slow. Go to Formulas > Calculation Options > Automatic Except for Data Tables. The table then updates only when you press F9 (Mac: ⌘=).

Without a Data Table#

You can also put the random formula straight into each row. In E2, type =ROUND(NORM.INV(RAND(),$B$1,$B$2),0)*$B$3-$B$4 and fill it down to E1001. The $ signs lock the inputs, so every row uses the same B1:B4. Without them, the references slide down as you fill and point at empty cells. In Microsoft 365, one formula can do all 1,000 trials: =ROUND(NORM.INV(RANDARRAY(1000),B1,B2),0)*B3-B4.

Step 4: Summarise the results#

Summary formulas turn 1,000 numbers into an answer. Put these next to the table:

QuestionFormula
Expected (average) profit=AVERAGE(E2:E1001)
Worst and best trial=MIN(E2:E1001) and =MAX(E2:E1001)
Spread of outcomes=STDEV.S(E2:E1001)
Bad-case profit (5th percentile)=PERCENTILE.INC(E2:E1001,0.05)
Chance of a loss=COUNTIF(E2:E1001,"<0")/COUNT(E2:E1001)

With this model, the average lands close to 240, and roughly 37% of trials show a loss, because sales below 500 units don't cover the fixed costs. The 5th percentile sits around −940: in the worst 1 in 20 months, the loss is about that size or bigger. Your exact numbers will differ slightly each run, because the trials are random.

The AVERAGE function guide and the guide to AVERAGE, MIN and MAX cover the basics. For the 5th percentile, see the percentile and quartile guide.

Step 5: Chart the outcomes#

A histogram shows the shape of the results at a glance. Select E2:E1001 and choose Insert > Insert Statistic Chart > Histogram (Excel 2016 or later). You should see a bell shape centred near 240. The histogram guide shows how to set the bin width so the chart reads clearly.

Tips for a reliable simulation#

  • Freeze a run you report. Copy the results and paste them as values (Windows: Ctrl+Alt+V, then V; Mac: ⌃⌘V, then Values). Otherwise the numbers change while someone reads them.
  • Run enough trials. Run the table twice. If the average and the loss chance barely move, you have enough.
  • Use realistic inputs. A simulation is only as good as its ranges. Base the mean and standard deviation on past data, not hope.
  • Keep inputs in cells. Then you can test a higher price or lower costs and rerun in seconds.
  • Check one trial by hand. Press F9, read B6 and work out B7 yourself.

Practise it#

A simulation stands on two basics: summarising a column of results, and locking input cells with $ so a formula can be filled down a thousand rows. Practise AVERAGE, MIN and MAX in a live spreadsheet, then practise relative and absolute references. Each lesson checks your formula instantly. Then try the exercise on this page to turn eight trials into a chance of loss.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Eight trials of a simulation have been pasted as values. Profit is units sold × 8 − 4,000. In F2, work out the share of trials that made a loss: count the profits below 0 in C2:C9 and divide by the number of trials.

fx
ABCDEFG
1
Trial
Units
Profit
2
1
620
960
Chance of loss
3
2
480
-160
4
3
455
-360
5
4
530
240
6
5
710
1680
7
6
390
-880
8
7
505
40
9
8
575
600
10
11
12

Tip: COUNTIF with "<0" counts the losses. COUNT counts all the trials. Divide one by the other.

Practise this in a lesson

LessonAVERAGE, MIN and MAXSummarize a list with its average, smallest and largest values.LessonRelative vs absolute references ($)Lock a cell with $ so it doesn't move when you copy a formula, one of the most-tested Excel skills.Function guideAVERAGECalculate the mean in Excel with AVERAGE. See how it treats blanks and zeros, avoid common errors, and practice in a live sheet.

Frequently asked questions

Can you do a Monte Carlo simulation in Excel?

+

Yes. Make the uncertain inputs random with RAND, RANDBETWEEN or NORM.INV(RAND(),mean,sd), then repeat the model many times with a Data Table or by filling a formula down many rows. No add-in is needed.

How many trials does a Monte Carlo simulation need?

+

There is no fixed number, but 1,000 trials is a common start and 5,000 to 10,000 gives steadier results. Run it twice: if the summary numbers barely change, you have enough trials.

Why do my Monte Carlo results change every time?

+

RAND and the functions built on it are volatile, so they make new numbers whenever Excel recalculates. That is expected. Copy the results and paste them as values to keep one run.

What is the RAND function used for in Monte Carlo simulation?

+

RAND returns a random decimal between 0 and 1. Fed into NORM.INV as a probability, it turns into a random value from a normal distribution with the mean and standard deviation you choose.

How do I stop the Data Table from slowing Excel down?

+

Set calculation to Automatic except for data tables under Formulas > Calculation Options. The table then recalculates only when you press F9 on Windows or Command+= on Mac.

Sources

  • AVERAGE function - Microsoft Support
  • COUNTIF function - Microsoft Support
  • Change formula recalculation, iteration, or precision in Excel - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What a Monte Carlo simulation does
  2. Step 1: Build the model with fixed inputs
  3. Step 2: Make the inputs random with RAND
  4. Step 3: Run 1,000 trials with a Data Table
  5. Step 4: Summarise the results
  6. Step 5: Chart the outcomes
  7. Tips for a reliable simulation
  8. Practise it

Keep reading

Dynamic arrays· 5 min read

How to Randomize a List in Excel With SORTBY

To randomize a list in Excel 2021 or Microsoft 365, use =SORTBY(A2:A11,RANDARRAY(ROWS(A2:A11))). RANDARRAY makes one random number per row and SORTBY sorts the list by them, so the names spill out in a new random order. The order changes on every recalculation, so paste the result as values to keep it.

Math· 5 min read

AVERAGE, MIN and MAX in Excel With Examples

AVERAGE returns the mean of a range, MIN returns the smallest number and MAX returns the largest. All three take the same input: =AVERAGE(B2:B6), =MIN(B2:B6) and =MAX(B2:B6). They skip empty cells and text but count zeros, and =MAX(B2:B6)-MIN(B2:B6) shows how spread out the values are.

Math· 7 min read

How to Calculate Standard Deviation in Excel

To calculate standard deviation in Excel, use =STDEV.S(B2:B7) when your data is a sample, or =STDEV.P(B2:B7) when it covers the whole group you care about. Standard deviation measures how far values typically sit from the average. A small result means the values are close together; a large one means they are spread out.

More on productivity

  • Named Ranges in Excel: Clearer Formulas
  • Excel Pivot Table Shortcuts That Save Time
  • Power Query in Excel for Beginners: What It Does
  • Print an Excel Sheet Neatly: Fit to Page and Titles
  • Protect a Sheet and Lock Cells in Excel
  • Quick Analysis in Excel: Totals, Charts and Formats Fast
All productivity articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free