Home / Lean Six Sigma / ANOVA, regression & simulation

Monte Carlo simulation and tolerance stack-up

Find out how many parts will be out of specification before you build them: the variation of each input becomes the variation of the result, and the page shows which tolerance is worth tightening. You write the equation (e.g. flow = area × stroke × speed) or list the assembly dimensions, enter the mean and spread of each input, and the page draws thousands of virtual parts.

Pre-sizing and estimating tool: results do not replace design, calculations or reports signed by a licensed professional, nor verification against the applicable codes and standards.

CheckRevised 11/03/2026
Model
Examples:
See what was read

Parameters by distribution: normal (mean, standard deviation) · uniform (minimum, maximum) · triangular (minimum, maximum, mode) · lognormal (mean, standard deviation, threshold) · Weibull (shape, scale, threshold) · constant (value).

See what was read

Direction +: the dimension increases the result (e.g. the housing increases the gap); −: decreases it (the parts assembled inside). Tolerance − is the downward variation, unsigned. Normal: the tolerance is ± k σ (3σ = 99.73% of parts); uniform and triangular: the dimension fills the whole range.

Specification of the result
Simulation

The same seed repeats exactly the same numbers; change it to see the variation from one simulation to another.

Cost (optional)

Your inputs stay only on this browser and are not sent anywhere. Untick to delete them.

—Monte Carlo simulation
—

Worst case, RSS and Monte Carlo

How to read: the table compares three ways of adding up the chain tolerances: worst case (all dimensions at their limit at once: safe but expensive), RSS (root sum of squares: assumes deviations offset each other) and Monte Carlo (draws real assemblies). In the chart, each bar is the result range by one method; the vertical lines are the minimum and maximum gap. A bar inside the lines = the assembly complies.

Histogram of the simulated result

Bars = simulated values (red = out of specification); curve = normal with the same mean and standard deviation.

How to read: each bar counts how many simulated parts fell in that range of the result; red = out of specification (dashed lines). The curve is the equivalent normal: if the histogram departs from it (skewness, long tail), trust the percentile-based Ppk. Good: the whole hump between the limits, with room on both sides.

Tap the chart to see the values.

Simulation results

How to read: % out and PPM = share of simulated assemblies outside the specification (PPM = per million), with the simulation’s confidence interval; Pp compares the specification width with the result spread; Ppk also accounts for centering (≥ 1.33 is the usual target). The last table checks that each input was drawn with the requested mean and standard deviation.

Contribution of each input to variation

Share of the result variance that comes from each input; the top one is the most worth controlling.

How to read: each bar is an input (dimension or equation variable) and its length is the share of the result’s variation that comes from it; the bars add up to about 100%. Tightening the tolerance of the top bar does the most to reduce out-of-spec parts; tightening an input with only a few % barely changes anything and only adds cost.

Tap the chart to see the values.

Tornado: effect of each input

Result with each input at its 5th and 95th percentile and the others at their mean; the line is the result with all at their mean.

How to read: the vertical line is the result with every input at its mean. Each bar shows how far the result moves when only that input varies between a low (5%) and a high (95%) value of its range. Wider bars at the top = the inputs that move the result most; the side the bar grows toward shows the direction of the effect.

Tap the chart to see the values.

Sensitivity: what if the standard deviation changes?

Percent out of specification (or result standard deviation) when one input standard deviation goes from 25% to 150% of the current one. Sloped line = input worth tightening; flat = can be loosened.

How to read: the horizontal axis is each input’s standard deviation as a % of today’s (100% = now; 50% = half the variation); the vertical one, the % of parts out of spec. Each line is one input. A line that drops steeply to the left = that tolerance is worth tightening; a flat line = it can be loosened to save money without hurting the result.

Tap the chart to see the values.

Which input to tighten?

How to read: one row per input, from the one that weighs most to the one that weighs least: its contribution to variation, the current tolerance (or standard deviation), the Ppk you would get by halving only that spread and the tolerance that, alone, would bring Ppk to the target (red = tighten; green = may loosen). “Not enough alone” means more than one input must change or the process must be centered.

Result × most influential input

Each dot is a simulated assembly (sample of up to 1,500); the horizontal lines are the specification.

How to read: each dot is a simulated assembly: on the horizontal axis, the drawn value of the most influential input; on the vertical, the result. The horizontal lines are the specification. If the out-of-spec (red) dots appear only at one end of the horizontal axis, limiting that input on that side solves most of the problem.

Tap the chart to see the values.

Simulation convergence

Cumulative mean and percent out of specification at each iteration: when the curves flatten, the number of iterations is enough.

How to read: the horizontal axis is the number of iterations drawn so far; the curves show the mean and the percent out computed up to that point. At first they wobble; once they flatten, more iterations do not change the answer. If the percent-out curve is still going up and down at the end, increase the iterations before deciding.

Tap the chart to see the values.

Next step

Take this page’s results to another calculator with the fields already filled in.

The calculation report gathers this page's inputs, results, equations, assumptions and references, with fields for project, engineer and revision. The full report also includes the charts and interpretations, in color. In the print dialog, choose Save as PDF.

Method, assumptions and references

Equations used

Y⁽ⁱ⁾ = f(X₁⁽ⁱ⁾, …, Xₙ⁽ⁱ⁾), i = 1 … N, each Xⱼ drawn from its distribution (seeded xoshiro128** generator; normal by the polar method)
Stack-up: Y = Σ sⱼ·Xⱼ; worst case: Y₀ ± Σ|sⱼ|·Tⱼ; RSS: Y₀ ± √Σ sⱼ²·Tⱼ²; modified RSS: Y₀ ± 1.5·√Σ sⱼ²·Tⱼ²; normal: σⱼ = Tⱼ/k
% out = count of Y < LSL or > USL / N, Clopper-Pearson CI; Ppk (normal) = min[(USL − ȳ)/3s; (ȳ − LSL)/3s]; Ppk (percentiles) = min[(USL − Y₅₀)/(Y₉₉.₈₆₅ − Y₅₀); (Y₅₀ − LSL)/(Y₅₀ − Y₀.₁₃₅)]
Contribution to variance: rⱼ²/Σr² (r = Pearson correlation between Xⱼ and Y); in a stack-up, sⱼ²σⱼ²/Σ sⱼ²σⱼ²
Sensitivity and optimization: Xⱼ′ = μⱼ + f·(Xⱼ − μⱼ) with the same random draws; f for the target Ppk by bisection

Assumptions and limits

  • Inputs independent of each other; the equation describes the process well in the simulated range (regression or DOE equations only hold inside the region studied).
  • In a stack-up the dimensions are linear (direction ±1 or the coefficient entered); for chains with angles or radii, use equation mode.
  • Sensitivity, tornado and optimization change only the spread of each input around its mean, keeping the shape of the distribution.

Standards and technical documents

  • ASME Y14.5-2018 Dimensioning and Tolerancing; Fortini, E. T. Dimensioning for Interchangeable Manufacture. Industrial Press, 1967
  • Bender, A. Statistical tolerancing as it relates to quality control and the designer. SAE Transactions 77, 1968
  • JCGM 101:2008 Evaluation of measurement data — Supplement 1 to the GUM: Propagation of distributions using a Monte Carlo method
  • ISO 22514-2:2017 Statistical methods in process management — Capability and performance — Part 2
  • Blackman, D.; Vigna, S. Scrambled linear pseudorandom number generators. ACM TOMS 47(4), 2021 (xoshiro128**)
  • Creveling, C. M. Tolerance Design: A Handbook for Developing Optimal Specifications. Addison-Wesley, 1997

U.S. regulations

  • ISO 286-1:2010 (ISO code system for tolerances on linear sizes)
  • IATF 16949:2016, 8.3: design and development (special characteristics)

Frequently asked questions

What is Monte Carlo simulation?

Drawing the input values (diameters, lengths, temperatures) thousands of times, each from its distribution, computing the result for each draw and counting how many fall outside the specification. With 100,000 iterations, the percent out is estimated precisely without building a single part.

What is the difference between worst case, RSS and Monte Carlo?

Worst case adds all tolerances, as if every part came at its limit at the same time: it guarantees 100% but requires tight tolerances. RSS assumes independent, normal dimensions and adds the squares. Monte Carlo uses each dimension’s distribution and gives the actual percentage of assemblies out. In the bearing stack example, worst case gives ±0.45 mm (fails) and RSS ±0.24 mm (passes).

How do I write the equation?

Use the names in the inputs table, + − * / ^, parentheses and functions such as sqrt, exp, ln, log, sin and cos. Example: Flow = pi*(D/2)^2*L*RPM. Separate arguments with commas, as in max(A, B). The page interprets the equation without running code.

Which distribution should I choose for each input?

Normal when the dimension comes from a controlled process (mean and standard deviation from capability). Uniform when you only know the part is within tolerance. Triangular when there is a most likely value. Lognormal or Weibull for positive-only, skewed quantities such as times and roughness.

Why Ppk from percentiles?

Because the result of a nonlinear equation is rarely normal. Ppk from percentiles (ISO 22514) uses the median and the 0.135% and 99.865% percentiles of the simulated values, without assuming the normal curve. For normal results the two calculations agree.

How do I know which tolerance to tighten?

Look at the contribution to variation and the "Which input to tighten?" table. In the piston pump, stroke length (L) accounts for about 90% of the flow variation: tightening the diameter barely helps. The table shows the standard deviation needed on each input to reach the target Ppk and which ones can be loosened.

How many iterations should I use?

100,000 is enough in most cases. The rule is to have at least 100 results out of specification so the percent out has a 10% error. If no part falls out, the actual PPM is below 3 divided by the number of iterations; use Ppk. The same seed repeats exactly the same numbers.