Job card nΒΊ 05 β€” railing layoutcarpenter's notebook Β· measure twice

Baluster Spacing Calculator

Even gaps, code-passing math β€” mark it once, cut it right.

field ruler β€” clear opening, post face to post face

The cut list

One railing section at a time β€” clear opening only.

–
–
Balusters
–
Actual gap
–
On-center

Elevation

Drawn to scale from your numbers β€” posts, gaps and centers.

Mark the on-center positions on top and bottom rails, starting from the same post. First center sits one gap + half a baluster off the post face.

Section totalizer

Every run gets its own even layout β€” then one shopping list.

SectionLengthBalustersGap
–

Marking guide

Baluster center positions from the post face, in order.

    The 4-Inch Rule: Why Baluster Spacing Is a Safety Calculation

    Baluster spacing is not a style choice β€” it is a building code requirement with a child's head as the unit of measurement. The International Residential Code (IRC) requires that a 4-inch sphere must not pass through any opening in a guard railing. The number comes from child safety research: a 4-inch opening is small enough that a small child's head cannot pass through and get trapped. Decks, porches and landings more than 30 inches above grade need guards, and every gap in those guards β€” between balusters, between the bottom rail and the deck, everywhere β€” must respect the sphere rule.

    In practice, professionals do not aim for exactly 4 inches. Wood moves with humidity, installation is never perfect, and an inspector's tape measure is unforgiving. Most builders target 3.5 to 3.875 inches of clear gap, leaving a margin that absorbs swelling, shrinkage and slightly imperfect cuts. This tool defaults to a 4-inch maximum but computes your actual gap from even distribution β€” which, done right, lands comfortably under the limit with room to spare.

    The Math: Even Gaps From One Formula

    The layout problem: distribute balusters across a railing section so every gap is identical and none exceeds the maximum. The method: balusters = round up((length βˆ’ max gap) Γ· (baluster width + max gap)). Rounding up is the load-bearing step β€” it guarantees the resulting actual gap comes in under your maximum rather than over it. Then actual gap = (length βˆ’ balusters Γ— width) Γ· (balusters + 1), because balusters divide the opening into one more segment than there are balusters, and on-center spacing = gap + baluster width, which is the number you actually mark with a tape measure.

    A worked example: a 72-inch railing section with standard 1.5-inch balusters (a finished 2Γ—2) and a 4-inch maximum. Balusters = ceil((72 βˆ’ 4) Γ· 5.5) = ceil(12.36) = 13. Actual gap = (72 βˆ’ 19.5) Γ· 14 = 3.75 inches β€” safely under 4. On-center = 5.25 inches. Mark the first baluster center at gap + half the baluster width from the post face, then every 5.25 inches after that, and the layout lands perfectly even with equal gaps at both posts.

    Measure the Right Length

    The length in the formula is the clear opening between post faces, not the overall railing length and not the deck edge. Measure inside face to inside face of the posts (or wall) at the height the balusters will sit. Measure twice β€” a quarter inch of error across a long run shifts every gap. For stair railings, measure the horizontal run, not the distance along the slope: the code gap is measured horizontally, and a gap that looks right along the angled rail can fail when measured level. Stair guards also get a small mercy in the code: the IRC allows up to a 4β…œ-inch sphere on the open side of stair stringers, and a 6-inch sphere in the triangle formed by tread, riser and bottom rail.

    Code Presets: US, Stairs, UK and Canada

    The tool ships with the common standards built in. IRC residential (US): 4-inch maximum, minimum 36-inch rail height. IBC commercial (US): 4-inch maximum, 42-inch minimum height. Stair open side (IRC): 4β…œ inches. UK and Canada: 100 mm (3.94 inches), minimum 900 mm rail height. These are starting points, not permits β€” local jurisdictions can and do go stricter, especially for commercial work and multi-family housing. A five-minute call to the local building department before you buy lumber is the cheapest insurance in the project.

    Marking the Layout on the Rails

    Do the math once, then transfer it to wood. The reliable method: mark the on-center positions on both the top and bottom rails, starting from one post. First center = one gap + half a baluster width from the post face; every center after that = previous + on-center spacing. Use a sharp pencil or a marking knife (knife lines are more precise and guide the saw), and mark an X on the waste side of every line. Work from the same end on both rails so the balusters stand plumb. For long runs, snap a chalk line or clamp a straightedge and transfer all marks at once rather than walking the tape down the rail β€” cumulative tape-walk error is how the last gap ends up wrong. The tool's marking guide lists every center position for your section so you can work down the list without re-dividing anything in your head.

    Buying: The Cut List and Waste Factor

    Count every section of railing separately β€” deck perimeters are rarely one clean run; posts, gates and stairs break them into sections of different lengths, and each section gets its own even layout. The multi-section totalizer in this tool adds them up into one shopping list. Then add 10 percent waste: balusters get miscut, a few arrive twisted, and stain-grade lumber has a reject rate. For fasteners, budget two screws or nails per baluster end (top and bottom), and if you are toe-screwing, pre-drill β€” splitting a 2Γ—2 at the last hole of the day is a rite of passage nobody enjoys twice. Buy all balusters from the same batch and sight down each one before it goes in; a twisted baluster telegraphs through the whole railing line.

    Installation Tips From the Field

    Install the bottom rail first, level and at the right height above the deck β€” most codes also limit the opening under the bottom rail to 4 inches, so do not float it high for a "modern look" without checking. Set balusters plumb with a small level every few pieces; a single leaning baluster throws off the eye for the whole run. Work outward from the center of each section toward the posts, or post-to-post with the computed even gaps β€” either way, dry-fit the whole section before driving fasteners. Leave a hair of clearance (a sixteenth) between baluster ends and rails for expansion, and seal end grain before assembly β€” end grain drinks water and rots first. If you are staining, stain all six sides of every baluster before installation; the hidden faces are where rot starts.

    Common Failures and How to Avoid Them

    Uneven end gaps: caused by starting layout from the middle or measuring from the wrong face. Always start from a post face with the computed first-center offset. Gaps creeping over 4 inches: caused by rounding the baluster count down instead of up, or by measuring the full deck length instead of the clear opening. Racking on stairs: balusters cut square for level rails will not sit right on a sloped rail β€” cut the ends at the stair angle. Ignoring the bottom opening: the 4-inch sphere rule applies under the bottom rail too. Forgetting gates: a gate is a railing section with hinges; its balusters follow the same math, and the latch side needs the same gap discipline.

    A final field habit worth adopting: after the last baluster is in, walk the run with a 4-inch ball, a block of wood, or even a soda can (roughly 2.6 inches β€” well under the limit, a deliberately strict check). If it cannot pass anywhere, neither can an inspector's objection.

    When to Call It In

    A single straight deck section is a confident DIY project. Call a professional when the railing turns corners with compound angles, when stairs meet landings in three dimensions, when the deck is high enough that a failure means a real fall (anything above about 6 feet deserves extra respect), or when the inspector has already flagged a previous attempt. There is no shame in it β€” railing is life-safety carpentry, and the code exists because the failure mode is a person falling.

    Frequently asked questions

    How far apart should deck balusters be?

    Building code (IRC/IBC) requires that a 4-inch-diameter sphere cannot pass through any opening in a guard railing β€” a child-safety rule. In practice, aim for 3.5–3.875 inches of clear gap to leave margin for wood movement and imperfect installation.

    How do I calculate how many balusters I need?

    Balusters = round up((clear length βˆ’ max gap) Γ· (baluster width + max gap)). Rounding up guarantees the actual gap lands under the maximum. Then actual gap = (length βˆ’ balusters Γ— width) Γ· (balusters + 1), and on-center spacing = gap + width. The tool computes all three plus a code verdict.

    What is on-center baluster spacing?

    On-center (OC) spacing is measured from the center of one baluster to the center of the next, and equals the clear gap plus one baluster width. If your gap is 3.75 in and balusters are 1.5 in wide, OC spacing is 5.25 in β€” the number you actually mark on the rails.

    Do stair railings use the same spacing rules?

    The 4-inch sphere rule still applies, but gaps are measured horizontally, not along the slope. The IRC also allows up to 4β…œ inches on the open side of stair stringers. Measure the horizontal run between posts and let the tool apply the stair preset.

    How many balusters should I buy for a whole deck?

    Add up every section separately (each gets its own even layout), then add ~10% waste for miscuts and twisted stock. Budget two fasteners per baluster end, buy from one batch, and sight down each baluster before installing. The section totalizer above builds the full shopping list.

    How high does a deck railing need to be?

    The IRC requires a minimum 36-inch guard height for residential decks (measured from the deck surface to the top of the rail); the IBC requires 42 inches for commercial. Stair handrails sit 34–38 inches above the nosing line. Always confirm with your local building department.