How many 14 AWG wires can I put in an octagonal smoke detector box?
Start with the good news. Wire connectors, marettes, wire nuts, whatever you call them, count as zero. Section 314.16(B) lists every item that gets a volume allowance and connectors are not on the list. Four wire nuts in an octagon box use no counted volume at all.
The box capacity
Table 314.16(A) gives 15.5 cubic inches for a 4 inch by 1-1/2 inch octagonal box and permits ten 14 AWG conductors. A 4 inch by 2-1/8 inch octagonal box is 21.5 cubic inches and permits fourteen 14 AWG conductors. If the box carries a marked volume, use the marked value instead. Any box larger than those in the table has to be marked with its volume under 314.16(A).
Section 314.16(B) sets the volume allowance at 2.00 cubic inches per 14 AWG conductor, 2.25 for 12 AWG, and 2.50 for 10 AWG. When conductor sizes are mixed, count each at its own allowance rather than using the table conductor count.
What counts and what does not
Each conductor that originates outside the box and terminates or passes through gets one allowance under 314.16(B)(1). A conductor that both originates and terminates inside the box, meaning a pigtail, gets nothing. A conductor that passes through unbroken and has at least twice the minimum free length required by 300.14 counts as one, not two.
All the equipment grounding conductors together count as a single allowance under 314.16(B)(5), based on the largest one present. Cable clamps inside the box count as one allowance for the largest conductor, per 314.16(B)(2). A fixture stud or hickey counts as one each under 314.16(B)(3). A device or equipment on a yoke or strap counts as two allowances under 314.16(B)(4).
Running the smoke detector case
Take a mid run smoke detector fed with 14/3 in and 14/3 out, which is the usual interconnect wiring. That is six conductors entering and leaving, so six allowances. All the grounds together are one more, for seven. Most smoke alarm bases mount with screws directly to the box rather than on a yoke or strap, so 314.16(B)(4) generally does not add two. If the box has internal cable clamps, add one for eight. That fits a 15.5 cubic inch octagon box with room left, and the four wire nuts change nothing.
Do not forget 300.14, which requires at least 6 inches of free conductor measured from where it emerges into the box and at least 3 inches outside the box opening where the opening is less than 8 inches in any dimension.
Field takeaway
Count conductors, clamps, studs, and devices on yokes. Do not count wire nuts or pigtails. Ten 14 AWG conductors is the limit in a standard 4 inch by 1-1/2 inch octagon box.