Spindle Spacing Calculator

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.

Railing Span & Spindles

Enter the inside span between posts, the spindle width and the largest gap you want.

Guard Height, Layout & PriceEven Gaps · 1 Section · 10% Spare · $3.25
Spindles per Section
14 Spindles Needed
15 equal spaces, ends included · gap on center
3-3/8 in Even Gap
On-Center Spacing4.90 in (4-7/8)
1st Center From Post4.15 in (4-1/8)
Hook the tape on the left post face, mark the first center, then step the on-center distance; a spacer block cut to the gap does the same job.
85% of the 4 in Limit
Guard Height vs 36 in MinExactly at the Minimum
Fewest Legal Spindles13 at 3-3/4 in Gap
IRC R312.1.3 bars any opening a 4 in sphere can pass, so the widest gap, post ends included, must stay under it.
$52.00 Spindle Cost
Spindles to Buy16 (incl. 2 spare)
Cost per Foot of Rail$8.67 / ft
14 per section × 1 section gives 14 installed, plus the spare share rounded up to whole spindles to cover splits, knots and miscuts.
3.09 in Gaps With 15
Gap With 16 Spindles2.82 in (2-13/16)
Centered Layout2.75 in (2-3/4) End Gaps
Each spindle you add closes every gap at once; the last row shows the same span laid out the other way, centered or even, for comparison.
Railing Layout DrawingOne Section, to Scale
14 spindles · 3-3/8 in gaps · 4-7/8 in on centerDashed circle: the 4 in test sphere, drawn to scale
Tape-Measure MarksFrom the Left Post Face
SpindleLeft EdgeCenterRight Edge
Spindle 13-3/8 in (3.40)4-1/8 in (4.15)4-7/8 in (4.90)
Spindle 28-5/16 in (8.30)9-1/16 in (9.05)9-13/16 in (9.80)
Spindle 313-3/16 in (13.20)13-15/16 in (13.95)14-11/16 in (14.70)
Spindle 418-1/8 in (18.10)18-7/8 in (18.85)19-5/8 in (19.60)
Spindle 523 in (23.00)23-3/4 in (23.75)24-1/2 in (24.50)
Spindle 627-7/8 in (27.90)28-5/8 in (28.65)29-3/8 in (29.40)
Spindle 732-13/16 in (32.80)33-9/16 in (33.55)34-5/16 in (34.30)
Spindle 837-11/16 in (37.70)38-7/16 in (38.45)39-3/16 in (39.20)
Spindle 942-5/8 in (42.60)43-3/8 in (43.35)44-1/8 in (44.10)
Spindle 1047-1/2 in (47.50)48-1/4 in (48.25)49 in (49.00)
Spindle 1152-3/8 in (52.40)53-1/8 in (53.15)53-7/8 in (53.90)
Spindle 1257-5/16 in (57.30)58-1/16 in (58.05)58-13/16 in (58.80)
Spindle 1362-3/16 in (62.20)62-15/16 in (62.95)63-11/16 in (63.70)
Spindle 1467-1/8 in (67.10)67-7/8 in (67.85)68-5/8 in (68.60)
Spindle Count OptionsEven Gaps, 11 to 17 Spindles
SpindlesEven GapOn-Center4 in Rule
114-5/8 in (4.63)6-1/8 inFails
124-1/8 in (4.15)5-5/8 inFails
133-3/4 in (3.75)5-1/4 inPasses
143-3/8 in (3.40)4-7/8 inPasses
153-1/8 in (3.09)4-5/8 inPasses
162-13/16 in (2.82)4-5/16 inPasses
172-9/16 in (2.58)4-1/16 inPasses
Max Gap by Building CodeFor Your Span & Spindle
CodeMax OpeningFewest SpindlesEven Gap
US Homes (IRC)< 4 in sphere133-3/4 in (3.75)
US Commercial (IBC)< 4 in sphere133-3/4 in (3.75)
Canada (NBC)< 100 mm sphere133-3/4 in (3.75)
UK (Approved Doc K)< 100 mm sphere133-3/4 in (3.75)
Ireland (TGD K)< 100 mm sphere133-3/4 in (3.75)
Spain (CTE)< 100 mm sphere133-3/4 in (3.75)
France (NF P01-012)≤ 110 mm spacing124-1/8 in (4.15)
Step-by-Step Spacing MathGap = (L - n × w) ÷ (n + 1)
  1. Spindles = ceil((span - gap) ÷ (width + gap)) = ceil((72.00 in - 3.50 in) ÷ 5.00 in) = 14.
  2. Even gap = (span - n × width) ÷ (n + 1) = (72.00 in - 14 × 1.50 in) ÷ 15 = 3.40 in.
  3. On-center = gap + width = 3.40 in + 1.50 in = 4.90 in.
  4. Guard height 36.00 in meets the 36 in minimum (IRC R312.1.2).
  5. Code check: widest opening 3.40 in < 4 in (IRC R312.1.3).
  6. Result: 14 Spindles Needed.
Passes IRC R312.1.3 With 0.60 in to Spare
Cut a spacer block to the gap, start at one post and check the last opening before fixing spindles. A ball the size of the test sphere is a quick final check.

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.

CodeLevel GuardsOpen Side of StairsTest
US homes (IRC R312.1.3)Under 4 inUnder 4-3/8 inSphere
US stair triangle (IRC)Not applicableUnder 6 inSphere
UK (Approved Document K)Under 100 mmUnder 100 mmSphere
France (NF P01-012)110 mm max110 mm maxSpacing
Canada, Ireland, SpainUnder 100 mmUnder 100 mmSphere

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 SpanSpindle WidthFewest Legal SpindlesGap at the MinimumSpindles for 3-1/2 in MaxGap at 3-1/2 in Max
36 in1-1/2 in63-7/8 in73-3/16 in
48 in1-1/2 in93-7/16 in93-7/16 in
68-1/2 in1-1/2 in123-7/8 in133-1/2 in
72 in1-1/2 in133-3/4 in143-3/8 in
92-1/2 in1-1/2 in173-3/4 in183-7/16 in
72 in3/4 in153-13/16 in173-5/16 in
92-1/2 in3/4 in193-15/16 in213-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 × RunStair AngleRail StretchGap at 2 per TreadGap at 3 per Tread
7-3/4 × 10 in37.8°1.2653.50 in1.83 in
7-1/2 × 10 in36.9°1.2503.50 in1.83 in
7-1/2 × 10-1/2 in35.5°1.2293.75 in2.00 in
7 × 11 in32.5°1.1854.00 in2.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 × RunSphere With Rail on Nosing LineHighest Rail for the 6 in RuleSphere With Rail 2 in Up
7-3/4 × 10 in5.10 inUnder 1.37 in6.41 in, Fails
7-1/2 × 10 in5.00 inUnder 1.50 in6.33 in, Fails
7-1/2 × 10-1/2 in5.10 inUnder 1.33 in6.46 in, Fails
7 × 11 in4.96 inUnder 1.47 in6.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 Span32 mm SpindlesGap41 mm SpindlesGap
900 mm784.5 mm693.4 mm
1,200 mm991.2 mm896.9 mm
2,000 mm1595.0 mm1495.1 mm
2,700 mm2098.1 mm1996.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.