Spindle Spacing Calculator
Calculate spindle (baluster) count and spacing for a deck or stair railing, checked against a 100mm maximum gap convention.
Spindle Spacing Calculator: Baluster Count and Gap Layout
Building codes for stair and deck railings cap the gap between spindles (balusters) so a small child's head or body cannot pass through — a limit commonly set at 100mm, or about 4 inches, sometimes called the "sphere test." This calculator takes your railing's inside length, the width of the spindle stock you're using, and your maximum allowable gap, then works out how many spindles fit and exactly how to space them — either centred with a balanced gap at each end post, or spread evenly across the whole run.
How to use the spindle spacing calculator
- Choose the application — deck railing or stair railing (stairs add a rake-angle correction).
- Enter the inside railing length (post to post, or wall to wall) and the width of the spindle stock you plan to use.
- Enter your maximum allowable gap — typically 100mm or 4in, unless your local building code sets a different figure.
- Pick centred (balanced end gaps) or even spacing, and read off the spindle count and the resulting gap.
The formula, with a worked example
Unit length = spindle width + maximum gap — the space one spindle plus its following gap takes up. Spindle count = floor(railing length / unit length), always rounded down so the gap never exceeds your maximum.
For an evenly-spaced layout, the leftover length is then split across every gap: even gap = (railing length - spindle count x spindle width) / (spindle count + 1).
Worked example: a 3m railing, 38mm spindles, and a 100mm maximum gap. Unit length = 38 + 100 = 138mm, so spindle count = floor(3000 / 138) = 21. Spreading the leftover evenly gives a gap of (3000 - 21 x 38) / 22, about 100mm between each spindle and the end posts.
Stair runs use a slanted maximum gap first: since the code limit is measured horizontally but spindles run up the rake, the calculator widens it to gap / cos(angle), where angle = atan(riser rise / tread run), before solving for spindle count.
Australian standard: AS 1288 / NCC balustrade gap limit
The National Construction Code and AS 1288 (glass in buildings) both point to a maximum 125mm gap for balustrade infill on most residential balconies and stairs, tighter still where a child could climb the infill. Always confirm the requirement adopted by your state and the specific building surveyor for your project.
Tips and common mistakes
Always round the spindle count down, never up — rounding up spaces spindles further apart than the unit length allows, pushing the finished gap past your maximum.
Measure the gap at its narrowest point: many baluster profiles taper or flare, so the widest point can look compliant while the narrowest doesn't.
An Australian carpenter fitting a compliant spindle layout to a deck or stair balustrade typically charges around AUD 300-1100 for a single run, depending on run length, spindle material, and finish.


