What counts as a volume allowance
NEC (NFPA 70) 314.16 sets how much free space an outlet, device or junction box must provide. Table 314.16(B) assigns a cubic-inch allowance to each conductor size: 2.00 for 14 AWG, 2.25 for 12 AWG, 2.5 for 10 AWG, 3.0 for 8 AWG and 5.0 for 6 AWG. Every insulated conductor that originates outside the box and terminates or is spliced inside counts as one allowance of its own size. Equipment-grounding conductors are different: no matter how many you pull in, they count together as a single allowance of the largest grounding conductor present.
Device yokes and internal clamps add more. Each switch or receptacle that mounts on a yoke counts as two allowances of the largest conductor connected to that device. One or more internal cable clamps count as a single allowance of the largest conductor in the box; external connectors that leave the clamp outside the box do not. Fixture studs and hickeys have their own rules in 314.16(B)(3); this calculator covers the common DIY case of NM cable into a device or square box.
Wire fill inside conduit uses a different rule entirely. Conduit fill is limited by a percentage of the raceway's cross-sectional area from NEC Chapter 9, not by cubic inches of a box. If you are sizing the raceway that feeds the box, run that calculator first, then come back here for the enclosure.
A worked 12 AWG receptacle example
A typical single-gang remodel box fed by two 12/2 NM cables (one in, one out) with a duplex receptacle looks like this. The two hots and two neutrals are four current-carrying conductors at 12 AWG: 4 × 2.25 = 9.00 cu in. Both equipment grounds count as one 12 AWG allowance: 2.25 cu in. The receptacle is one yoke-mounted device: 2 × 2.25 = 4.50 cu in. Internal clamps, if the box has them, add another 2.25. Total: 18.00 cu in.
NEC Table 314.16(A) lists a 3 × 2 × 3½ metal device box at 18 cu in and a 4 × 1¼ square box at 18 cu in, so either is the smallest metal size that meets the count. A shallower 3 × 2 × 2½ device box is only 12.5 cu in and fails. Plastic boxes are marked with their own cubic-inch volume on the box; use the marked figure rather than the metal table when that is what you are installing.
Mixed AWG sizes are allowed. Count each current-carrying conductor at its own size, size the device and clamp allowances from the largest conductor attached to them, and size the single ground allowance from the largest equipment ground. The calculator's conductor-size control applies one AWG across the count for the common same-size job; for mixed sizes, run the largest size as a conservative bound or add the allowances by hand from the breakdown list.
Metal box sizes and what this tool does not cover
The size suggestions use the common metal device and square volumes from Table 314.16(A): 3×2 device boxes from 1½ to 3½ in deep, 4 in square boxes, and 4-11/16 in square boxes. Multi-gang boxes, extension rings and plaster rings add the volumes marked on each piece. Always take the marking on a listed box over the generic table when they differ.
This page is an estimating aid for 314.16(B) counts, not a substitute for the code book or a permit review. Support fittings, luminaire studs, terminal blocks and conductors that pass through without splice have additional rules. Confirm the NEC edition your authority having jurisdiction has adopted; local amendments can change box or cable rules even when the national table looks familiar.
Related electrical math on this site: the electrical converter when you need to move between volts, amps and watts before you pick a wire size, and stair geometry under the IRC when the job also involves coded rise and run.