DeckAndStair.com

Free Baluster Spacing Calculator — 4-Inch Rule 2026

Get the exact number of balusters and perfect spacing to pass the 4-inch rule — on your phone, on the job site. IRC 2026 compliant.

✓ 4-Inch Rule Checker ✓ Deck & Stair Mode ✓ Visual Railing Preview ✓ Imperial & Metric ✓ US · UK · CA · AU ✓ Free — No Sign-Up

Baluster Spacing Calculator

Step 1 — Select Railing Type
Unit System: Imperial (inches)
Imperial Metric
Step 2 — Enter Measurements
Measure between posts (inside face to inside face)
Actual width of one baluster
IRC max: 4" (use 3.875" for margin)
IRC: 36" under 30" high, 42" above 30"
How many separate railing runs
🎭 Visual Railing Preview
📞 Shopping Summary
📖

Expert Guide: Deck Railing & Baluster Spacing 2026

Getting baluster spacing wrong is one of the top reasons deck inspections fail. The math seems simple, but uniform spacing that also satisfies the 4-inch rule requires a precise calculation — not a guess. This guide explains the code, the math, and the tricks professionals use.

The 4-Inch Rule Explained

IRC Section R312.1.3 requires that no opening in a deck guardrail allow a 4-inch sphere to pass through. This means the gap between any two balusters — measured at the widest point — must be less than 4 inches (100mm). Most installers target 3.5–3.875 inches to provide a comfortable safety margin and account for wood movement.

Stair Railings: Tighter Rules

For stair guardrails, many jurisdictions reduce the maximum opening to 4-3/8 inches when measured with the sphere resting on the stair nosing. In practice, use the same 3.875-inch target gap for both deck and stair railings — this satisfies both requirements without separate calculations. Our stair mode applies this automatically.

How to Calculate Perfectly Even Spacing

The key insight is that you need to work backwards from the number of balusters, not forwards from a target gap. Here is the professional method: First, divide the rail length by (baluster width + target gap) to get an approximate baluster count. Round up to the next whole number. Then recalculate the exact gap as: (Rail Length - Number of Balusters x Baluster Width) / (Number of Balusters + 1). This gives you the exact spacing that fills the rail perfectly with even gaps on both ends. Our calculator does this in one click.

Railing Height Requirements by Country

US (IRC 2021): 36 inches minimum for decks under 30 inches above grade, 42 inches for decks 30 inches or higher. UK (Part K): 900mm (36 inches) minimum. Canada (NBC 2020): 900mm under 1.8m deck height, 1070mm above 1.8m. Australia (NCC): 1000mm (39 inches) for decks over 1 meter. Handrail height for stairs is 34–38 inches above the stair nosing in the US.

Baluster Materials in 2026

Square wood (1.5"): Most common, lowest cost, must be sealed annually. Composite square (1.5"): Low maintenance, matches Trex/TimberTech decking, costs 2-3x wood. Round metal (3/4"–1"): Aluminum or steel, very durable, popular for modern deck aesthetics. Requires specific post bracket systems. Cable railing: Horizontal cables must be tensioned so a 4-inch sphere cannot pass — typically 3.5-inch spacing. Note: some local codes restrict horizontal railing due to climbability concerns for children.

Post Spacing for Railings

Railing posts should be spaced no more than 6–8 feet apart for most wood and composite systems. Metal post systems vary — always check the manufacturer's specifications. Posts must be secured to the deck framing (not just the decking boards) with through-bolts or approved post base hardware. Notched posts over the rim joist are the traditional method but have been shown to weaken the rim joist — surface-mounted post bases are the modern preferred approach.

Deck Railing Baluster Spacing Calculator — How It Works

Our deck railing baluster spacing calculator takes three inputs: total railing length, baluster width (actual dimension) and maximum allowed gap. It finds the largest even spacing that keeps every gap at or below 4 inches — giving you a perfectly even layout with no odd gaps at the ends.

Calculating Baluster Spacing on Stairs

Calculating baluster spacing on stairs requires measuring along the slope. The 4-inch rule is measured perpendicular to the stringer pitch, not horizontally. Use our stair mode and the calculator handles the angle automatically.

Wood Spindle Spacing Calculator

A wood spindle spacing calculator uses the same formula as a baluster calculator — the terms are interchangeable. In the UK and Australia, vertical railing infills are called spindles. Whether you are spacing 32mm square spindles or 1.5-inch turned balusters, the 4-inch (100mm) maximum gap rule applies in all four countries.

Baluster Spacing Formula

The manual baluster spacing formula is: Spacing = (Total Length + Baluster Width) / (Balusters + 1) − Baluster Width. Divide total length by 5.5 and round up to get the starting baluster count, then verify the gap stays at or below 4 inches. Our calculator does this instantly.

Frequently Asked Questions

IRC Section R312.1.3 requires that no opening in a deck guardrail allow a 4-inch sphere to pass through. In practice, gaps between balusters must be less than 4 inches (100mm). Most installers target 3.5–3.875 inches to provide a safety margin. For stair railings, check local code as some jurisdictions require 4-3/8 inch maximum when measured from the stair nosing.
For standard 1.5-inch wide balusters with 3.5-inch spacing: approximately 3 balusters per linear foot. For 3/4-inch round metal balusters: approximately 3.5 per linear foot. Always calculate exactly using our tool — rounding errors accumulate and can leave you with an oversized gap at the end of the run that fails inspection.
US (IRC 2021): 36 inches for decks under 30 inches above grade, 42 inches for decks 30 inches or higher. UK (Part K): 900mm (36"). Canada (NBC): 900mm under 1.8m deck height, 1070mm (42") above 1.8m. Australia (NCC): 1000mm (39") for decks over 1 meter. These are minimums — always verify with your local building department.
Yes. For stair guardrails, the opening is measured with a sphere resting on the stair tread nosing, which can allow a slightly larger gap in some configurations. However, the safe and practical approach is to use the same 3.875-inch maximum gap for both deck and stair railings — this satisfies both requirements everywhere.
Yes, but check local codes first. Horizontal cables must be tensioned so a 4-inch sphere cannot pass through at any point. Cable must be tensioned to IRC specifications. Some jurisdictions restrict horizontal railings due to climbability concerns for children (it acts like a ladder). Vertical cable or glass panel systems avoid this issue entirely.
The formula is: Spacing = (Total Length + Baluster Width) / (Balusters + 1) minus Baluster Width. Divide total length by 5.5 and round up to get the baluster count, then verify the gap is 4 inches or less. Our calculator does this in one click.
DeckAndStair.com works as a baluster spacing calculator app directly in your mobile browser — no download required. Bookmark it to your home screen for quick on-site access. It calculates exact baluster count and spacing for any railing length in seconds.
In the UK, spindles must have a maximum gap of 100mm (about 4 inches). Switch our calculator to metric mode, enter your run in metres and spindle width in millimetres. The result shows exact spindle count and on-centre spacing in mm.
A deck railing spacing calculator calculates both baluster spacing (vertical infills, max 4-inch gap) and post spacing (structural posts, typically 6-8 feet). Our calculator covers both and shows whether your layout meets IRC 2026 code.
🔗 Complete Your Deck Project