The smallest 2 x 4 x 1 1/2-inch deep boxes, for example, can easily splice just two cables (four or five conducting wires), but the largest 4 x 4 x 2 1/8-inch deep boxes can handle up to six cables (up to 18 individual conducting wires). The maximum number of cables that can be fitted into a single junction box is limited only by physical space and the quantity of wiring within the box. Junction boxes are designed to house multiple cables of equal size so they can be joined together. Each additional cable added increases the risk of electrical interference between adjacent lines and requires separate protection against voltage drops. Junction boxes should be located no closer than 12 inches to a wall or other metal surface. Heavier conductors should be placed in heavier-duty junction boxes.
The term "junction" means the point at which two or more electric circuits meet and connect together. A circuit is any path along which an electrical signal can travel. A circuit may consist of one conductor surrounded by insulation, such as from a wire to a fixture plug; however, it also may include several conductors in different locations with different amounts of insulation between them, such as from a branch circuit to a meter or transformer. Electric power flows along the least resistant path and therefore will follow the path with the fewest obstacles. If two or more paths have exactly the same resistance, then there is no way to tell which path will be used by electricity until it happens. The choice is random.
When routing electrical wires from box to box, at least six inches of free conductor wiring must be left in the junction box for connecting reasons. This approach is described in article 300.14. When the boxes are closely spaced, as is usually the case, even more wire should be allowed so that there is no need to cut and splice wires when connecting them together.
The main reason for leaving some free wiring in a junction box is so that you can connect it up later. For example, if there's a cable going from one box to another, you'll need to cut away some of its insulation to make sure that it stays live while you work on other cables. Then when you finish, you can just reconnect the cable to any remaining free wiring within the box.
This is important because without some kind of permanent connection, you couldn't stay off electricity when working on other cables. You would either have to disconnect all wires from one box and then back again (a very dangerous process), or you would have to allow only four or five inches of free wiring which wouldn't be enough to reach most connections safely.
The National Electrical Code allows you to run four 12/2 nonmetallic sheathed wires through a single bored hole that has been fire- or draft-stopped with thermal insulation, caulk, or sealing foam, or if correct spacing is not maintained for more than 24 in. (610 mm) between wires.
Four other smaller wires may be placed alongside the first set of four wires without causing a violation. These additional wires cannot be joined together nor can they have their ends exposed unless they are part of a larger group within the wiring system. They must be placed in separate holes to avoid the need for splicing or mixing different sizes of wire during installation.
The main limitation to the number of wires that can be passed through a single hole is space availability rather than code requirements. If sufficient space is available, six or more wires can be passed through a single hole. However, this should be done only when specific requirements for multiple circuits are used and they do not overlap each other's placements. For example, if one circuit requires wire in an upper floor hallway and another in a lower floor hallway, it would not make sense to use the same hole for both circuits since they would overlap.
If you are installing several groups of four wires, such as one group for lights and another for appliances, it is acceptable to combine them into one hole if necessary.