How to size an electrical enclosure

Outside dimensions are what you order, but the mounting panel, the usable depth, the heat the box can shed and the space in front of the door decide whether it works. A step-by-step method with a worked example.

NEMA4 Enclosure engineering team · Updated October 24, 2026 · 9 min read

The method in six steps

  1. Lay out every device, DIN rail and wire duct on the mounting panel, not on the outside dimensions.
  2. Add spare space: 20–25% is common practice.
  3. Leave wire bending space at terminals and room to route cables to the entries.
  4. Check depth: the deepest panel device plus anything mounted on the door.
  5. Check heat: a sealed enclosure sheds heat only through its skin.
  6. Check the installation: door swing, working space in front, mounting and cable entry.

Outside, inside and mounting panel dimensions

Enclosures are sold by outside body size, height x width x depth. Three smaller numbers matter for the layout:

  • Inside dimensions: the outside size less the sheet thickness and any door collar or flange.
  • Mounting panel: the removable plate the devices bolt to. It is smaller than the inside, because it sits on studs clear of the walls and the door flange.
  • Usable depth: from the face of the mounting panel to the inside of the closed door.

Worked example. Our 24 x 20 x 8 in 304 stainless wall-mount enclosure has, per its reference drawing: inside 606.6 x 505.0 x 200.2 mm nominal; mounting panel 545.6 x 444.0 mm (about 21.5 x 17.5 in); usable depth 184.9 mm (about 7.3 in). So a 24 x 20 in box gives you a layout area of roughly 21.5 x 17.5 in, not 24 x 20. Every product page lists the nominal inside size, and the size finder filters by minimum inside height, width and depth.

Step 1: the component envelope

List every device that goes in the enclosure with its height, width and depth from the maker's datasheet: power supplies, breakers, terminal blocks, relays, PLC or I/O, network switches, the computer. Then draw them on the mounting panel in their real positions, with the DIN rails and wire ducts between rows. Drawing it at scale, or in CAD on the panel outline, catches what a sum of areas misses: devices only fit in whole rows, and wire duct takes a surprising share of the panel.

Respect the clearances the device makers specify. Drives, power supplies and computers often need free space above and below for airflow, and these vary by product and frame size, so take them from each manual rather than a rule of thumb.

Step 2: spare space for changes

Panels grow. Engineers interviewed by Control Design describe 20% spare space as a commonly specified requirement, and 20–25% as typical, with 25% where expansion is expected; AutomationDirect suggests about 20–25% spare installed terminals or space, with 10% as the minimum. Wire duct is usually sized with spare capacity too, so that later wiring does not have to be forced in. If the layout fills the panel to the edge on day one, go up a size.

Step 3: wire bending space and cable routing

Conductors need room to bend from the terminal toward the cable entry without being forced against the lug. For enclosures covered by NEC Article 312 (cabinets and cutout boxes), NEC 312.6 sets the minimum wire bending space at terminals in two tables: Table 312.6(A) where the conductor does not enter or leave the wall opposite its terminal, and Table 312.6(B) where it does. The space depends on the conductor size and the number of wires per terminal, so large feeders need far more room than control wiring. NEC 312.8 also limits how much of an enclosure for switches or overcurrent devices may be filled with conductors, splices and taps.

Plan the route from the cable entries to the terminals too. Glands and conduit hubs take space on the inside of the wall, and in washdown and outdoor locations we recommend bringing cables in through the bottom face so water runs off the entries. The cutouts and glands guide covers entry sizes.

Step 4: depth, and what is on the door

Depth is set by the deepest device on the panel plus its wiring and connectors, plus anything mounted on the door: pushbuttons, pilot lights, selector switches, a display or a panel PC. Door-mounted devices reach back into the enclosure, and a deeper enclosure is the simple way to keep them from hitting panel components. Check the device depth behind the panel from its datasheet against the usable depth of the enclosure, and leave room for the cable bend behind connectors.

For IMD hardware we have done that check for you: the "IMD mini PC" configuration adds a VESA / DIN-rail adapter plate and two cable glands, and the panel PC configuration has the door cut for the IMD panel PC you choose. Each product page lists the IMD devices that size is configured for.

Step 5: heat a sealed enclosure can shed

A NEMA 4X-type enclosure is sealed, so the heat from the devices inside has to leave through the enclosure walls. The basic relation used in enclosure thermal guides is:

Heat dissipated (W) = k x A x temperature rise
A = effective surface area in m², temperature rise = inside air minus outside air in kelvin (°C), k = heat transfer coefficient: about 5.5 W/m²K for painted sheet steel, about 3.7 W/m²K (0.344 W/ft²K) for stainless steel.

Only surfaces that can give off heat count: for a wall-mounted enclosure, leave out the back. Detailed methods, such as the DIN 57 660 part 500 surface-area method used in enclosure climate-control catalogues, also distinguish free-standing, wall-mounted and side-by-side installations, so treat this as a first check.

Worked example, continued. The 24 x 20 x 8 in enclosure on a wall exposes its front, top, bottom and sides: about 0.76 m² (8.2 ft²). In stainless at k = 3.7 W/m²K:

  • A 10 °C (18 °F) rise above room temperature allows about 28 W of heat inside.
  • A 20 °C (36 °F) rise allows about 56 W.
  • One enclosure maker's thermal guide recommends a 25% safety margin, which brings that 56 W down to about 45 W.

Compare that with what goes inside: power supply losses, drives, a computer, a network switch. One enclosure maker's thermal guide notes that for every 18 °F (10 °C) rise above about 72–75 °F, the reliability of electronic components is cut in half. Keep the inside temperature within every device's rated ambient.

Outdoors, add the sun. The same guide puts peak solar load at about 97 W/ft² (roughly 1,040 W/m²) over much of the United States, and its tests showed a sun shield reducing the temperature rise by 25% (top only) to 56% (wall-mount shield). Shade the enclosure, or use a sun shield, where you can.

If the load is too high for a sealed box: go up a size (more surface), move heat sources outside, or add closed-loop cooling such as a heat exchanger or enclosure air conditioner rated for the enclosure type. Fans and filters that exchange outside air break the NEMA 4X seal unless they carry the same type rating.

Step 6: door swing and working space

Where the enclosure contains equipment likely to be examined, adjusted, serviced or maintained while energized, the National Electrical Code requires working space in front of it. Under NEC 110.26(A) (2020 and 2023 editions):

  • Depth: at least 3 ft (900 mm) for 0–150 V to ground in Condition 1, more at higher voltages and other conditions (Table 110.26(A)(1)).
  • Width: the width of the equipment or 30 in (762 mm), whichever is greater.
  • Height: 6.5 ft (2.0 m) or the height of the equipment, whichever is greater.
  • Doors: "In all cases, the work space shall permit at least a 90 degree opening of equipment doors or hinged panels."

So check the door swing, not just the box. The 24 x 20 x 8 in example has a door swing radius of 511.3 mm (about 20.1 in) and an overall size with feet, hinge and latches of 697.6 x 515.2 x 213.7 mm, all on its reference drawing (PDF). Leave room on the hinge side for the door to open fully, and confirm the local code edition with the authority having jurisdiction.

Mounting the enclosure

Hang a type-rated enclosure by its external mounting means. NEMA notes that many type-rated enclosures require mounting external to the electrical cavity unless an intermediate bracket or foot is used, rather than screws through holes drilled in the back of the electrical cavity. Our wall-mount enclosures ship with four external wall-mount feet, and the wall-mount hole pattern is on each reference drawing. Allow for the weight of the enclosure and everything in it when choosing wall anchors.

If it becomes an industrial control panel

An enclosure with motor controllers, overcurrent protection and control devices inside is an industrial control panel in NEC terms. NEC Article 409 covers industrial control panels and requires them to be marked with information including the short-circuit current rating; UL 508A Supplement SB is a recognized method of determining that rating. Whether the panel must also be listed is decided by the authority having jurisdiction or the project specification.

Check it in CAD before you order

Every NEMA4 Enclosure product page has reference CAD you can download: a STEP model, a DWG/DXF drawing and a PDF drawing with the outside, inside, mounting panel and mounting-hole dimensions. Drop your panel layout onto the mounting panel outline, check the depth against the door, and check the door swing in the room. Dimensions are nominal; final dimensions are confirmed with your order.

We make 65 wall-mount sizes, from 6 x 4 x 4 in to 60 x 36 x 16 in, in 304 and 316L, so there is usually a size one step up when the layout is tight.

Frequently asked questions

How much spare space should an enclosure have?

20 to 25% of the panel area is common practice, with 10% as a bare minimum. Use 25% or more if you already expect additions.

How do I calculate the heat an enclosure can dissipate?

Multiply the heat transfer coefficient (about 3.7 W/m²K for stainless steel, 5.5 W/m²K for painted steel) by the exposed surface area in m² and by the allowed temperature rise in °C. Leave out surfaces against a wall, and add a safety margin.

What is the difference between inside dimensions and mounting panel size?

The mounting panel is smaller than the inside of the enclosure because it stands on studs clear of the walls and door flange. On our 24 x 20 x 8 in enclosure the inside is about 23.9 x 19.9 in and the mounting panel about 21.5 x 17.5 in.

How much clearance do I need in front of an electrical enclosure?

Under NEC 110.26(A), at least 3 ft deep for 0-150 V to ground in Condition 1, at least 30 in wide or the equipment width, and enough room for the door to open at least 90 degrees. Check your local code edition.

Do you have CAD files for your enclosures?

Yes. Each product page has reference CAD downloads: STEP, DWG, DXF and a PDF drawing, with nominal dimensions confirmed with your order.

Sources

  1. NFPA 70, National Electrical Code (free read-only access): 110.26, 110.28, Article 312, Article 409
  2. EC&M, "NEC requirements for working clearances" (110.26 door opening)
  3. IAEI Magazine, "Articles 312 and 314" (Tables 312.6(A) and (B))
  4. EC&M, NEC 312.8 fill limits for overcurrent device enclosures
  5. EC&M, NEC Article 409, industrial control panels (SCCR marking, UL 508A Supplement SB)
  6. Rittal, Technical System Catalogue Climate Control (heat loss relation, k = 5.5 W/m²K sheet steel)
  7. Hammond Manufacturing, heating selection (k for painted steel and stainless steel)
  8. nVent HOFFMAN, Spec-00488, thermal management (surface area method, 25% margin, reliability, solar load, sun shields)
  9. nVent HOFFMAN, Spec-01113, wall-mount sun shield test
  10. Control Design, "Experts weigh in on best practices for control panel housings" (spare space, door devices)
  11. Control Design, "How to plan for spare I/O space"
  12. NEMA, "NEMA FAQs: Enclosures" (Q16, external mounting)

Keep reading

More buying guides

All guides