Do it Yourself Wiring - What you need to know about Electrical Boxes.

The National Electrical Code restricts the number of conductors that are allowed in a single electrical box.

How many conductors are allowed is determined by the size of the box and the size of the conductors. Each conductor that terminates or is spliced within the box is counted once, and each conductor that passes through the box without splice or termination is counted once.

The size of the box is determined by its volume, the volume of the box is found by using this formula. Height x Width x Length = The total cubic inches or the volume of the box.
Some boxes will have its volume listed on the box while others will not. New nonmetallic boxes should have its volume listed on the box, while most metal boxes will not.

Disclaimer: You understand that you are personally responsible for your own wiring,
and that you're wiring should conform to the National Electrical code. The information provided is general installation advice. We make no claims about the completeness or the accuracy of the information as it may apply to an infinite amount of field conditions. It is the responsibility of the person or persons using this information to check with all concerned parties, owners and local authorities, etc. before doing an installation. Users of this information agree to hold Wireityourself.com or any of its agents harmless form liabilities of any kind relating to the use of this information. You also agree to the terms set forth in our terms and conditions.