Skip to main content

Running simulations

A simulation run executes the Monte Carlo model you configured: for each replication, the engine samples new values for every assumption, overwrites the corresponding cells in the workbook, recalculates, and records your output cells. After all replications finish, you view the distribution of results for each output.

The overall workflow is configure assumptions → set rep count → run → view results. This page covers running a simulation and what happens while it executes.

Core concepts

Replication (rep) — one complete pass through the model. The engine draws one random value per assumption, recalculates the workbook, and records each output. A single rep produces one data point per output.

Iteration — another name for a replication. The two terms are used interchangeably.

The more reps you run, the more stable your statistics become. A small number of reps (100–1,000) gives you a rough picture. Larger numbers (5,000–10,000) produce smoother histograms and more reliable percentiles.

Before you run

Make sure you have:

  • At least one assumption configured
  • At least one output configured
  • A rep count set in the Reps field (default: 1,000)
note

Simulation runs are asynchronous. The server accepts your request immediately, processes it in the background, and the results panel updates automatically when the run completes.

Starting a run

  1. Set the rep count in the sidebar (1–10,000). The Reps field defaults to 1,000; enter any value within the allowed range.
  2. Click Run in the header. The server uploads your workbook and config, creates a simulation job, and starts processing.

After you click Run, the Progress indicator appears in the results panel showing the current status.

Progress indicator

A progress bar appears while the simulation runs. Pocketstats polls the job status every second, updating the bar as reps complete. Large rep counts (5,000–10,000) may take several seconds to finish, so the progress bar lets you monitor the run without leaving the page.

tip

Use 1,000 reps for quick exploration. Use 5,000–10,000 for stable statistics when presenting results.

What happens server-side

During each replication, the server:

  1. Loads the workbook into the simulation engine.
  2. Overwrites each assumption cell with a freshly sampled value.
  3. Recalculates the workbook.
  4. Records the values of each output cell.

After all replications complete, the server compiles the results and sends them back to the browser for visualization.

Viewing results

After the simulation finishes, the results panel displays the distribution of values for each output. See Results for how to interpret histograms, summary statistics, and the Pr(x < X) interactive line.

Cancelling a run

  1. While the simulation is running, click Cancel in the progress bar panel.
  2. The server stops the job and discards partial results. No data is saved.

Cancelling is useful when you spot an error in your assumptions, need to adjust the workbook, or started with too many reps by mistake.

Rep count limit

warning

The maximum rep count is 10,000 per run and is enforced server-side. If you submit a value above the limit, the server rejects the run with an error.

Troubleshooting

ProblemLikely causeWhat to try
Run button is disabledNo assumptions or no outputs configuredAdd at least one assumption and one output before running
Run fails immediatelyServer rejected the rep countMake sure the rep count is between 1 and 10,000
Run starts but never finishesWorkbook contains circular references or very slow formulasSimplify the workbook model; reduce rep count to 100 for testing
Results show no dataOutput cells are empty or contain errors in the workbookCheck that the output cells return valid values without the simulation
Server returns a timeoutWorkbook is too large or has complex calculationsReduce the workbook size or remove unnecessary sheets

Reference

Simulation parameters

ParameterDefaultRangeDescription
Rep count1,0001–10,000Number of replications to execute
Status polling1 sFixedHow often the frontend polls for job progress
Job timeout60 sFixedMaximum server-side processing time per run