Spindle spacing calculator for deck, porch and stair railings: spindle count, even gaps, on-center tape marks, and a check against the 4 in, 4-3/8 in and 100 mm sphere code limits.
Enter the inside span between posts, the spindle width and the largest gap you want.
Guard Height, Layout & Price
Railing Layout Drawing
Tape-Measure Marks
| Spindle | Left Edge | Center | Right Edge |
|---|---|---|---|
| Spindle 1 | 3-3/8 in (3.40) | 4-1/8 in (4.15) | 4-7/8 in (4.90) |
| Spindle 2 | 8-5/16 in (8.30) | 9-1/16 in (9.05) | 9-13/16 in (9.80) |
| Spindle 3 | 13-3/16 in (13.20) | 13-15/16 in (13.95) | 14-11/16 in (14.70) |
| Spindle 4 | 18-1/8 in (18.10) | 18-7/8 in (18.85) | 19-5/8 in (19.60) |
| Spindle 5 | 23 in (23.00) | 23-3/4 in (23.75) | 24-1/2 in (24.50) |
| Spindle 6 | 27-7/8 in (27.90) | 28-5/8 in (28.65) | 29-3/8 in (29.40) |
| Spindle 7 | 32-13/16 in (32.80) | 33-9/16 in (33.55) | 34-5/16 in (34.30) |
| Spindle 8 | 37-11/16 in (37.70) | 38-7/16 in (38.45) | 39-3/16 in (39.20) |
| Spindle 9 | 42-5/8 in (42.60) | 43-3/8 in (43.35) | 44-1/8 in (44.10) |
| Spindle 10 | 47-1/2 in (47.50) | 48-1/4 in (48.25) | 49 in (49.00) |
| Spindle 11 | 52-3/8 in (52.40) | 53-1/8 in (53.15) | 53-7/8 in (53.90) |
| Spindle 12 | 57-5/16 in (57.30) | 58-1/16 in (58.05) | 58-13/16 in (58.80) |
| Spindle 13 | 62-3/16 in (62.20) | 62-15/16 in (62.95) | 63-11/16 in (63.70) |
| Spindle 14 | 67-1/8 in (67.10) | 67-7/8 in (67.85) | 68-5/8 in (68.60) |
Spindle Count Options
| Spindles | Even Gap | On-Center | 4 in Rule |
|---|---|---|---|
| 11 | 4-5/8 in (4.63) | 6-1/8 in | Fails |
| 12 | 4-1/8 in (4.15) | 5-5/8 in | Fails |
| 13 | 3-3/4 in (3.75) | 5-1/4 in | Passes |
| 14 | 3-3/8 in (3.40) | 4-7/8 in | Passes |
| 15 | 3-1/8 in (3.09) | 4-5/8 in | Passes |
| 16 | 2-13/16 in (2.82) | 4-5/16 in | Passes |
| 17 | 2-9/16 in (2.58) | 4-1/16 in | Passes |
Max Gap by Building Code
| Code | Max Opening | Fewest Spindles | Even Gap |
|---|---|---|---|
| US Homes (IRC) | < 4 in sphere | 13 | 3-3/4 in (3.75) |
| US Commercial (IBC) | < 4 in sphere | 13 | 3-3/4 in (3.75) |
| Canada (NBC) | < 100 mm sphere | 13 | 3-3/4 in (3.75) |
| UK (Approved Doc K) | < 100 mm sphere | 13 | 3-3/4 in (3.75) |
| Ireland (TGD K) | < 100 mm sphere | 13 | 3-3/4 in (3.75) |
| Spain (CTE) | < 100 mm sphere | 13 | 3-3/4 in (3.75) |
| France (NF P01-012) | ≤ 110 mm spacing | 12 | 4-1/8 in (4.15) |
Step-by-Step Spacing Math
- Spindles = ceil((span - gap) ÷ (width + gap)) = ceil((72.00 in - 3.50 in) ÷ 5.00 in) = 14.
- Even gap = (span - n × width) ÷ (n + 1) = (72.00 in - 14 × 1.50 in) ÷ 15 = 3.40 in.
- On-center = gap + width = 3.40 in + 1.50 in = 4.90 in.
- Guard height 36.00 in meets the 36 in minimum (IRC R312.1.2).
- Code check: widest opening 3.40 in < 4 in (IRC R312.1.3).
- Result: 14 Spindles Needed.
How a Spindle Spacing Calculator Finds the Gap
A spindle spacing calculator first finds how many spindles fit between two posts without any gap going over your limit. It then spreads the leftover space evenly, so every gap matches, including the two at the posts.
These two lines are the whole spindle spacing calculator formula. Here n is the spindle count, L is the clear span between post faces, w is the spindle width, and g is the largest gap you will accept. Rounding up keeps every opening at or under g.
The even gap s is the open space left after the spindles, split into n + 1 equal openings. There is always one more gap than spindles, because a gap sits at each post.
How do I calculate a gap between spindles?
Run a 72 in span, 1-1/2 in spindles and a 3-1/2 in target gap through a spindle spacing calculator in inches. The count is (72 - 3.5) ÷ 5 = 13.7, rounded up to 14 spindles.
The even gap is (72 - 14 × 1.5) ÷ 15 = 3.40 in, about 3-3/8 in. The on-center spacing is the gap plus one spindle width, 4.90 in, and the first spindle center sits 4.15 in from the post face.
How many spindles do I need?
For a 4 in sphere limit, 1-1/2 in spindles need at least 13 per 72 in section, which leaves 3-3/4 in gaps. Twelve spindles would leave 4-1/8 in gaps and fail the sphere test.
Per foot of railing, the legal minimum works out to about 2.2 spindles for 1-1/2 in stock and 2.5 for 3/4 in metal balusters. Buying 3 per foot leaves spares for splits and miscuts.
The same two formulas work as a spindle spacing calculator in Excel. With span in A1, width in B1 and target gap in C1, the count is =ROUNDUP((A1-C1)/(B1+C1),0) and the gap is =(A1-D1*B1)/(D1+1), with the count in D1.
Maximum Spacing for Railing Spindles
Every railing spindle spacing calculator starts from the code limit. US homes allow no opening a 4 in sphere can pass. That makes the true limit just under 4 in, so a gap of exactly 4 in fails an inspector's ball test. The rule sits in IRC Section R312.1.3.
| Code | Level Guards | Open Side of Stairs | Test |
|---|---|---|---|
| US homes (IRC R312.1.3) | Under 4 in | Under 4-3/8 in | Sphere |
| US stair triangle (IRC) | Not applicable | Under 6 in | Sphere |
| UK (Approved Document K) | Under 100 mm | Under 100 mm | Sphere |
| France (NF P01-012) | 110 mm max | 110 mm max | Spacing |
| Canada, Ireland, Spain | Under 100 mm | Under 100 mm | Sphere |
The IRC triangle limit covers the opening formed by a stair riser, tread and the guard's bottom rail. It sets how high that bottom rail may sit, not the spindle spacing. The stair figures above match the code text quoted in a Mount Clemens building department handout.
What is the 100mm sphere rule for balusters?
The 100 mm sphere rule says a 100 mm ball must not pass through any opening in the guarding. Approved Document K applies it in paragraphs 1.39a and 3.3a to buildings likely to be used by children under five, which includes homes.
Because the ball must not pass, the widest gap has to stay below 100 mm, so UK stair makers work to 99 mm or less. A spindle spacing calculator for UK stairs should treat a 100 mm gap as a fail.
Does the 100mm sphere rule apply to staircase rakes?
Yes. Paragraph 1.39a covers guarding on a flight, which is the raking part of the stair, so the 100 mm limit holds on the slope as well as the landing. Unlike the IRC, Approved Document K gives no larger allowance for stairs.
Measure the rake gap level, between spindle faces, because that is the gap a child's head meets. Measuring along the sloped handrail makes the gap look wider than it is.
Deck Spindle Spacing Calculator Chart
These deck counts use the IRC 4 in sphere and even gaps, the same math as the spindle spacing calculator. The 3-1/2 in column adds a margin for a spindle that goes in slightly off plumb. A 6 ft post layout with 3-1/2 in posts leaves a 68-1/2 in clear span.
| Clear Span | Spindle Width | Fewest Legal Spindles | Gap at the Minimum | Spindles for 3-1/2 in Max | Gap at 3-1/2 in Max |
|---|---|---|---|---|---|
| 36 in | 1-1/2 in | 6 | 3-7/8 in | 7 | 3-3/16 in |
| 48 in | 1-1/2 in | 9 | 3-7/16 in | 9 | 3-7/16 in |
| 68-1/2 in | 1-1/2 in | 12 | 3-7/8 in | 13 | 3-1/2 in |
| 72 in | 1-1/2 in | 13 | 3-3/4 in | 14 | 3-3/8 in |
| 92-1/2 in | 1-1/2 in | 17 | 3-3/4 in | 18 | 3-7/16 in |
| 72 in | 3/4 in | 15 | 3-13/16 in | 17 | 3-5/16 in |
| 92-1/2 in | 3/4 in | 19 | 3-15/16 in | 21 | 3-1/2 in |
A 92-1/2 in span is an 8 ft post layout with 3-1/2 in posts. To find the clear span of every section on a long run, the Deck Post Spacing Calculator sets the post layout first.
How do I choose the right spindle spacing?
Start from the code limit, then pick a working gap about 1/4 to 1/2 in under it. A 3-7/8 in gap passes on paper but leaves only 1/8 in for a bowed spindle or a mark that drifts.
For turned or shaped spindles, give the spindle spacing calculator the width at the thinnest point. The sphere slips through where the spindles narrow, so the widest gap in the pattern is the one that counts.
Wider spindles need fewer pieces for the same gap. In the table, 1-1/2 in spindles at legal gaps land between about 4-7/8 and 5-3/8 in on center, which is a quick check on a marked rail.
Even vs Centered Spindle Spacing
Even spacing makes every gap the same, including both end gaps at the posts. It is the usual choice, and the spindle count shifts the gap until it fits the span exactly.
Switch the spindle spacing calculator to centered spacing and it keeps your chosen gap between every spindle and splits the leftover at the two posts. On a 72 in span with 1-1/2 in spindles and a 3-1/2 in gap, that gives 14 spindles with 2-3/4 in end gaps.
A center spindle spacing calculator helps when the gap must match an existing railing. With an odd count, one spindle sits dead center in the section. With an even count, a gap sits on center instead, which matters when lining up spindles with a stair or gate below.
How do I evenly space spindles?
Take the first-center and on-center figures from the spindle spacing calculator, then hook a tape on the left post face and mark the first spindle center.
Step the on-center distance across the span, and check that the last mark lands the same distance from the far post. A spindle spacing calculator PDF printout of the marks keeps the layout on site without a phone.
A spacer block cut to the gap does the same job with less measuring. Rip a scrap to the exact gap width, set it against the post and each fixed spindle in turn, and check the last opening before fastening.
Fence pickets follow the same math. The Fence Picket Calculator handles picket count and gaps along a fence line, while the Baluster Calculator counts balusters across a whole deck railing.
Stair Spindle Spacing Calculator Math
On a stair, the code gap is measured level between spindle faces. The tape marks along the sloped rail are longer, so a stair spindle spacing calculator converts between the two with the stair angle.
Here α is the stair angle, found from the arctangent of riser height over tread run. A 7-1/2 in rise on a 10 in tread gives 36.9°, so every level distance stretches by 1.25 along the rail.
How do I calculate staircase dimensions for my spindles?
Measure the riser height and tread run, or read the stair angle from a level and protractor. Then measure the rail span between newel posts, either along the slope or level across the floor.
A 100 in rail on a 36.9° stair covers 80 in level, which the spindle spacing calculator works out from the angle.
Under the IRC 4-3/8 in stair limit, 1-1/2 in spindles need at least 13 spindles, with 4-5/16 in level gaps. The on-center step is 5.82 in level, or about 7-1/4 in along the rail.
How do I determine the recommended spindle spacing for stair railings?
For spindles set on the treads, two per tread suits most US stairs. With 1-1/2 in spindles, the gap is the tread run divided by two, minus one spindle width.
| Rise × Run | Stair Angle | Rail Stretch | Gap at 2 per Tread | Gap at 3 per Tread |
|---|---|---|---|---|
| 7-3/4 × 10 in | 37.8° | 1.265 | 3.50 in | 1.83 in |
| 7-1/2 × 10 in | 36.9° | 1.250 | 3.50 in | 1.83 in |
| 7-1/2 × 10-1/2 in | 35.5° | 1.229 | 3.75 in | 2.00 in |
| 7 × 11 in | 32.5° | 1.185 | 4.00 in | 2.17 in |
The 7-3/4 in rise and 10 in tread are the IRC limits for steepest stairs. Two per tread passes the 4-3/8 in stair sphere on every row. On an 11 in tread, the 4 in gap still passes the stair rule but would fail the 4 in rule on a level landing guard.
How high can the bottom rail sit on stairs?
Where the bottom rail runs above the treads, the riser, the tread and the rail form a triangle. Under IRC R312.1.3 Exception 1, a 6 in sphere must not fit in that pocket.
The spindle spacing calculator finds the largest sphere that fits from the rise, run and rail height.
Here d is the largest sphere diameter, h is the height of the rail's underside above the nosing line, r is the tread run, and α is the stair angle. With the rail on the nosing line, d is the circle that fits the riser and tread corner.
| Rise × Run | Sphere With Rail on Nosing Line | Highest Rail for the 6 in Rule | Sphere With Rail 2 in Up |
|---|---|---|---|
| 7-3/4 × 10 in | 5.10 in | Under 1.37 in | 6.41 in, Fails |
| 7-1/2 × 10 in | 5.00 in | Under 1.50 in | 6.33 in, Fails |
| 7-1/2 × 10-1/2 in | 5.10 in | Under 1.33 in | 6.46 in, Fails |
| 7 × 11 in | 4.96 in | Under 1.47 in | 6.38 in, Fails |
On a 7-1/2 × 10 in stair, a rail 1-1/4 in above the nosing line leaves a 5.83 in pocket, which passes. Raise it to 2 in and a 6.33 in sphere fits, so keep stair bottom rails tight to the nosing line or run spindles down to the treads.
Standard Spindle and Baluster Width
For a wood spindle spacing calculator entry, a 2×2 baluster measures 1-1/2 in square, the actual size of dressed 2×2 lumber. Round metal deck balusters are commonly 3/4 in across. UK stair spindles are mostly 32 mm or 41 mm square.
Wider spindles mean fewer pieces. With a 100 mm sphere rule, a 2,000 mm span takes 15 spindles of 32 mm at 95 mm gaps, or 14 spindles of 41 mm at 95 mm gaps.
| Clear Span | 32 mm Spindles | Gap | 41 mm Spindles | Gap |
|---|---|---|---|---|
| 900 mm | 7 | 84.5 mm | 6 | 93.4 mm |
| 1,200 mm | 9 | 91.2 mm | 8 | 96.9 mm |
| 2,000 mm | 15 | 95.0 mm | 14 | 95.1 mm |
| 2,700 mm | 20 | 98.1 mm | 19 | 96.0 mm |
A spindle spacing calculator in metric works the same way, with every length in millimeters. The 2,700 mm row lands at 98.1 mm, so a 2 mm marking error on that span would push a gap over the limit.
How do you find the spindle width for a set count?
A spindle width calculator runs the formula backward. Width equals the span minus all the gaps, divided by the spindle count.
For 14 spindles in a 72 in span with 3-1/2 in gaps, the width is (72 - 15 × 3.5) ÷ 14 = 1.39 in. Spindles must be at least 1.39 in wide, so 1-1/2 in stock works and leaves 3.40 in gaps.
Balustrade Height and Horizontal Spindles
Spacing is only half of a legal guard. Under the IRC, guards are needed where a deck, porch or stair sits more than 30 in above the floor or grade.
IRC guards must be at least 36 in high, or 34 in on the open side of stairs, measured from the line of the tread nosings. Commercial guards under the IBC are 42 in.
Some states change these figures. California's residential code, as quoted in a City of Gilroy handout, sets guards at 42 in, so cut spindles to length only after the spindle spacing calculator confirms both the gap and the guard height for your code.
In UK homes, Approved Document K Diagram 3.1 sets guarding at 900 mm for stairs, landings and internal floor edges. External balconies and roof edges need 1,100 mm. In France, NF P01-012 sets 1,000 mm above a standing surface.
Can spindles be horizontal?
In UK homes, Approved Document K paragraph 3.3b says to avoid horizontal rails so young children cannot climb the guarding. Horizontal bars or cables work as a ladder, even when every gap passes the sphere test.
The IRC sections quoted here limit opening size and guard height but name no climbing rule. Some local codes add one, so confirm horizontal infill with your building department before buying it.
Planning a raised deck or balcony? The Balcony Size Calculator sets the floor area, and the Decking Calculator counts boards, screws and joists for the deck the railing guards.
A spindle spacing calculator for milling is a different tool. Machine spindle RPM and feed come from the Spindle Speed Calculator, not from railing spacing.