How do I calculate box fill?
Add up volume allowances per NEC 314.16(B): one for each conductor passing through or terminating, two for each device yoke (based on the largest conductor on it), one total for all cable clamps, and one total for all equipment grounding conductors. Multiply the count by the per-size volume (for example, 2.25 cu in for 14 AWG, 2.00 for 12 AWG) and compare to the box’s marked volume.