IllustrationA tolerance stack-up analysis adds the tolerances of every part between two features to check that a gap still works at the limits. Worst case adds them all at their extremes. RSS takes the square root of the sum of squares and assumes random, centered variation. Run it on each critical gap before tooling.
A small device packs a housing, a PCB, a battery and buttons into a few millimeters. Each part has its own tolerance, and those tolerances add up wherever parts meet. A button that rests on its switch or a lid that will not close is often a stack-up problem found too late. This guide works an example from published molder, PCB fab and switch drawing figures.
The worked example uses real published tolerances, but the part dimensions are illustrative and describe no specific product.
What is a tolerance stack-up analysis for a small device?
A tolerance stack-up analysis follows a chain of dimensions across several parts, from one feature to another. The nominal values give the nominal gap. The tolerances show how far the real gap can move. If it can leave its allowed range, change the design before parts are made.
On a device, the gaps that need a stack-up are the ones that change how the product works or feels:
- Button to switch: too tight and the switch stays pressed, too loose and the button feels dead.
- Battery cavity: room for the cell and any swelling the cell maker allows.
- Housing halves: the parting line gap and step that customers see and feel.
- Lens, light pipe or sensor window: distance and alignment to the part behind it.
- Gaskets and snap-fit hooks: compression or engagement inside the range the design needs.
Start with a one-dimensional stack along a single direction. Many small-device gaps can be checked that way. Move to 2D or 3D software only when the chain includes angles, rotation or features that move in more than one direction.
Worst case tolerance analysis or RSS tolerance: which should you use?
Both methods use the same chain and the same nominal gap. They differ in how they add the tolerances.
Worst case: the total tolerance is the sum of every tolerance in the chain. If five parts each carry ±0.1 mm, the gap moves by ±0.5 mm.
Root sum square (RSS): the total tolerance is the square root of the sum of each tolerance squared. The same five parts give √(5 × 0.1²), about ±0.22 mm.
| Question | Worst case | RSS |
|---|---|---|
| How it adds tolerances | Adds every tolerance at its limit, all in the bad direction at once. | Squares each tolerance, adds the squares, takes the square root. |
| What it assumes | Nothing about the process. Any part inside its drawing limits will fit. | Each dimension varies at random, independently, centered on nominal, and the tolerance covers the real spread. |
| What it promises | Every assembly built from in-spec parts meets the requirement. | Most assemblies meet it. The share that fails grows when the assumptions break. |
| Best fit | Pilot builds, new tools, sealing features, purchased parts with no process data. | Long chains on measured processes where a rare reject is acceptable. |
RSS relies on statistics, and statistics need parts. On a pilot build from a new tool, nobody has measured the process yet, and purchased parts arrive with drawing limits and no data. Run worst case first. If it fails, run RSS to judge the risk, then accept it or change the design. Keep both results in the file.
How do you run a stack-up on a button, PCB and switch?
Take a common case: a molded button in an upper housing presses a tactile switch soldered to a PCB. The PCB sits on bosses in the lower housing. The requirement for this example is a gap of 0.00 to 0.40 mm between the button nub and the switch actuator at rest. Below zero, the button presses the switch all the time. Above 0.40 mm, the press feels dead before it reaches the switch.
Draw the loop
Pick the gap, then walk from one side of it to the other through parts that touch each other. Up is positive. From the PCB boss: up the lower housing to the parting face (A), up the upper housing to the underside of the top wall (B), down the button to its nub (C). The switch top sits above the same boss by the PCB thickness (D) plus the switch height (E). The gap is A + B − C − D − E.
| Link | Dimension | Nominal, mm | Tolerance, mm | Where the tolerance comes from |
|---|---|---|---|---|
| A | Lower housing: parting face down to the PCB boss | +2.50 | ±0.08 | Molded. ±(0.076 mm + 0.002 × 2.50 mm), Protolabs figures |
| B | Upper housing: parting face up to the underside of the top wall | +6.00 | ±0.09 | Molded. ±(0.076 mm + 0.002 × 6.00 mm) |
| C | Button: flange top down to the tip of the actuator nub | −3.50 | ±0.08 | Molded. ±(0.076 mm + 0.002 × 3.50 mm) |
| D | PCB thickness | −1.00 | ±0.10 | AdvancedPCB standard level, ±10% |
| E | Tactile switch height above the PCB | −3.80 | ±0.25 | E-Switch TL3305AF260QG drawing, general tolerance for X.XX |
The nominal gap is 2.50 + 6.00 − 3.50 − 1.00 − 3.80 = 0.20 mm, the middle of the allowed range.
Worst case result
The tolerances add to 0.08 + 0.09 + 0.08 + 0.10 + 0.25 = ±0.60 mm. The gap can fall anywhere from −0.40 mm to +0.80 mm. The design fails at both ends: some units would hold the switch pressed, and others would have a dead button.
RSS result
The squares add to 0.0934, and the square root is about ±0.31 mm. The gap runs from about −0.11 mm to +0.51 mm. It still fails at both ends.
Find the largest contributor and change the chain
The switch height alone gives 0.0625 of the 0.0934, about two thirds of the RSS total. Tightening the molded parts would barely help. Three changes do:
- Shorten the chain. Clamp the PCB top face against ribs in the upper housing in place of bosses in the lower one. The lower housing and the PCB thickness drop out, because the switch is measured from the PCB top. With a 7.50 mm rib (±0.09 mm), the gap becomes rib − button − switch, and worst case falls from ±0.60 to ±0.42 mm.
- Attack the switch. Ask the vendor whether a tighter or measured height spread is available, or choose a switch whose drawing gives the height its own tolerance.
- Add compliance. A silicone actuator or a flexing button arm can absorb a small interference. The requirement then becomes a range of preload, which the soft part can take.
Rerun the stack after each change. The shorter chain alone leaves ±0.42 mm in worst case against a 0.40 mm window, so this design needs the switch fix or compliance as well. Snap-fit hooks have their own stacks of the same kind; see snap fit joints design.
Where do the tolerance values come from?
A stack-up is only as good as its inputs. Guessed tolerances give a stack that looks checked and is not. Take each value from the shop or vendor that will make the part: the molder's quote for your tool and resin, the fab's capability level you will order, and the drawing of each purchased part. Write the source next to each value.
Molded parts
Protolabs says its machining tolerance of ±0.003 in. (0.076 mm) is built into the mold tool, and the resin tolerance applies to the finished part. Its design guidelines say the included resin tolerance can be greater than but no less than ±0.002 in./in. That is a ratio, so it is also 0.002 mm per mm (design guidelines, tolerance article, as of November 2026). The example above adds the tool tolerance to that resin floor for each length, so it is the tightest band these figures allow. Your molder may quote a wider one.
Resin choice moves the numbers. Protolabs gives ABS a shrink rate of 0.003 in./in. and polypropylene 0.018 in./in., and warns that switching resin without adjusting the mold might be a big problem. It also says warp is common in parts without consistent wall thickness (as of November 2026). Lock the resin before you trust a molded stack; PC vs ABS vs PC/ABS covers that choice. Protolabs suggests marking up to five critical-to-quality features, with tolerances, in the CAD model you send.
PCB thickness and outline
Board thickness is a tolerance in every stack that passes through the PCB. AdvancedPCB lists overall thickness tolerance as ±10% at its standard level, with tighter values of 7% or 8% and 5% or 6% at its advanced and development levels (manufacturing capabilities, as of November 2026). On a 1.00 mm board, ±10% is ±0.10 mm. Ask the fab what a tighter level does to price and lead time, and check whether the board can come out of the chain instead. The same page lists rout tolerances for the board outline, which matter where the board edge meets housing ribs. For choosing the thickness itself, see PCB layers and thickness.
Purchased parts
Purchased parts often hide their tolerance in a note. The E-Switch TL3305AF260QG 2D spec sheet, linked from its product page (drawing P010471, revision C), shows a 3.80 mm height marked as a critical parameter. The drawing gives that height no tolerance of its own, so its general note applies: ±0.25 mm for two-decimal dimensions. The same sheet lists travel of 0.20 ±0.10 mm (as of November 2026). The drawing also shows a 0.00 to 0.10 mm dimension at the base of the body, so ask the vendor whether the 3.80 mm height already includes it.
How does GD&T shorten the tolerance chain?
GD&T (geometric dimensioning and tolerancing) controls form, orientation and location against named datums. The ASME standard for it is Y14.5. ASME's page lists the current edition as Y14.5-2018, reaffirmed in 2024, and calls it the authoritative guideline for the design language of GD&T (ASME, as of November 2026). The standard is sold, and this guide quotes none of its rules.
GD&T helps a stack-up in three ways:
- Datums match assembly. Measure the rib height from the face that touches the PCB, and the stack uses one dimension. Measure it from another face, and the stack picks up extra links.
- Position zones convert cleanly. A position tolerance of Ø0.20 mm lets a boss axis sit up to 0.10 mm from its true location in any direction. In a 1D stack along one axis, it enters as ±0.10 mm.
- Form controls catch what size limits miss. A parting face can be in size and still warped. Flatness on that face puts the warp into a number the stack can use.
Protolabs describes position as a 2D or 3D zone around the true location where a feature must lie, and flatness as measured regardless of other features or datums (Protolabs, April 2022, as of November 2026). Callouts help only if the molder measures them, so ask for the critical ones in first-article inspection.
What should you ask your hardware team?
Bring this list to the enclosure review, before the tool is cut.
- Which gaps and fits on this device are critical, and is each one written as a requirement with a minimum and a maximum?
- For each critical gap, where is the stack-up file, and which method does it use: worst case, RSS or both?
- Where did each tolerance in the stack come from? Name the molder quote, fab capability page or part drawing.
- Which contributor is largest, and what would it take to tighten it or remove it from the chain?
- Are the critical features marked on the drawing so the molder measures them on first-article parts?
For how the mechanical work is organized, see engineering.
Questions about tolerance stack-ups
What is the difference between worst case and RSS tolerance analysis?
Worst case adds every tolerance at its limit, so any set of in-spec parts fits. RSS gives a smaller range and assumes random, independent, centered variation. When those assumptions fail, RSS overstates how many assemblies will fit.
Can I use RSS for a small pilot build?
Treat the result with care. A new tool has no measured process data yet, and in a small build a few failed units are a large share of the batch. A safer path is worst case for the pilot, then RSS once first-article and production measurements support it.
Does a 3D printed prototype prove the stack-up works?
No. A printed part has its own tolerances, so a fit that works in a print can fail in a molded part. Use prints to check the concept and assembly order, and use the stack-up plus first-article measurements of molded parts to prove the fit.
Do I need GD&T on every drawing?
No. Put geometric controls on the features that locate parts or form critical gaps, and leave the rest to a general tolerance. Each callout adds inspection work, so use callouts where a stack needs them.
How can Duobay help with tolerance stack-ups?
Duobay develops custom devices with a Shenzhen engineering team that covers mechanical, electrical, firmware, app and test work. Enclosure design, samples and small batches are part of that work, and the source files, including drawings, are assigned to you at every paid gate. Initial calls are free. Tell us about your device.
If you want the critical gaps on your enclosure checked before tooling, tell us about your device.
Sources. All pages accessed November 6, 2026. Shops and vendors revise these figures, so confirm current values before you decide.
- Protolabs, Design Guidelines: Plastic Injection Molding (link)
- Protolabs, Understanding Injection Molding Tolerances (February 7, 2023) (link)
- Protolabs, Geometric Dimensioning and Tolerancing in Injection-molded Parts (April 11, 2022) (link)
- AdvancedPCB, Manufacturing Capabilities (link)
- E-Switch, TL3305 product page, with the TL3305AF260QG 2D spec sheet, drawing P010471 revision C (link)
- ASME, Y14.5 Dimensioning and Tolerancing, edition Y14.5-2018 (R2024) (link)
Planning a device like this? Tell us what it needs to do. A Duobay engineer replies within 1 business day. Send a project brief →