MRMaschinenbaurechnerEngineering calculation tools

Tolerance stackup with Monte Carlo simulation

Calculate the closing dimension of a linear dimension chain using three methods: arithmetically as a guaranteed worst case, statistically via root sum of squares, and numerically via Monte Carlo simulation with selectable distributions, ppm evaluation and per-member contribution analysis.

Chain members

NameNominal (mm)Lower deviationUpper deviationDirectionDistribution

Formulas and fundamentals

The closing dimension s of a linear dimension chain is the signed sum of its members: s = Σ aᵢ·xᵢ with the direction factor aᵢ = +1 for members that increase the closing dimension and aᵢ = −1 for members that decrease it. For members with negative counting direction, the lower and upper deviations swap roles and change sign – the most common mistake in manual calculations. Each member yields the tolerance width Tᵢ = Aoᵢ − Auᵢ and the mean dimension Cᵢ.

The arithmetic calculation (worst case) assumes that all members sit at their most unfavourable tolerance limit simultaneously. The deviations in counting direction are simply summed, and the closing tolerance is the sum of all individual tolerances: Tₐ = Σ Tᵢ. The result gives guaranteed limit dimensions and thus full interchangeability, but with a growing number of members the individual tolerances quickly become uneconomically tight.

The statistical calculation exploits the fact that random deviations of uncorrelated members partially cancel out: the variances add up, σs² = Σ σᵢ². The standard deviation of each member follows from its tolerance width and distribution type: normal distribution with ±3σ coverage σ = T/6, rectangular distribution σ = T/√12, symmetric triangular distribution σ = T/√24. The statistical closing tolerance is Tₛ = k·σs; with k = 6 it corresponds to 99.73 % coverage. If all members are normally distributed, the calculation collapses to the well-known root formula Tₛ = √(Σ Tᵢ²). The reduction factor r = Tₛ/Tₐ shows the gain; for n equal tolerances r = 1/√n.

The Monte Carlo simulation draws random values for each member according to its distribution, evaluates the chain many times and returns mean, standard deviation, quantiles and a histogram of the closing dimension. If specification limits are set, the fraction outside is counted directly and reported in ppm – including an uncertainty band, since the resolution of the simulation is 1/n. The calculator uses a deterministic random number generator (mulberry32) with an adjustable seed, so identical inputs always produce identical results.

The contribution analysis shows which member dominates the scatter of the closing dimension: analytically as the variance share σᵢ²/σs², and from the simulation as the squared correlation coefficient between member and closing dimension. For linear chains both values agree. If the closing tolerance must be reduced, tighten the member with the largest contribution first – measures on members with small contributions are wasted effort.

Worked example

Five-member gearbox shaft chain: an internal dimension of 44.8 ± 0.02 faces four subtractive members of 23.8 (−0.02/0), 3.5 (±0.01) and twice 8.7 (0/+0.02). The nominal closing dimension is 0.1 mm with deviations of −0.07/+0.05 in counting direction, i.e. limit dimensions from 0.03 to 0.15 mm and an arithmetic closing tolerance of 0.12 mm.

Statistically, with all members normally distributed, Tₛ = √(0.04² + 4·0.02²) = 0.0566 mm – the statistical range only spans 0.0617 to 0.1183 mm. The reduction factor of 0.47 means the statistically expected closing tolerance is less than half the worst-case value. The Monte Carlo cross-check confirms the result with a mean of 0.090 mm and σ = 0.0094 mm. Read the other way round, the individual tolerances may be considerably coarser under statistical tolerancing – that is the cost argument for statistical tolerance analysis.

Frequently asked questions

When may I tolerance statistically instead of arithmetically?

When the members are uncorrelated (no shared fixture or tooling), the chain is linear, it comprises at least about four members, no single member dominates the scatter, and the distributions are approximately known and symmetric. The calculator checks member count and dominance automatically and warns when prerequisites are violated – it still calculates, but the judgement remains with the user.

Which distribution should I choose for a chain member?

Normal distribution (T = ±3σ) for machining without systematic influences, rectangular distribution for tool-bound dimensions with drift such as injection moulding, stamping or tool wear, triangular distribution as an intermediate form, e.g. with regular tool corrections. If the production distribution is unknown, the rectangular distribution is the safe choice, as it scatters the most (σ = T/√12).

Why does the Monte Carlo ppm differ from the analytic ppm?

The analytic ppm estimate assumes an exactly normally distributed closing dimension. If the chain contains rectangular or triangular members, the real closing distribution has hard-bounded, thinner tails – the simulation then counts fewer exceedances than the normal approximation predicts. Exactly this difference can decide the economics of a tolerance allocation.

How many simulation runs do I need for a reliable ppm statement?

The resolution of the simulation is 1/n: with 100,000 runs, fractions down to about 10 ppm can be resolved; statements in the 1 ppm range require at least one million runs. The calculator therefore reports an uncertainty band from binomial statistics alongside the counted ppm – quoting ppm finer than the resolution would be misleading.

Why does the calculator always return the same result for identical inputs?

The simulation uses a deterministic pseudo-random number generator with a fixed default seed. This makes results reproducible and traceable, e.g. for inspection reports. The dice button draws a new seed to check the stability of the results against different random sequences.

What happened to DIN 7186?

DIN 7186 part 1 (statistical tolerancing, 1974) was withdrawn without replacement, and part 2 never advanced beyond draft status. The underlying mathematics – error propagation, central limit theorem, Monte Carlo method – is standard knowledge independent of any standard and lives on in textbooks and company guidelines such as the Bosch booklet on statistical tolerancing. No standard needs to be purchased for the calculation itself.

Related tools