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)
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
- Set the rep count in the sidebar (1–10,000). The Reps field defaults to 1,000; enter any value within the allowed range.
- 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.
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:
- Loads the workbook into the simulation engine.
- Overwrites each assumption cell with a freshly sampled value.
- Recalculates the workbook.
- 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
- While the simulation is running, click Cancel in the progress bar panel.
- 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
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
| Problem | Likely cause | What to try |
|---|---|---|
| Run button is disabled | No assumptions or no outputs configured | Add at least one assumption and one output before running |
| Run fails immediately | Server rejected the rep count | Make sure the rep count is between 1 and 10,000 |
| Run starts but never finishes | Workbook contains circular references or very slow formulas | Simplify the workbook model; reduce rep count to 100 for testing |
| Results show no data | Output cells are empty or contain errors in the workbook | Check that the output cells return valid values without the simulation |
| Server returns a timeout | Workbook is too large or has complex calculations | Reduce the workbook size or remove unnecessary sheets |
Reference
Simulation parameters
| Parameter | Default | Range | Description |
|---|---|---|---|
| Rep count | 1,000 | 1–10,000 | Number of replications to execute |
| Status polling | 1 s | Fixed | How often the frontend polls for job progress |
| Job timeout | 60 s | Fixed | Maximum server-side processing time per run |