Baluster Spacing Calculator
Calculate IRC-compliant baluster spacing for deck and stair railings.
Number of Balusters
13
Actual Gap
3.75 in (3 3/4")
Railing Layout
IRC baluster spacing requirements
The International Residential Code (IRC) Section R312.1.3 requires that openings in guards — including baluster spacing on decks, stairs, and balconies — must not allow a 4-inch sphere to pass through. This means the clear gap between any two adjacent balusters must be 4 inches or less. On the open sides of stairs, the IRC permits a slightly larger 4⅜-inch sphere, but building to the 4-inch rule everywhere is the safe, conservative choice.
This rule applies to residential railings where there's a drop of more than 30 inches (IRC R312.1.1). Commercial guards fall under IBC Section 1015.4, which applies the same 4-inch sphere rule. Some local jurisdictions adopt stricter requirements, so always check your local building code before starting construction.
How to calculate baluster spacing
Here's the step-by-step process, using a 72-inch (6-foot) rail section with 1.5-inch square balusters:
- Start with the IRC maximum gap. The code allows up to 4 inches between balusters.
- Calculate minimum balusters needed. Use the formula: n = ceil((rail_length - baluster_width) / (4 + baluster_width)). For our example: ceil((72 - 1.5) / (4 + 1.5)) = ceil(70.5 / 5.5) = ceil(12.82) = 13 balusters.
- Calculate actual gap. Distribute the remaining space evenly: gap = (rail_length - n × baluster_width) / (n + 1). For our example: (72 - 13 × 1.5) / (13 + 1) = (72 - 19.5) / 14 = 52.5 / 14 = 3.75 inches.
- Verify compliance. 3.75 inches is less than 4 inches — the spacing is IRC compliant.
The calculator above handles this math automatically. Enter your rail length and baluster width, and it returns the baluster count and exact gap measurement.
Common mistakes
- Measuring center-to-center instead of clear space. The IRC measures the gap (daylight) between balusters, not the distance between their centers. Center-to-center measurement includes half a baluster width on each side, which would overstate your actual gap.
- Forgetting post width. The rail length you enter should be the clear span between posts (or between the inside faces of newel posts), not the total railing length including posts.
- Assuming local codes match the IRC. Some jurisdictions require gaps of 3.5 inches or less (especially for child safety), or have different rules for stairs versus decks. Always verify with your local building department.
- Not accounting for baluster shape. Round balusters create wider gaps at the widest point between curves. Use the narrowest dimension of the baluster cross-section for the width input.
Frequently asked questions
- What is the maximum gap between balusters?
- The International Residential Code (IRC R312.1.3) requires that the gap between balusters be no more than 4 inches. The standard is that a 4-inch sphere cannot pass through the opening. This applies to decks, stairs, and balconies on residential projects; commercial guards fall under IBC 1015.4.
- How many balusters do I need for a 6-foot railing?
- For a 6-foot (72-inch) railing with standard 1.5-inch square balusters, you need 13 balusters. This gives you gaps of approximately 3.75 inches — well within the 4-inch IRC maximum.
- Do I measure baluster spacing from center to center?
- No. The IRC measures the clear space (the gap) between balusters, not the center-to-center distance. A 4-inch sphere must not be able to pass through the opening. Always measure the gap — the daylight between two adjacent balusters.