Spindle Spacing Calculator

Calculate a spindle count for your maximum clear gap

Spindle Spacing Calculator

Outer edge of first spindle to outer edge of last; both flush with the ends

Width of a single spindle

Largest permitted edge-to-edge gap between adjacent spindles

How to Use the Spindle Spacing Calculator

Enter the measured span, equal spindle width, and the largest clear gap you want, all in millimeters. The first and last spindle are assumed flush with the ends. Aesthetic or safety limits must be selected for the actual project; the calculator does not select them.

Calculation Method

For n spindles, clear gap = (length − n × width) ÷ (n − 1). The smallest integer n that keeps this gap at or below your maximum is ceil((length + maximum gap) ÷ (width + maximum gap)), with at least two spindles and enough span for their widths. Center spacing is clear gap plus spindle width.

Example: 2,000 mm length, 40 mm width, and 90 mm maximum clear gap produce 17 spindles. The 16 clear gaps are (2,000 − 17 × 40) ÷ 16 = 82.5 mm; center spacing is 122.5 mm. Sixteen spindles would leave 90.67 mm clear, exceeding the entered maximum.

Layout Assumptions

All pieces have the same width, the span is straight, and the two outer pieces are flush with the measured ends. The result has no end gaps. If posts, returns, or uneven widths change the usable span, measure that span again and check those separate openings.

The 2024 International Building Code §1015.4 illustrates why a chosen gap needs context: its guard opening test uses a sphere and has exceptions. This page does not determine which provision applies. Source edition: 2024; checked 2026-09-29.

Applications

The arithmetic can help mark equal-width pickets in railings, fences, or woodworking. It does not assess fasteners, loading, material strength, guard height, or other openings.

Measuring Tips

Measure the width where the actual clear opening occurs, mark the two end pieces, then mark each center by the reported center spacing. Measure the finished gaps after installation, including any gap at a post.

Frequently Asked Questions

Why does the calculator round the count up?

The entered gap is a maximum. Rounding the count down can make the actual gap larger than that limit.

Is the result code compliant?

It checks only the modeled gap between adjacent equal-width spindles. Required guard openings and exceptions depend on the applicable code and the whole installation.

What happens if the span is too short?

A flush-end layout needs at least two spindles. If two spindle widths do not fit, no between-spindle gap exists and the tool reports no layout.