Skip to content
Construction

Spindle Spacing Calculator

Enter your railing length, spindle width, and post details to find out exactly how many spindles you need and how far apart to space them. The calculator supports both flat deck railings and angled stair railings, gives you even spacing and balanced end spacing options, and checks your layout against the 4-inch building code maximum. Switch between inches and centimeters at any time.

Your details

Stair railings run on an angle, so the on-slope distance between spindles differs from the horizontal gap.
The clear span between the inner faces of the two end posts.
in
The face width of each spindle or baluster. Standard square balusters are 1.5 in (3.8 cm).
in
U.S. and Canadian building codes require this gap to be no more than 4 in (10 cm) so a 4-inch sphere cannot pass through.
in
Balanced end spacing adjusts the first and last gap so spindles appear centered in the opening. Even spacing uses the same gap between every spindle and at both ends.
Spindles neededCode compliant
17

Total number of spindles for this railing run

Gap between spindles4
End gap (at posts)3.25
On-center spacing5.5
Code complianceCompliant - largest gap is 4.00 in (max 4 in)
4 in
Too tight<2Code safe2-4Too wide4+
00.5144892
Position along rail (in)

17 spindles, 4.00 in apart.

  • You need 17 spindles for this railing run.
  • Interior gaps are 4.00 in and end gaps are 3.25 in.
  • Set your drill or jig to 5.500 in on-center between spindles.

Next stepLay out the first spindle at the calculated end spacing from the post, then step across at the on-center distance.

How spindle spacing works

A spindle spacing calculation starts with the inside clear span - the distance between the inner faces of the two end posts. Divide that span by one "unit length" (the width of one spindle plus the maximum allowed gap) and round down to get the number of spindles. Multiplying the spindle count by the spindle width and subtracting from the rail length leaves the total space for gaps. How that space is distributed depends on the spacing mode: balanced end spacing keeps interior gaps at the maximum allowed and shares the leftover equally between the two end gaps, which creates a symmetrical centered look. Even spacing divides the total gap space equally among all gaps including the ends, giving a slightly tighter interior gap but identical spacing throughout.

Stair railing spindle spacing

Stair railings slope along the pitch of the stairs, which means the on-slope distance between spindle centers is longer than the horizontal distance. Building codes measure gaps horizontally, so the 4-inch (100 mm) limit applies to the horizontal dimension, not the along-slope measurement. To find where to mark spindle positions on the stringer, divide the horizontal on-center distance by the cosine of the stair pitch angle. A typical residential stair at 37 degrees has a cosine of about 0.80, so a 5.5-inch horizontal on-center distance becomes roughly 6.9 inches measured along the slope. This calculator converts automatically when you select the stair mode and enter the pitch.

Building code requirements

In the United States, the International Residential Code (IRC) requires that no sphere 4 inches in diameter can pass through any opening in a residential guard or railing. This sets the maximum clear gap between spindles at 4 inches (approximately 102 mm). Canada uses 100 mm under the National Building Code. Many local jurisdictions adopt these limits directly, but some have stricter rules, so always check with your building department before starting. Deck railings also have minimum height requirements that depend on how high the deck surface is above the ground: in the U.S., decks 30 inches or more above grade require a railing at least 36 inches tall. Commercial buildings, multi-family housing, and stairs each have their own requirements that often differ from residential codes.

Choosing between balanced and even spacing

Balanced end spacing is the preferred choice when appearance matters. By keeping interior gaps at exactly the maximum allowed and pushing the leftover to the two end gaps, the spindles look centered in the opening with slightly larger gaps at each post. Even spacing uses the same gap everywhere, which makes layout straightforward - just step across at a fixed interval - but the interior gaps will typically be slightly smaller than the maximum, since the end gaps also take their share of the total space. For long railing runs with many spindles the difference between the two approaches is minimal; for short runs with only a few spindles it can be quite visible.

Building code spindle spacing requirements

JurisdictionMax gapMin rail height (deck)Min rail height (stair)Notes
U.S. IRC (residential)4 in (102 mm)36 in (< 30 in drop)34-38 inNo sphere 4 in diameter can pass through
Canada NBC100 mm900 mm (< 600 mm drop)860-960 mmApplies to all guards
U.K. Building Regs100 mm900 mm900 mmNo sphere 100 mm can pass
Australia NCC125 mm1000 mm865 mmFor balconies; differs by height above ground
General rule of thumb3.5 in (89 mm)36 in34 inConservative margin below code max

Common residential building code requirements for baluster and spindle spacing. Always verify with your local authority.

Frequently asked questions

What is the maximum allowed gap between spindles?

In the United States and Canada, the standard residential building code requirement is that no sphere 4 inches (about 100 mm) in diameter can pass through the railing. In practice this means the clear gap between adjacent spindles must not exceed 4 inches. Some jurisdictions are stricter, and commercial buildings often require 4 inches as well but with other conditions, so check your local code.

How do I find the inside railing distance?

Measure the distance between the inner faces of the two end posts, not the outer faces and not from center to center. This clear span is what the spindles fill. If you have intermediate posts, calculate each bay separately and add the results.

What is the difference between balanced and even spindle spacing?

Balanced (centered) spacing keeps interior gaps at the target maximum and adjusts the two end gaps so the spindles appear centered in the opening. Even spacing uses exactly the same gap at every location including the ends. Balanced spacing looks more symmetrical; even spacing is slightly easier to lay out because every mark is the same distance apart.

Why do stair spindles need a different calculation?

Stair railings run on an angle, so the physical distance between spindles measured along the slope is longer than the horizontal distance. Building codes measure gaps horizontally, so you must work out the horizontal on-center distance first and then divide by the cosine of the stair pitch angle to get the distance to mark on the stringer. This calculator does that conversion for you when you select the stair mode.

How many spindles do I need per linear foot?

As a rule of thumb, plan on about three spindles per foot of railing (roughly one spindle every 4 inches measured on-center) when using 1.5-inch-wide balusters and a 4-inch maximum gap. The exact count depends on your spindle width and chosen gap, which is why a calculator is more reliable than the rule of thumb for ordering materials.

Can I use this calculator for interior staircases and balcony guards?

Yes, the same spacing formula applies. Select "stair railing" if the railing is on an angle and enter the horizontal clear span. Note that interior railings in some jurisdictions have different height requirements and may use a 4-inch or narrower gap depending on whether small children are expected to use the space. Check your local building or fire code.

Sources

Written by Aisha Rahman, PEng Structural Engineer · Toronto, Canada

Structural Engineer and PEng with 16 years designing and verifying load-bearing systems across Canada's most demanding construction environments.

Search 3,500+ calculators

Loading search…