# Monte Carlo Simulation Builder

Define input distributions (normal/uniform/lognormal/triangular), write a formula, run thousands of trials, and get the output distribution histogram with confidence intervals.

> Canonical page: https://test.elysiatools.com/en/tools/monte-carlo-simulation-builder

- **Category:** Data Analysis

- **Keywords:** monte carlo, simulation, probability, distribution, normal, uniform, lognormal, triangular, confidence interval, risk, forecast, random

## Overview

Build custom Monte Carlo simulations by combining random inputs (normal/uniform/lognormal/triangular), a formula over variable names, and N trials. Returns histogram, mean/median/std, confidence intervals and P(outcome>0).

## Inputs

- **Distributions (one per line: name = type \[params\])** (textarea): Declare each random input. Types: normal \[mean, sigma\], uniform \[min, max\], lognormal \[mu, sigma\], triangular \[a, b, c\].
- **Output formula** (text): Arithmetic expression over the variable names. Supports + - * / % ^, parentheses, abs/sqrt/exp/log/min/max/pow, PI, E.
- **Number of trials** (number): How many samples to draw. More trials → smoother histogram (100 – 200000).
- **Random seed (optional, for reproducibility)** (text): A fixed seed makes results reproducible run-to-run. Leave blank for a fresh random draw.
- **Confidence level (%)** (number): Confidence interval percentile band (50–99.9%). Default 90% → P5–P95.

## When to use

- When forecasting business revenue, project costs, or investment returns that involve uncertain variables.
- When you need to calculate the probability of a specific outcome, such as a project exceeding its budget or falling below a target profit.
- When analyzing physical or engineering systems where inputs have known measurement tolerances or noise distributions.

## How it works

- Define your input variables by specifying their probability distribution types (normal, uniform, lognormal, or triangular) and parameters.
- Enter an arithmetic formula using your defined variables, supporting standard operators, parentheses, and mathematical constants like PI and E.
- Set the number of simulation trials and optionally provide a random seed to ensure reproducible results.
- Run the simulation to generate a detailed histogram, statistical metrics (mean, median, standard deviation), confidence intervals, and the probability of a positive outcome.

## Use cases

- Estimating project profit margins by modeling uncertain revenues and variable operational costs.
- Calculating the area of geometric shapes or physical outputs when dimensions have measurement tolerances.
- Assessing financial risk by simulating portfolio returns with lognormal asset price distributions.

## Frequently asked questions

### What probability distributions are supported?

You can use normal, uniform, lognormal, and triangular distributions to model your input variables.

### How do I write the output formula?

Use standard arithmetic operators (+, -, *, /, %, ^), parentheses, and functions like abs, sqrt, exp, log, min, max, or pow, along with constants like PI and E.

### Can I make my simulation results reproducible?

Yes, by entering a value in the optional random seed field, the generator will produce the exact same sequence of random trials every time.

### What is the maximum number of trials I can run?

You can run up to 200,000 trials per simulation for highly accurate and smooth distribution curves.

### What statistics does the tool calculate?

The tool outputs the mean, median, standard deviation, a custom confidence interval range, and the probability of the outcome being greater than zero.

## Related tools

- [General Statistics Calculator](https://test.elysiatools.com/en/tools/general-statistics-calculator): Paste one or two columns of numbers and get the complete descriptive suite — mean/median/mode, sample and population variance, type-7 quartiles and percentiles, MAD, adjusted skewness and kurtosis, Tukey outliers — plus covariance, Pearson r, tie-corrected Spearman rho and least-squares regression for two columns.
- [A/B Test Significance Calculator](https://test.elysiatools.com/en/tools/ab-test-significance-calculator): Compute conversion-rate or mean differences, 95%/99% confidence intervals, two-sided p-values (Z-test for proportions, Welch t for continuous metrics), lift, sample size for 80%/90% power, recommended experiment days, plus sequential-testing and Bonferroni multiple-comparison warnings.
- [PDF QR Barcode Labels](https://test.elysiatools.com/en/tools/pdf-qr-barcode-labels): Batch generate printable labels with QR code and barcode in a single PDF
- [Time Series Anomaly Detector](https://test.elysiatools.com/en/tools/time-series-anomaly-detector): Upload CSV or JSON time series data, detect anomalies with Z-Score and IQR methods, and return a chart-backed report
- [Normal Distribution Plotter](https://test.elysiatools.com/en/tools/normal-distribution-plotter): Plot a normal-distribution bell curve as SVG with z-score markers, interval or tail-probability shading, and 68/95/99.7 standard-deviation bands.
- [APACHE II Score Calculator](https://test.elysiatools.com/en/tools/apache-ii-score): Calculate the APACHE II (Acute Physiology and Chronic Health Evaluation II) ICU severity score. APACHE II = Acute Physiology Score (12 variables, each 0–4 using the worst value in the first 24 h) + Age points (0–6) + Chronic Health points (0/2/5). Range 0–71; higher scores indicate worse prognosis. Oxygenation uses the A-a gradient when FiO₂ ≥ 0.5, otherwise PaO₂. Creatinine points are doubled when acute renal failure is indicated. GCS contributes 15 − GCS. Also reports the base-model predicted mortality: R = 1/(1 + e^(−logit)), logit = −3.517 + 0.146 × score (diagnostic-category weight not included). Thresholds cross-verified against Knaus 1985 (Crit Care Med) and the SFAR scoring table. Not a substitute for clinical judgement. Not medical advice.
- [Confidence Interval Calculator](https://test.elysiatools.com/en/tools/confidence-interval-calculator): Calculate confidence intervals for a sample mean or proportion using either raw data or summary statistics
- [Convolution Integral Calculator (Numeric)](https://test.elysiatools.com/en/tools/convolution-integral-calculator): Numeric (f*g)(t) = ∫ f(τ)g(t−τ)dτ by composite Simpson, in causal or direct-window mode, at up to 8 output points.

## Samples

- [Android Image Processing Java Samples](https://test.elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://test.elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
- [Web Image Processing Python Samples](https://test.elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Web Image Processing Rust Samples](https://test.elysiatools.com/en/samples/web-image-processing-rust): Web Rust image processing examples including image read/save, scaling, and format conversion
