xellstorm Open the app

Tolerance stack-up analysis: worst case, RSS or Monte Carlo?

Worked example · Mechanical design · Updated October 2026

In this example, adding up all six tolerances (worst case) lets the gap shrink to 0.120 mm, yet RSS predicts that only 3.29% of assemblies fall short of the required 0.4 mm, and a Monte Carlo simulation of 20,000 assemblies finds 3.21%. Worst case tells you whether every assembly is guaranteed to fit; RSS and Monte Carlo tell you how often one will not.

The example is a housing of 100.00 ± 0.10 mm holding five parts with a nominal gap of 0.500 mm. With each tolerance taken as three standard deviations, the root sum of squares (RSS) gives the gap a standard deviation of 0.0544 mm. Under the same normal assumptions, a gap as small as the worst case would occur about once in 730 billion assemblies: in practice, never.

The model

The workbook is a one-sheet tolerance chart named Stack: a housing and five parts stacked end to end inside it, each with a nominal dimension (column B, in mm) and a ± tolerance (column C). Column D, Actual, holds each dimension as built; in the saved file it equals the nominal. The gap in D9 is the housing minus the parts, =D2-SUM(D3:D7), and D10 works out the nominal gap from column B the same way. There are no add-in functions.

For the simulation, each Actual cell (D2 to D7) is a normal distribution with its nominal as the mean and one third of its tolerance as the standard deviation. The tolerance is taken as three standard deviations (3σ), so 99.73% of parts fall within tolerance. The target counts a gap below 0.4 mm as a failure: think of it as the least clearance the assembly needs, for example to leave room for thermal expansion.

The distributions and the target come with the example when you open it in xellstorm. The downloadable file holds only the dimensions, the tolerances and the formulas, as an ordinary tolerance chart would. The standard deviations are typed into the simulation setup rather than linked to column C, so if you change a tolerance in the workbook, change its standard deviation too.

The stack, mm (each dimension normal, tolerance = 3 standard deviations)
DimensionNominalToleranceStd. dev.
Housing100.00±0.100.0333
Part 119.80±0.050.0167
Part 224.60±0.060.0200
Part 315.30±0.040.0133
Part 420.10±0.050.0167
Part 519.70±0.080.0267

Worst case: add up the tolerances

A worst-case (arithmetic) stack assumes every dimension sits at its least favorable limit at once: the housing at its smallest, 99.90 mm, and every part at its largest. The gap’s tolerance is then the sum of the six tolerances, ±0.38 mm, so the gap lies somewhere between 0.120 and 0.880 mm.

That is a guarantee: no assembly built from parts within tolerance can fall outside it. Against the 0.4 mm minimum, though, the design fails on paper. To pass, the tolerances would have to add up to no more than the 0.100 mm between the nominal gap and the minimum; shrinking all of them in proportion takes each to 26% of its value. What the worst case cannot say is how often the gap actually falls short.

RSS: root sum of squares

When dimensions vary independently, their variances add, not their tolerances. With each standard deviation at one third of its tolerance, the gap’s standard deviation is the square root of the sum of the six variances: 0.0544 mm. Equivalently, the RSS tolerance, the square root of the sum of the squared tolerances, is ±0.163 mm, three standard deviations of the gap: 99.73% of gaps fall between 0.337 and 0.663 mm. Read as a ± range, RSS fails the design too, since 0.337 mm is below the minimum.

But RSS can also give a rate. A sum of independent normal dimensions is itself normal, centered on the nominal gap of 0.500 mm, so the chance of a gap below 0.4 mm follows exactly from the normal distribution. The minimum lies 1.84 standard deviations below the nominal gap, and 3.29% of a normal distribution lies further out than that. In the workbook, Excel gives the same number with =NORM.DIST(0.4, D10, SQRT(SUMSQ(C2:C7))/3, TRUE).

That rate rests on assumptions: the dimensions are independent, normal and centered on their nominals, each tolerance is three standard deviations, and the gap is a plain sum.

Monte Carlo: build the assembly 20,000 times

A Monte Carlo simulation builds the assembly over and over: each trial draws the six dimensions from their distributions, recalculates the workbook and records the gap. Of 20,000 simulated gaps, 641 (3.21%) are below 0.4 mm, against the exact 3.29%. The difference is sampling noise: with 20,000 trials, a share near 3.29% is uncertain by about ±0.13 percentage points. That is one standard error of plain random sampling; Latin Hypercube sampling, the default, draws each dimension once from each of 20,000 equally likely slices of its distribution and usually does a little better, and never worse when the result moves only one way with each input, as here. The simulated mean and standard deviation match the RSS values too.

The gap in mm: RSS formula (exact) and 20,000 simulated assemblies
RSS, exactSimulated
Mean gap0.50000.5000
Standard deviation0.05440.0543
Gap below 0.4 mm (the target)3.29%3.21%
Gap below 0.337 mm (RSS limit, 3σ)0.135%0.105%
Gap below 0.120 mm (worst-case limit)1.4 × 10−12none of 20,000
Distribution of the gapHistogram of 20,000 simulated gaps, from 0.287 to 0.719 mm around the nominal 0.500 mm. Bars below 0.4 mm, 3.21% of assemblies, are highlighted; dotted lines mark the worst-case limits, 0.120 and 0.880 mm, far outside every simulated gap.0.200.400.600.803.21% below 0.4 mmWorst case0.120Worst case0.880
Gap in mm. Each bar counts simulated assemblies; bars below 0.4 mm are highlighted. The dotted lines are the worst-case limits: the smallest of the 20,000 simulated gaps is 0.287 mm.

How conservative is the worst case?

Three answers for the same stack (gap in mm)
MethodGap rangeBelow 0.4 mm
Worst case: add the tolerances0.120–⁠0.880can happen (no rate)
RSS: root sum of squares, ±3σ0.337–⁠0.6633.29%
Monte Carlo: all 20,000 trials0.287–⁠0.7193.21%

Very. For the gap to reach 0.120 mm, the dimensions together must come out 0.38 mm on the unfavorable side, which with every part in tolerance means all six at their limits at the same time. Under the same normal assumptions, a gap that small lies 6.99 standard deviations below the nominal gap, and its chance is 1.4 × 10−12: about one assembly in 730 billion. Few real processes follow a normal distribution that far into the tails, and inspection removes parts outside tolerance, so read this only as “practically never”. The simulation says the same in its own way: the smallest of its 20,000 gaps is 0.287 mm.

The guarantee has a price. To meet 0.4 mm by worst case, tolerances shrunk in proportion must come down to 26% of their values; by RSS at 3σ, to 61%, which still leaves 0.135% of gaps below the minimum. Tighter tolerances cost more to machine and to inspect. Whether 3.29% of assemblies below 0.4 mm is acceptable, or worth paying to reduce, is a design decision; the statistical answer shows what you are choosing between.

Which tolerance to tighten first

In a linear stack where every tolerance is 3σ, each dimension’s share of the gap’s variance is its tolerance squared, divided by the sum of the squared tolerances. The housing’s ±0.10 mm makes up 37.6%, Part 5’s ±0.08 mm 24.1%, and Part 3’s ±0.04 mm only 6.0%. Because tolerances enter squared, the largest ones dominate. By the RSS formula, halving the housing tolerance to ±0.05 mm cuts the share of gaps below 0.4 mm from 3.29% to 1.50%, while halving Part 3’s to ±0.02 mm only brings it to 2.99%.

Each dimension’s share of the gap’s variance
DimensionTolerance, mmExact shareApp (simulated)
Housing±0.1037.6%38.0%
Part 5±0.0824.1%24.0%
Part 2±0.0613.5%13.6%
Part 1±0.059.4%9.4%
Part 4±0.059.4%9.3%
Part 3±0.046.0%5.8%

The app’s contribution-to-variance table estimates the same shares from the ranks of the simulated trials: 38.0% for the housing, against the exact 37.6%. In models without a formula for the shares, that table and the tornado chart are how you find the dimension to tighten; see tornado charts and sensitivity analysis.

When Monte Carlo is worth it

RSS and Monte Carlo agree here because the example meets every RSS assumption. The one doing the most work is that each tolerance is three standard deviations of a normal distribution. Suppose instead that the dimensions are spread evenly across their tolerance bands, for example because a cutting tool wears steadily through a batch. Each dimension is then uniform, with a standard deviation of its tolerance divided by √3, 1.73 times the normal one.

Run as a scenario on the same random draws, with every dimension uniform between nominal − tolerance and nominal + tolerance, the simulation puts 14.99% of gaps below 0.4 mm, against 3.21% before. The exact answer for uniform dimensions, from the distribution of a sum of uniforms, is 15.03%. RSS with the uniform standard deviations (0.0942 mm for the gap) gives 14.41%: close, but low, because it still treats the gap as normal, and six dimensions, one of them carrying 37.6% of the variance, do not make it quite normal. The worst case does not move at all: it ignores how the dimensions are distributed.

So for a plain sum of independent dimensions, RSS with the right standard deviations gets close. Monte Carlo earns its place when the stack is less simple: a gap that depends on angles or radii, or on a MAX or IF in the formula; distributions that are skewed or cut off by inspection; dimensions that vary together; or a model that already lives in a spreadsheet. xellstorm recalculates the workbook in every trial, so the gap is whatever the workbook’s own formulas make of the dimensions, not a sum rewritten for the analysis.

Try it yourself

  1. Open the model in xellstorm. The six dimensions are inputs, the gap in D9 is the output and a gap below 0.4 mm is the target; there is nothing to install and no sign-up, and the workbook is calculated in your browser.
  2. Run it: with the same seed and 20,000 trials you get the numbers on this page (the app rounds shares to one decimal, for example 3.2%). Results show the mean gap, the chance of a gap below 0.4 mm and the P10, 0.430 mm, which 90% of assemblies exceed; the percentile table goes down to P1.
  3. Type another minimum into the probability box, such as the RSS limit of 0.337 mm, or hover over the S-curve to read the chance of a gap below any value.
  4. On the Distributions step, add a scenario named “Uniform within tolerance”, change the distribution of each dimension to Uniform with min at nominal − tolerance and max at nominal + tolerance (for the housing, 99.90 and 100.10), and run again: the scenario table compares it with the base case on the same random draws. A second scenario can halve the housing’s sd, from 0.0333 to 0.0167, to see what a tighter housing tolerance buys.
  5. Then open your own tolerance chart, make each dimension a normal input with sd = tolerance / 3 (or the spread your process data shows), and choose the gap as the output.

Can I do this in plain Excel?

Yes. The RSS rate is the single NORM.DIST formula above. For a Monte Carlo simulation, replace each Actual value with a formula such as =NORM.INV(RAND(), B2, C2/3), repeat the calculation a few thousand times with a data table and count the gaps below 0.4 mm with COUNTIF. Monte Carlo simulation in Excel shows how, and what changes when a tool runs the workbook for you.

Questions

What is a tolerance stack-up?

A tolerance stack-up is the calculation of how the tolerances of several parts combine in a dimension that depends on all of them, such as the gap left between a housing and the parts inside it. The three common methods are worst case (add the tolerances), RSS (combine them as independent random variations) and Monte Carlo simulation (build the assembly many times from random dimensions).

What is the difference between worst case and RSS tolerance analysis?

Worst-case tolerance analysis adds the tolerances, so it covers every combination of parts within tolerance but assumes they all sit at their limits together. RSS (root sum of squares) takes the square root of the sum of the squared tolerances: it treats the variations as independent and random, and gives the range that holds 99.73% of assemblies when each tolerance is three standard deviations. For this stack, worst case gives ±0.38 mm and RSS ±0.163 mm.

Why treat a tolerance as three standard deviations?

Treating a tolerance as three standard deviations (3σ) describes a centered, normally distributed process in which 99.73% of parts fall within tolerance, a process capability index (Cp) of 1. A more capable process has a smaller standard deviation and fewer failures. One whose output spreads evenly across the band has more, as the uniform scenario above shows, and one that runs off-center puts more parts outside their tolerance and moves the gap one way or the other. When you have measurements, use the process’s own mean and standard deviation instead.

How many trials does a tolerance simulation need?

A tolerance simulation needs enough trials to count the failures you care about many times over. At about 3.29% below 0.4 mm, 20,000 trials count 641 such gaps and pin the share to within about ±0.13 percentage points (one standard error of plain random sampling; Latin Hypercube sampling, the default, usually does a little better). Failure rates in parts per million need millions of trials, or an exact formula when its assumptions hold.

Can the dimensions be correlated?

Dimensions can be correlated in xellstorm: give a pair a rank correlation on the Distributions step, for example two parts cut from the same bar stock. A positive correlation between two parts widens the spread of the gap, and one between the housing and a part narrows it, because the gap subtracts the parts from the housing. The plain RSS formula assumes independence and misses both effects.

Related

xellstorm is a browser-based Monte Carlo simulation tool for Excel models: no add-in, and the workbook never leaves your computer.