Two counts, one division, and they differ by one
A twelve-metre fence at three-metre centres has four bays and five posts. The division gives four. The order needs five. This is the oldest counting error there is, it has a name — the fencepost error — and it survives because both answers look reasonable and only one of them builds a fence.
Which of the two a job needs is decided by the ENDS, not by the arithmetic. If something must sit at both ends of the run, the count is the number of gaps plus one: studs in a wall that is closed at both corners, hangers along a gutter, balusters between two newels, screws down the edge of a board. If the run closes on itself — a ring of anchors round a tank, a hoop of ties round a column — the first and last coincide and the count equals the number of gaps exactly. If only one end is occupied, the two answers meet in the middle and the count is the number of gaps.
Every calculator here that reports a count states which of the three it assumed, because the assumption is not recoverable from the number afterwards. A result of forty tells you nothing about whether thirty-nine or forty-one was the right answer.
- n
- items to order
- L
- the run being divided, measured along the line the items sit on
- p
- the spacing, centre to centre — a MAXIMUM, not a target
- e
- the end term: 1 when both ends are occupied, 0 for a closed loop or a single occupied end
The division rounds up, because the spacing is a maximum
Spacings in codes and in manufacturers' literature are almost always stated as maxima — studs at not more than 600 mm centres, fasteners at not more than 300 mm along an edge, hangers at not more than 900 mm. A maximum divides upward. Rounding to nearest, which is the instinct, produces a layout that exceeds the limit roughly half the time.
The magnitude is easy to under-rate because the error is never large in the count. A six-metre run at a 610 mm maximum needs 9.84 gaps, so ten. Rounding to nearest gives ten as well and nothing goes wrong. A six-metre run at a 650 mm maximum needs 9.23, so ten — but rounding to nearest gives nine, and nine gaps across six metres is 667 mm centres, which exceeds the stated maximum by nearly 3%. One item saved, the limit broken, and nothing on the drawing shows it.
The corollary is that the ACTUAL spacing is not the spacing that was entered. Once the count is fixed, the real centres are the run divided by the number of gaps, and that figure is always less than or equal to the maximum. Calculators here report the achieved spacing alongside the count for that reason: it is the number that gets set out on site, and it is the one an inspector measures.
- p_act
- the spacing actually set out, once the count is a whole number
- L
- the run
- p
- the maximum spacing permitted
Two directions multiply, and so does the mistake
A grid of fixings over a panel — screws on a board, clips on a roof, anchors on a baseplate — is the same method applied twice and then multiplied. That multiplication is what makes a one-off error expensive rather than trivial.
Getting the end term wrong in one direction adds or drops a single row. Getting it wrong in both drops a row AND a column. On a ten-by-ten grid, the correct count with both ends occupied is eleven by eleven, or 121; dropping the end term in both directions gives 100. That is a 17% shortfall, not a 1% one, and it arrives as a van that has to go back.
The other consequence of the grid form is that the corner item belongs to both directions and must be counted once. Adding a row of eleven and a column of eleven to a border count gives forty-four for a perimeter that holds forty — the four corners counted twice. Perimeter counts on this site subtract the corners explicitly for that reason.
A lighting layout adds a second limit to the count. The lumen method sets how many luminaires the average illuminance needs, the luminaire's spacing-to-height ratio sets the widest pitch that keeps the light even, and the layout is the smallest grid of whole rows that satisfies both, with the outside rows half a pitch from the walls — so the grid often holds a luminaire or two more than the count.
- N
- total items in the grid
- W, H
- the two runs the grid spans
- p_x, p_y
- the maximum spacing in each direction; they are frequently different
Where it fails: the remainder bay, and everything in the way
The formula lays items at equal centres across an uninterrupted run, and almost no real run is uninterrupted. Openings, service penetrations, expansion joints and changes of direction all break the line, and the arithmetic cannot see any of them.
The remainder bay is the standard casualty. A run that does not divide evenly leaves a short bay, and where that bay falls is a decision rather than a result — codes and good practice generally put the CLOSER spacing at the end rather than in the middle, because the ends are where the load concentrates and where the fixing is working hardest. The count is unchanged by the choice; the layout is not.
Openings add items rather than removing them, which is the opposite of the intuition that a hole in a wall means less material. A door in a stud wall removes the studs across its width and adds a pair of jambs, a header and its cripples — so a wall priced from length and spacing alone comes out short on exactly the walls that have the most work in them. Every calculator here that counts studs or fixings across an opening says whether it has allowed for the opening or not.
Finally, a run with corners needs an item at each corner and that item serves both legs. Counting the legs separately and adding them double-counts every corner, which on a rectangular layout with four corners is four items — small in absolute terms, and reliably wrong.
The alternative: equal division rather than fixed pitch
There is a second way to lay out a run, and it produces a different number. Fixed pitch takes the spacing as given and accepts an odd bay at the end. EQUAL DIVISION takes the number of items as given — often for appearance — and divides the run into that many equal parts, which gives a spacing that is whatever it is.
Balustrades are usually the second kind: a run of balusters with one wide bay at the end looks like a mistake even when it satisfies the gap rule, so the bays are equalised and the spacing falls out. Structural work is almost always the first kind, because the limit is a maximum and equalising can only help.
The two methods coincide only when the run divides evenly. Where they differ, the equal-division answer always has a spacing at or below the fixed-pitch maximum — so equalising is safe against a maximum and unsafe against a MINIMUM, which is the rule that governs a balustrade's gaps. Check which kind of limit applies before equalising; a gap that must not exceed a dimension and a gap that must not fall below one are equalised in opposite directions.
Calculators that use this method
Basis
- The arithmetic is elementary and has no source; these are cited for what the SPACINGS may be, not for how to count them.
- International Residential Code (IRC), the stud, joist and rafter tables. Spacings there are stated as maxima against a span and a load, which is why the division in this paper rounds up.
- ASTM C840, Standard Specification for Application and Finishing of Gypsum Board. Fastener spacing along edges and in the field, and the closer spacing required at board ends.
- ASTM C1007, Standard Specification for Installation of Load Bearing (Transverse and Axial) Steel Studs and Related Accessories. Stud spacing and the bracing that goes with it.
- SMACNA HVAC Duct Construction Standards and MSS SP-58 for pipe hangers. Both state maximum support intervals by size, which is the same maximum-divides-upward rule applied to services.
- Manufacturers' fixing schedules for standing-seam clips, cavity ties and thermal-break clips. These are product-specific rather than code-derived, and a clip spacing lifted from one system does not transfer to another.
- SLL Code for Lighting (CIBSE) and the luminaire's photometric data — the lumen method and the spacing-to-height ratio.
