Home / Science / Engineering / Mechanical engineering / Tolerance stack-upTool #646

Tolerance stack-up calculator: worst case, RSS and Monte Carlo with fallout, Cp and Cpk

Add up a chain of dimensions with plus and minus tolerances and directions to find the gap: worst case, root sum of squares (RSS) and a seeded Monte Carlo simulation with normal, uniform or triangular parts. Get the share of variance from each part, the fraction of assemblies outside the gap limits, and Cp and Cpk, with a histogram. Paste the chain or open a CSV or Excel file.

Keep it one tap away for everyday use.

Bookmark Tolerance stack-up?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Chain
  2. Worst case
  3. RSS
  4. Simulate
Nothing is uploadedWorks offline once open

Dimension chain

Walk round the loop from one side of the gap to the other: dimensions that make the gap bigger are +, those that make it smaller are −. The minus tolerance is how far below nominal the lower limit is (0.12 means −0.12); leave it empty for an equal ± tolerance. Distribution says how parts spread inside their limits: normal (most near the middle, the limits at ±3σ), uniform (anywhere in the band equally) or triangular. The example is a made-up shaft assembly.

The gap limits are what the assembly needs (for example a clearance between 0.05 and 0.40). k = 3 assumes each normal part's tolerance covers ±3 standard deviations of its process. The seed makes the simulation repeatable; change it to draw a different random set.

Stack-up

Share of variance shows which parts drive the spread: tightening the biggest share helps most.

Download

What it does

When parts are put together, their size variations add up. A tolerance stack-up follows a chain of dimensions round a loop to find how big a gap (a clearance, an overlap, an end float) can be. This tool works it out three ways:

  • Worst case: every part at its limit at the same time. Safe, but often very pessimistic.
  • RSS (root sum of squares): treats the parts as independent random variables, so their standard deviations add as √(Σσ²). Much closer to what a production line actually sees.
  • Monte Carlo: builds 10,000 to 500,000 virtual assemblies with each part drawn from its distribution, and counts how many fall outside your gap limits.

It also shows each part’s share of the variance (what to tighten first), the fraction outside the limits, simulated and from a normal model, and the capability indices Cp and Cpk.

How to use it

  1. Put one dimension per row: name, nominal, plus tolerance, minus tolerance, direction and distribution. Paste from a spreadsheet, type, or use Open a file for CSV or Excel.
  2. Direction: walk round the loop from one face of the gap to the other. A dimension that makes the gap bigger is +; one that makes it smaller is −.
  3. Tolerances: the plus value is how far above nominal the upper limit is; the minus value is how far below nominal the lower limit is. Leave the minus empty for an equal ± tolerance. Unequal tolerances shift the middle of the band, and the tool uses that middle.
  4. Distribution: normal for parts from a steady process (the limits at ±k σ, usually 3); uniform when any size in the band is equally likely (bought-in parts sorted to a tolerance, or a worn tool); triangular in between.
  5. Give the gap limits the design needs, the number of samples and a seed.

Worked example

A made-up shaft assembly: the gap is a housing bore depth of 60 ± 0.10 (+) minus a spacer 20 ± 0.05, a bearing 15 +0/−0.12 (uniform), a gear hub 24.5 ± 0.08 (triangular) and a circlip 0.3 ± 0.02, all −. The nominal gap is 0.2, but the bearing’s one-sided tolerance moves the middle of the gap to 0.26.

  • Worst case: ±0.31, so the gap could be anywhere from −0.05 (interference) to 0.57.
  • RSS: σ = 0.06083, so ±3σ = ±0.1825, from 0.077517 to 0.44248.
  • Monte Carlo (100,000 assemblies, seed 1): mean 0.26, and about 0.928 % fall outside the limits of 0.05 to 0.40, almost all of them above 0.40. The normal estimate is 1.1 %, with Cp = 0.959 and Cpk = 0.767.

The bearing (32 %) and housing (30 %) give most of the variance, so tightening either is the best first step.

Tips

  • Check the loop closes: the nominal gap should match the drawing.
  • A Cpk below 1 means a noticeable fraction of assemblies will not fit. 1.33 or more is a common aim.
  • The simulated and normal-model fallout differ when uniform or triangular parts dominate, because their sum has thinner tails than a normal curve.

FAQ

Which result should I design to? Worst case where any failure is unacceptable or numbers are small; RSS or Monte Carlo for high-volume production where processes are in control.

Why does the simulation change when I change the seed? Each seed draws a different random set. Bigger samples change less.

Does it handle angles or 3D stacks? No. It is a one-dimensional (linear) stack. Geometric tolerances such as position or flatness need converting to an equivalent ± along the stack direction first.

Where the numbers come from

  • Worst-case and root-sum-square (RSS) tolerance analysis and Monte Carlo tolerance simulation as described in standard texts on dimensioning and tolerancing (for example Fischer, Mechanical Tolerance Stackup and Analysis), methods only.
  • Standard deviations of uniform (h/√3) and triangular (h/√6) distributions, the normal tail probability, and the process capability indices Cp and Cpk are standard statistics.
  • The example assembly is made up. Random numbers come from a small seeded generator (mulberry32) so a run can be repeated.
  • Checked against an independent NumPy simulation (2 million draws with numpy.random.default_rng) and against scipy.stats.norm for the normal fallout.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Uncertainty propagation calculator #25 Type your formula and your measurements with their uncertainties, or paste repeated readings. Get the result with its uncertainty, which input matters most, and a Monte Carlo check. Bolt preload and torque #642 Work out the tightening torque for a target bolt preload (or the preload a torque gives) with the nut factor T = K F d or the thread and under-head friction split, the tensile stress area of ISO metric or UNC/UNF threads from the pitch, the bolt and clamped-part stiffness, the joint constant, the separation load and safety factors, with a joint diagram. Shaft and bearing life #645 Work out a rolling bearing's L10 life in revolutions and hours from its rating C and the equivalent load P = X Fr + Y Fa (your catalogue values), adjusted for reliability and aISO, or the C you need for a target life. Size a solid round shaft for combined bending and torsion in fatigue (DE-Goodman with your endurance limit) and statically (von Mises and maximum shear), or check the safety factors of a given diameter. Beam deflection calculator #641 Solve a simply supported, cantilever, fixed-fixed, propped, overhanging or continuous beam under any mix of point loads, uniform or sloping distributed loads and applied moments. Get the support reactions, shear force and bending moment diagrams, the deflected shape and largest deflection, and the bending and shear stress for a rectangle, round bar or tube, I-beam built from plates, or your own I and c. Gear train and belt drive #643 Work out the speeds, directions, torques and power of each shaft in a simple, idler or compound gear train with mesh efficiencies and centre distances; solve a planetary gear set with the Willis equation (any member held or driven, assembly checks, torque split); and find the belt length, wrap angles and driven speed of an open or crossed belt drive, or the centre distance for a belt length. Spring designer #644 Design a round-wire helical spring. Compression: rate, Wahl-corrected shear stress, solid height and force for four end types, buckling limit and surge frequency. Extension: initial tension, hook bending and torsion stresses. Torsion: rate per turn and per degree, bending stress and the coil diameter under load. You enter the material values; examples are labelled.