How to Choose the Best Order Quantity in an Excel Monte Carlo Simulation
Question details
The user wants to find the optimal order quantity for inventory when variables like demand, costs, and salvage value are uncertain using a Monte Carlo simulation.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Determining the best inventory order quantity for a business under uncertain market conditions by setting up and comparing multiple simulation runs.
- Observed behavior
- Evaluating profit distribution across various potential order quantities by relying on randomized statistical modeling.
Ensure you have your historical data or estimated mean and standard deviation for demand, purchase cost, selling price, and salvage value organized in your worksheet before building the simulation.
Set Up Robust Demand and Salvage Formulas
Use specific mathematical and logical functions to ensure your simulated demand and salvage values reflect realistic business constraints.
A reliable Monte Carlo simulation requires realistic inputs. Since you cannot order a fraction of a vehicle or product, simulated demand should always be rounded to a whole number.
Additionally, salvage value calculations must properly account for unsold inventory only when the ordered quantity exceeds actual demand.
In your demand calculation cell, use the formula =ROUND(NORM.INV(RAND(), Mean_Cell, StdDev_Cell), 0). This forces the normally distributed random variable into a whole integer.
Enter a conditional formula to calculate salvage income. For example, use =IF(Demand_Cell < Order_Limit_Cell, ROUND((Order_Limit_Cell - Demand_Cell) / 2, 0), 0) * Salvage_Price_Cell to accurately reflect liquidating unsold stock.
Run the simulation across multiple possible order quantities using a Data Table. Compare the average profit of each order quantity iteration rather than relying on a single simulation run.

Isolate and Freeze Random Number Generators
Prevent your simulation from recalculating continuously by storing RAND results in a separate, manageable range.
Run Complex Monte Carlo Simulations Easily in WPS Spreadsheet
WPS Office offers robust statistical functions and native What-If Analysis tools to help you simulate demand and optimize order quantities effortlessly without advanced programming.
- 1. Prepare your variables: Open your dataset in WPS Spreadsheet and define your mean, standard deviation, and cost variables in a dedicated input section.
- 2. Apply statistical formulas: Use the highly compatible =ROUND(NORM.INV()) function to generate realistic, integer-based demand scenarios.
- 3. Generate a Data Table: Navigate to the Data tab, select 'What-If Analysis', and utilize 'Data Table' to run hundreds of iterations across different order quantities.
- 4. Analyze the distribution: Use WPS Spreadsheet's built-in charting tools to visualize your profit distribution and easily identify the optimal order quantity.

Frequently Asked Questions
Why do my Monte Carlo simulation results change every time I edit a cell?
Spreadsheet software automatically recalculates volatile functions like RAND() upon any cell edit. To stop this, you can switch calculation options to 'Manual' under the Formulas tab, or isolate your RAND() formulas and paste them as values to freeze the results.
What does the NORM.INV function do in an inventory simulation?
The NORM.INV function calculates the inverse of the normal cumulative distribution. By pairing it with a random probability, it generates a normally distributed random variable, making it ideal for simulating realistic, unpredictable market demand.
Can I run a Monte Carlo simulation without using macros or VBA?
Yes, you can build highly effective Monte Carlo simulations using standard spreadsheet functions like RAND() and NORM.INV() combined with native Data Tables for What-If Analysis, eliminating the need for complex VBA programming.




