Home / Lean Six Sigma / Statistical analysis

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.

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

Histogram of the simulated result

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

Tap the chart to see the values.

Simulation results

Contribution of each input to variation

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

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.

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.

Tap the chart to see the values.

Which input to tighten?

Result × most influential input

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

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.

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.