Home Improvement Skills & Specialties Electrical Wiring & Circuits

Receptacle Boxes and Cable Installation Codes

Electrical Switch Testing
yenwen / Getty Images

Installing electrical boxes and cables is made easy by following these recommended electrical installation codes. Don't just install your electrical wiring haphazardly, do it by the book of the National Electrical Code. This book of installation codes was developed to safely install all things electrical. Adhere to the rules to have safe and effective electrical wiring.

By installing the appropriate electrical boxes in the right manner, you'll have a safe and great looking installation. The electrical cables that run through walls and in and out of electrical boxes must be both supported and installed with adequate lengths for connections in accordance with these code for proper installation and ease of use.

  • 01 of 08

    Attaching Cables to Studding

    In the codebook, section 334.30 states that flat cables must be stapled on the flat side of the cable, not on the edge. This provides a tight wire connection to the stud and prevents any damage to the wire sheathing.

  • 02 of 08

    Cables Entering the Receptacle Box

    When electrical cables route from box to box, you must leave at least six inches of free conductor wiring in the junction box for connection purposes. In article 300.14, this technique is explained. If wires are too short, it's much too hard to make a connection and in the event that you need to trim off a bit of wire to rewire a switch or outlet, you'll need a few extra inches of usable wire.

  • 03 of 08

    Securing Cables

    Article 334.30 states that cables coming out of the junction boxes should be secured within 12 inches of the box in all boxes equipped with cable clamps. These cable clamps are not to be removed. 314.17(C) states that cables must be secured to the receptacle box. Although, in article 314.17(C)'s exception, nonmetallic boxes have no cable clamps and must have cables supported within eight inches of the junction box. In either instance, the wire is secured by wire staples that keep it from moving within the wall cavity.

  • 04 of 08

    Lighting Fixture Boxes

    Lighting fixture boxes must be listed for support of lighting fixtures because of their weight. Typically, these boxes are either round or octagon shaped. You'll find this information in article 314.27(A). Depending on the material these boxes are made of, whether it is to support a light or ceiling fan, you may need to install a special bracket box to help support the weight, much like the case of ceiling fans.

    Continue to 5 of 8 below
  • 05 of 08

    Horizontal and Vertical Cable Strapping

    In article 334.30 and 334.30(A), vertically run cables must be supported by strapping every 4 feet 6 inches, although horizontally run cables through bored holes need no further support. By securing the cables in this way, the cables are protected from being pinched between the studs and the drywall. The preferred wire staples have metal nails and plastic cross supports, not staples.

  • 06 of 08

    Steel Plate Protectors

    When cables go through bored holes in studs, there are safety factors to consider. To protect wiring from nails and drywall screws, article 300.4 states that steel plates must be provided to protect cables closer than 1 1/4 inch from the edge of the wood framing member. This protects the wire when drywall is installed. These should be used in both vertical- and horizontal-bored hole applications where the metal plates cover the area in front of the hole where the wire runs through.

  • 07 of 08

    Mounting Boxes

    In article 314.20, it is stated that boxes should be mounted flush with the finished surface of the wall, with a maximum setback of no more than 1/4 inch. This would be the outer edge of the drywall. To aid in this installation, most boxes come with depth gauges that make installation of boxes easy. Simply align the right depth on the box to match the thickness of the drywall to be installed, and you'll have a flush fitting box.

  • 08 of 08

    Multiple Wire Installation for Cabling

    Article 334.80, 338.10(B), 4(A) states that when three or more NM or SE cables are installed in contact without maintaining spacing or pass through the same opening in wood framing members that are to be caulked or sealed and where the continuous run is greater than 24 inches, the allowable ampacity of each conductor must be adjusted in accordance with NEC Table 310.15(B)(@)(A). When passing through a normal drilled stud or joist, the rerating is not required.

The Spruce uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. 300.12 Mechanical Continuity — Raceways and Cables. National Electric Code of Illinois, 2020, NFPA, 2020.

  2. Article 334: Non-metallic Sheathed Cable: Types NM, NMC, and NMS. National Electrical Code 2018, Solar Provisions.

  3. 300.14 Length of Free Conductors at Outlets, Junctions, and Switch Points. National Electric Code of Illinois, 2020, NFPA, 2020.

  4. 334.30 Securing and Supporting. National Electric Code of Illinois, 2020, NFPA, 2020.

  5. 314.17 Conductors Entering Boxes, Conduit Bodies, or Fittings. National Electric Code of Illinois, 2020, NFPA, 2020.

  6. 314.27 Outlet Boxes. National Electric Code, 2020, NFPA, 2020.

  7. Chapter 3: Wiring Methods and Materials. National Electric Code of Illinois, 2020, NFPA, 2020.

  8. 300.4 Protection Against Physical Damage. National Electric Code, 2020, NFPA, 2020.

  9. 314.20 Flush-Mounted Installations. National Electric Code of Illinois, 2020, NFPA, 2020.