The National Electrical Code (NEC), Article 314, covers the selection and installation of device boxes, J-Boxes, and outlet boxes. Article 314 also covers the sizing of pull-boxes, but you are not likely to encounter them as a DIY Electrician. Table 314.16(A) makes selecting the right boxes easy when all the conductors passing through them or terminating in them are of the same size i.e. AWG 12. However,if there are several different size conductors passing through the box or terminating in the box, you will have to calculate the box volume required. Table 314.16(B) gives the volume required for each conductor of a given size.
As you can see, each AWG 12 conductor required 2.25 IN3 (Cubic Inches). So, if a box has to hold the following conductors—four No. 14, four No. 12, and two No. 10 conductors—the math is pretty simple.
Four No. 14 @ 2.0 IN3 = 8.0 IN3
Four No. 12 @ 2.25 IN3 = 9.0 IN3
Two No. 10 @ 2.5 IN3 = 5.0 IN3
Total volume required = 22.0 IN3
Oh if it was only that simple. There are other devices and fixtures that you have to factor in when computing box size that will meet Code requirements.
Internal clamps, no matter how many are in the box, count as one of the largest size conductors in the box, Article 314.16(B)(2).
Every fixture stud and Hickey count as one conductor each, Article 314.16(B)(3). Always use the largest conductor for these volumes.
Every device—single receptacle, duplex receptacle, or light switch—counts as two conductors based om the largest conductor that connects to the device, Article 314.16(B)(4).
All of the grounding conductors count as one conductor. Article 314.16(B)(5). If there is an isolation grounding conductor in the box besides the equipment grounding conductors, one more conductor is added to the count per Article 250.146(D).
All of the above rules are illustrated in this example.
For this box there are
four #12 and four #14 current carrying conductors
four equipment grounding conductors that count as one #12 conductor
four internal clamps that count as one #12 conductor
one duplex receptacle that counts as two #12 conductors since the #12 conductors is the largest conductor connected to it.
One light switch that counts as two #14 conductors since that is the largest conductor connected to it.
Here is the way your calculations would look:
The total multiplier factors are from NEC Table 314.16(B). referring back to NEC Table 314.16(A), you will see that you will need to install a 411/16 square x 21/8 deep box which has a cubic displacement of 42 IN3, which is the closest standard box to the computed 32 IN3. You may use a larger box that computed but never a smaller box.
A word about the National Electrical Code Book.
The National Electrical Code (NEC), Fire Protection Association (FPA), Publication 70, is the Electrician Bible and all work must comply to its rules and regulation. The NEC is revised and updated every three years and you need to have the latest revision on the bookshelf in your shop and you need to study it religiously. Knowing what the Bible has to say about the project you are about to undertake will keep you out of trouble with the inspectors and, even more important, will keep your safe.