Spindle Spacing Calculator

Get perfectly spaced spindles for your railing project. Choose between calculating the minimum number of spindles needed to meet code, or entering a custom count to find exact spacing.

Total length between end posts

Width of each spindle at its widest point

Building code maximum gap (typically 4 inches)

Only used when method is "Custom number of spindles"

Maximum Spacing Method (Minimum Spindles):
Spindles = ⌈(Railing Length - Spindle Width) ÷ (Max Gap + Spindle Width)⌉

Actual Spacing:
Actual Gap = (Railing Length - Spindles × Spindle Width) ÷ (Spindles + 1)
Center Spacing = Railing Length ÷ (Spindles + 1)

Code Check:
Actual Gap ≤ Maximum Allowed Gap
Railing: 120″ long, 1.5″ wide spindles, 4″ max gap.

Space per unit = 4 + 1.5 = 5.5″
Spindles = ⌈(120 - 1.5) ÷ 5.5⌉ = ⌈21.55⌉ = 22 spindles
Total spindle width = 22 × 1.5 = 33″
Total gap space = 120 - 33 = 87″
23 gaps × 3.783″ each = 87″
Result: 22 spindles at 3.78″ spacing ✅ Passes code

What is the maximum spindle spacing allowed by building code?

Most building codes (IRC R312, IBC 1015) require the space between spindles to not exceed 4 inches (102 mm). This 4-inch sphere rule prevents children from passing through or getting their heads stuck. For commercial buildings, the requirement may be stricter. The National Building Code of Canada allows 4 inches (100 mm). UK Building Regulations require gaps no larger than 99 mm (3.9 inches). Always verify local codes before starting your project. The spacing measurement is taken at the narrowest point between adjacent spindles.

How do I calculate even spindle spacing?

To space spindles evenly: (1) Measure total railing length between posts. (2) Add one spindle width to the railing length. (3) Divide by the desired number of spindles plus one. This gives center-to-center spacing. To find the number of spindles: subtract one spindle width from the railing length, then divide by the maximum allowed spacing plus one spindle width. Round up to the nearest whole number. This calculator provides both approaches: exact spacing with a target number or maximum spacing to determine minimum spindles needed.

Should spindle spacing be different for stairs versus decks?

The 4-inch maximum gap rule applies equally to stairs and deck railings. However, on stairs, spindles are installed at an angle matching the stair pitch. The critical measurement is the horizontal gap (clear opening) measured at the tread nosing line. Because spindles are angled, the diagonal spacing along the stringer will be larger than the horizontal spacing. Always verify the horizontal gap meets code. For stair railings with a rake angle, measure from the center of one spindle to the center of the next, projected horizontally.

How many spindles do I need for my railing?

A general rule: for standard 1.5-inch square spindles with 4-inch maximum spacing, you need approximately 2-3 spindles per linear foot of railing. For a 10-foot railing: (120 - 1.5) / (4 + 1.5) = 118.5 / 5.5 = 21.5, so 22 spindles needed. Actual spacing = (120 - 22 × 1.5) / 23 = 3.78 inches. This passes the 4-inch code requirement. You can also use fewer spindles with wider spacing (up to 4 inches) to save on material costs while remaining code compliant.