Tolerance Stack Up Calculator

A tolerance stack up calculator adds the tolerances of every part in a chain to find how far the gap between two features can vary. In the example below, four parts leave a gap that averages 1.245 mm and ranges from 0.950 to 1.540 mm in the worst case, or 1.086 to 1.404 mm by root sum square (RSS). Replace the four rows with your own parts: the nominal size and the tolerances of each part, and whether it adds to the gap or takes from it.

The chain, in order around the loop. Sizes and tolerances in the unit chosen below. Enter both tolerances as positive numbers: 0.25 and 0 means +0.25 / −0.
PartNominal sizePlus tol.Minus tol.DirectionRemove
4 links, gap in mmWorst case 0.950 to 1.540

RSS 1.086 to 1.404 (meets the requirement). Average gap 1.245 mm (drawing nominals alone give 1.000).

MethodGap rangeHalf-widthResult
Worst case0.950 to 1.540 mm±0.295Misses
RSS1.086 to 1.404 mm±0.159Meets
Modified RSS (×1.5)1.006 to 1.484 mm±0.239Meets

Required gap: 0.500 to 1.500 mm. Largest contributor: Housing bore depth (62% of the squared total).

What a stack up analysis tells you about an assembly

A stack up analysis takes the dimensions that sit in one chain between two features and works out the range of the gap between them. Wikipedia's tolerance analysis article says that arithmetic stackups "use the worst-case maximum or minimum values of dimensions and tolerances" and that a worst-case design "guarantees 100 percent of the parts will assemble and function properly". It describes the statistical alternative as one that "predicts a distribution that describes the assembly variation, not the extreme values of that variation".

Those two sentences are the whole choice behind the calculator. Worst case answers the question "what if every part is as bad as the drawing allows, in the worst direction". RSS answers "how are the gaps spread if the parts vary independently". The first is a limit and the second is a prediction, and the rest of this page is about how to tell which one your assembly needs.

Filling in the chain: size, tolerances and direction

Pick a start feature and an end feature, and list every dimension you pass through to get from one to the other. Each row of the calculator is one dimension. The nominal size is the number on the drawing, the plus tolerance is how far the part may be larger than nominal, and the minus tolerance is how far it may be smaller. Both are entered as positive numbers, so a size of 14 +0 / −0.12 has a plus tolerance of 0 and a minus tolerance of 0.12.

The direction decides the sign. A dimension that makes the gap bigger when it grows is a plus, and one that makes the gap smaller when it grows is a minus. In the default example the housing depth is a plus, because a deeper housing leaves more room, and the two bearings and the spacer are minus links because each one fills part of that depth. The gap is the sum of the plus nominals minus the sum of the minus nominals, and a negative gap means interference. Atlas of Engineering notes that signs and sensitivities are assigned by the engineer, and lists assigning the wrong sign as a common source of stack up errors.

The two optional fields turn the result into a pass or fail. Enter the smallest and the largest gap the assembly can accept, and each method is marked as meeting or missing that requirement. The mean-shift field is explained in the modified RSS section below. The calculator handles one-dimensional chains only, where every dimension lies along the same line.

The default example worked by hand

The table lists the four parts of the default chain and what the calculator does with each. The midpoint is the nominal plus half the difference between the plus and minus tolerance, and the half-width is half their sum. The last column is the half-width squared, which is what RSS adds up.

Default chain, millimetres. Illustrative parts, not from a catalogue. Midpoint = nominal + (plus − minus) ÷ 2. Half-width = (plus + minus) ÷ 2.
PartDir.NominalToleranceMidpointHalf-widthHalf-width²
Housing bore depth+37.00+0.25 / −0.0037.125±0.1250.015625
Bearing 1−14.00+0.00 / −0.1213.940±0.0600.003600
Spacer−8.00+0.05 / −0.058.000±0.0500.002500
Bearing 2−14.00+0.00 / −0.1213.940±0.0600.003600

The drawing nominals give a gap of 37.00 − 14.00 − 8.00 − 14.00 = 1.00 mm. The midpoints give 37.125 − 13.940 − 8.000 − 13.940 = 1.245 mm, which is where the gap sits on average if every part lands in the middle of its band. Three of the four parts are one-sided, and that is why the average gap is 0.245 mm larger than the drawing nominals suggest.

The worst-case half-width is the sum of the four half-widths, 0.125 + 0.060 + 0.050 + 0.060 = 0.295 mm, so the gap runs from 1.245 − 0.295 = 0.950 mm to 1.245 + 0.295 = 1.540 mm. The RSS half-width is the square root of the sum of the last column, √0.025325 = 0.159 mm, giving 1.086 to 1.404 mm. With a requirement of 0.5 to 1.5 mm, the worst case misses the upper limit by 0.040 mm, and RSS passes with 0.096 mm to spare. Whether that RSS pass can be believed depends on the conditions in the section on RSS below.

The housing depth is the dominant link. Its half-width squared is 0.015625 out of 0.025325, which is 62% of the RSS total, so it is the first tolerance to look at if the stack needs to shrink.

Unilateral tolerances: why the average gap moves

The worst-case and RSS formulas assume each dimension is a bilateral value, the same amount either side of a centre. A one-sided tolerance has to be converted first. Wevolver's guide to worst case versus RSS gives the rule with an example: a hole specified 10.0 +0.3/−0.0 becomes 10.15 ± 0.15, and bilateral tolerances around a shifted nominal are the only form the formulas accept. The new nominal is the midpoint of the two limits, and the new tolerance is half the spread between them.

This conversion changes the answer, not just the notation. In the default chain, the housing depth of 37.00 +0.25/−0 becomes 37.125 ± 0.125, and each bearing of 14.00 +0/−0.12 becomes 13.94 ± 0.06. The calculator does this for every row and reports the average gap, so you see the 1.245 mm average next to the 1.00 mm that the nominals alone would suggest. Ignoring the shift leaves the worst-case spread unchanged but puts it in the wrong place, and a gap that looks safe at its minimum can be unsafe at its maximum.

Tools that accept only symmetric tolerances push this work onto the user. The Engineers Edge calculator, for example, states that "All tolerance need to be bilateral equal." The calculator on this page converts for you, with the plus and minus fields entered as they appear on the drawing.

Worst case: the sum of the tolerances

The worst-case half-width is the sum of the absolute tolerances, T = T₁ + T₂ + … + Tₙ, applied around the average gap. It is the same result you get by placing every plus link at its largest and every minus link at its smallest, and then doing the opposite for the minimum. Fritz Scholz's review for Boeing describes this as guarding against all allowed variation by stacking the part tolerances in the worst possible way, and points out that it can only happen when someone deliberately picks the worst parts for an assembly.

That property is also its strength. If the worst-case range sits inside the required gap, every assembly built from parts that meet the drawing will meet the requirement, with no assumption about how the parts are distributed. Firgelli's stack up article recommends worst case when an out-of-spec assembly is unacceptable, for low-volume or prototype builds, and when any part must be interchangeable with any other. Worst case also needs no assumption about how the parts are distributed.

RSS: where the square root comes from and when it holds

RSS rests on a fact about random variables: the variance of a sum of independent variables is the sum of their variances. If each dimension has a standard deviation σ and its tolerance equals 3σ, the assembly has a standard deviation whose three-sigma value is the square root of the sum of the squared tolerances. Scholz writes it as equation 2 of his review, T = √(a₁²T₁² + … + aₙ²Tₙ²), where each a is the sign or sensitivity of the dimension, and notes that for a normal distribution 99.73% of assemblies fall within ± that value, so only 0.27% fail.

Four assumptions are buried in that derivation. Precimach's worked example lists them as each dimension being independent, roughly normal, centred on nominal, and with a drawing tolerance equal to ±3σ. Scholz's review stresses independence as the cornerstone of statistical tolerancing, and says it is reasonable when dimensions come from different machining processes. He warns that it is questionable when several identical parts from one process go into the same assembly, and that thermal expansion tends to affect different parts in a similar way. He also writes that the standard assumptions "should not necessarily be accepted at face value".

The assumption people skip is the last one. Precimach puts it plainly: "The ± on a drawing limits the range, not the distribution." A drawing says that parts outside the limits are rejected and says nothing about where the accepted parts cluster. Atlas of Engineering makes the same point, that a drawing tolerance is not automatically 3σ and that tail behaviour and process centring have to be shown from data.

Where RSS is not valid is therefore a matter of the situation, not the arithmetic. It is not valid when the parts of the stack come from one setup or one tool offset, because they drift together. Precimach recommends worst case for its 20-piece batch example for that reason, observing that a batch cut in one setup is not independent or centred and drifts as the tool wears. UnEedPM's conditions for using RSS include stable process and measurement data, interchangeability not being mandatory, a failure that is not severe, and an accepted level of assembly fallout. Firgelli recommends RSS for large production batches, assemblies with many parts, and processes where capability is monitored. Precimach adds that the ASME Y14.5-2018 statistical tolerancing symbol requires statistical process controls, and suggests stating an expected capability such as a Cpk of at least 1.33 when RSS is specified. As a rule of thumb, it keeps worst case for short stacks of three or four links and uses RSS beyond that.

How much RSS saves as links are added

For a stack of n links with equal tolerance T, worst case gives nT and RSS gives T√n. The table uses T = 1 so the numbers read as multiples of one link's tolerance. Scholz points out that with two links √2 = 1.41 is 29% smaller than 2, and with four links 2 is 50% smaller than 4. The saving grows with the number of links, which is why RSS matters most on long chains and gives little on two-part fits.

Half-width of the gap for n links of equal tolerance T = 1. Worst case = n. RSS = √n. Modified RSS = 1.5 × √n. Saving = 1 − RSS ÷ worst case.
LinksWorst caseRSSModified RSSRSS saving
221.412.1229%
331.732.6042%
442.003.0050%
552.243.3555%
662.453.6759%
882.834.2465%
10103.164.7468%

Modified RSS and mean shift: the two corrections

The first correction multiplies the RSS result by a fixed factor. Scholz reports that Bender (1962) proposed 1.5, reasoning that production operators asked what tolerance they can hold usually name two thirds of the true ±3σ spread, which includes only about 95% of the pieces. The factor makes up for tolerances that were stated too optimistically. The calculator shows this as the modified RSS row: for the default chain, 1.5 × 0.159 = 0.239 mm, so the gap runs from 1.006 to 1.484 mm.

A quirk follows from the arithmetic. Worst case is nT and modified RSS is 1.5T√n, and the two are equal at n = 2.25. For two links, modified RSS gives 2.12T, which is larger than the worst case of 2T, as the table above shows. The factor is only useful on longer chains, and for a two-part fit the worst case is the tighter and safer figure.

The second correction deals with a process that is off-centre. Scholz lists the reasons for a mean shift: it may be deliberate, such as aiming for maximum material condition because rework is preferred to scrap, or caused by tool wear, or simply because the process cannot be centred exactly. His treatment, attributed to Mansoor (1963) and extended by Greenwood and Chase (1987), stacks the shifts in worst-case fashion and the remaining variation by RSS. With a shift of a fraction δ of each tolerance, the half-width becomes δ × (sum of the tolerances) + √(sum of ((1 − δ) × tolerance)²). That is equation 8 in his review, and the calculator uses it with one δ for every link.

The formula joins the two methods. With δ = 0 it is plain RSS, and with δ = 1 it is the worst case, which Scholz notes is where an extreme mean shift leads. In the default chain, a shift of 25% of each tolerance gives 0.25 × 0.295 + 0.75 × 0.159 = 0.193 mm. The gap then runs from 1.052 to 1.438 mm, between the RSS result of 0.159 mm and the worst case of 0.295 mm. Type 25 into the mean-shift field to see it appear as an extra row.

A stack up built from ISO fits: H7/g6 at 25 mm

A shaft in a hole is the shortest possible stack: two links, the hole adding to the clearance and the shaft taking from it. The limits come from this site's ISO 286 calculator. An H7 hole at 25 mm runs from 25.000 to 25.021 mm and a g6 shaft from 24.980 to 24.993 mm, so the clearance is 7 to 41 µm. That is the worst case. Entered as stack up links, the hole is 25.0105 ± 0.0105 mm and the shaft 24.9865 ± 0.0065 mm, so the average clearance is 24 µm and the RSS half-width is √(10.5² + 6.5²) = 12.3 µm, giving 11.7 to 36.3 µm.

The table runs six common fits through the same steps. The worst-case column is the clearance range from the ISO limits, and the RSS columns come from the stack up. Because a fit has only two links, RSS narrows the range by 27% to 29% in every row, in line with √2 against 2 for two links of similar size.

Radial or diametral clearance in µm for a 25 mm hole and shaft (24 to 30 mm size step), from /iso-286/ data. RSS columns treat each limit band as ±3σ and centred on its midpoint.
FitWorst case (ISO)AverageRSSRSS width ÷ worst case
H7/g67 to 412411.7 to 36.373%
H7/h60 to 34174.7 to 29.373%
H7/f720 to 624126.2 to 55.871%
H8/f720 to 744727.4 to 66.672%
H7/e840 to 946747.4 to 86.672%
H11/c11110 to 370240148.1 to 331.971%

The H7 hole is the standard example of why the unilateral conversion matters. Typed as 25 ± 0.021 mm, as if the tolerance were centred, the same stack gives a worst case of -0.014 to 0.041 mm. It reports a possible interference of 0.014 mm for a fit that is a clearance fit in every real combination, with a true minimum of 0.007 mm. See the fits overview and the H7 tolerance and g6 tolerance pages for the limits at other sizes.

Mistakes that give a wrong stack up

Getting a direction wrong is the most basic one. If every link in the default chain were marked as a plus, the calculator would report a gap of 73 mm, an obvious error. A single wrong sign gives a number that can look reasonable, so check the average gap against the drawing before trusting the spread.

Treating a one-sided tolerance as symmetric is the second. The H7 example above shows how a centred ±0.021 invents an interference. In the other direction, UnEedPM warns that converting an asymmetric tolerance to a convenient symmetric one can hide directional risk, and advises calculating the minimum and maximum from the actual limits.

Assuming a normal distribution without evidence is the third. The RSS range holds only for the 99.73% that the normal model predicts, and the model is a statement about the process, not the drawing. Part of the risk is correlation. Atlas of Engineering reruns its three-link example with a correlation of +0.60 between two of the parts and finds that the standard deviation rises from 0.089753 to 0.100277 mm, so assuming independence understated the spread by 11.73%. Scholz names several identical parts from one process in the same assembly as a case where independence is doubtful.

Arithmetic slips in published examples are a fourth, and a good reason to use a tool. Firgelli's five-part example lists tolerances of 0.10, 0.05, 0.15, 0.08 and 0.06 mm and prints √0.0374 = 0.193 mm for the RSS. The squares are 0.0100, 0.0025, 0.0225, 0.0064 and 0.0036, which add to 0.0450, and √0.0450 = 0.212 mm. We checked its simple three-part example, where three tolerances of 0.05 mm give √0.0075 = 0.087 mm, and it is correct. The 0.193 figure is the one in error, by about 9%, and it errs on the optimistic side.

Finally, the chain itself can be wrong. This calculator treats the stack as a straight line. Both UnEedPM and Atlas of Engineering limit RSS to linear contributors, and UnEedPM adds that contributors strongly driven by geometric tolerances need other methods such as covariance, Monte Carlo or geometric variation analysis. Position tolerances, angles and form errors are not handled here. The loop also assumes rigid parts at the temperature the dimensions apply to. The Engineers Edge calculator states the same assumptions of rigid parts and 20 °C.

Ways to shrink a stack up, with numbers

Tighten the biggest contributor first. In the default chain the housing depth carries 62% of the RSS total. Halving its plus tolerance from 0.25 to 0.125 mm cuts the worst-case half-width from 0.295 to 0.233 mm, and the RSS half-width from 0.159 to 0.117 mm. The worst-case gap then runs from 0.950 to 1.415 mm and meets the 1.5 mm upper limit that it missed before. Tightening a small contributor, such as the spacer, achieves much less.

Remove links from the chain. Precimach shows a datum effect: a cavity depth drawn from a base as 60 ±0.05 minus 8 ±0.05 carries ±0.10 in the stack, while the same depth dimensioned straight from the cover face as 52 ±0.05 is one tolerance at half the value. Dimensioning from the cover face halves that contribution.

Choose one part at assembly. In the same article a selective shim, picked from seven thickness steps of 0.1 mm, gives a gap of 0.20 ±0.06 mm with the two largest links at ±0.10, before measurement uncertainty. It trades tolerance cost for the cost of measuring and sorting.

Be careful when you change method instead of the parts. Precimach's RSS budget split, with two links of ±0.08 and three of ±0.03, gives an RSS of ±0.12 mm and passes a ±0.15 mm requirement, but the same parts read as worst case give ±0.25 mm and can jam. With the Bender factor the RSS total is ±0.19 mm, which exceeds ±0.15 mm. Moving to RSS is a decision about the process and the acceptable fallout, and the arithmetic cannot make it for you.

The same calculation in Excel

The calculation fits in a few spreadsheet cells. Put the part names in column A, the direction (1 or −1) in B, the nominal in C, the plus tolerance in D and the minus tolerance in E. In F enter =C2+(D2−E2)/2 for the midpoint and in G enter =(D2+E2)/2 for the half-width, and fill both down. The average gap is =SUMPRODUCT(B2:B5,F2:F5), the worst-case half-width is =SUM(G2:G5), and the RSS half-width is =SQRT(SUMSQ(G2:G5)). Multiply the RSS value by 1.5 for the modified result. The downloadable CSV holds the default chain in this layout, so it opens in Excel with the same numbers as the calculator.

The calculator assumes one-dimensional, linear chains of rigid parts at one temperature. RSS and its corrections describe a process that has not been measured here: apply them only when the conditions above hold. Where a drawing, a customer or a standard sets the method, use theirs. Example data: tolerance-stack-up-example.csv.

The same data as JSON, with units and source: tolerance-stack-up-example.json.