Framing & structure

Baluster Spacing & Guard Height Calculator

Enter the clear distance between two posts of a level railing and the width of one baluster. Get how many you need, the exact gap including the one at each post, and where to mark every baluster, before you cut or screw anything.

Your level railing section

For a level run only: a deck, porch, balcony or landing, with plumb balusters between two posts. Balusters on the open side of a stair are not laid out here.

in
Inside face of one post to the inside face of the other, along the rail the balusters fix to. Not post centre to post centre. Inches like 68 1/2, or feet and inches like 5' 8 1/2". A number under 12 needs its unit: 10" or 10 in.
in
Measure one, across the face you see from the deck. A thinner baluster leaves a wider gap, so do not round up. If it is turned or tapered, enter its thinnest part and mark out from the centre column of the table. A baluster sold as 2x2 is usually not 2 in wide: the WoodCalc example listed under Sources on How it works takes it as 1 1/2 in.
Starts at the fewest that keep every gap at least 1/16 in under the 4 in limit. That is one more than the fewest on paper when the paper gap would be within 1/16 in of the limit, because two tape marks can open a gap by that much. Add one for closer spacing, or take one away to see the result. Changing a box above, or clearing this one, sets it back.
Guard height
Where is the guard?

This decides the minimum height and where it is measured from. A deck, porch, balcony or landing is a level surface. It does not change the baluster layout, which is for level runs only.

in
Straight down from the walking surface. Take the largest figure anywhere within 36 in out from the open edge: ground that falls away from the deck counts. For 4 ft type 48 or 4'. A number under 12 needs its unit: 10" or 10 in.
in
Straight up from the walking surface beside the guard to the top of the top rail.

Uses the 2021 IRC, Section R312.1: a guard is required where the drop is more than 30 in, and must be at least 36 in high (34 in on the open side of a stair). States and cities amend these figures, and some ask for a taller guard. Check which code your area has adopted.

Baluster layout, level run
Enter your railing section

    Not checked on this page.

    • Strength. The live-load table asks a guard to take a 200 lb load at any point along its top, and infill such as balusters to take 50 lb spread over one square foot. How the balusters and rails are fixed decides that. IRC Table R301.5 (2021)
    • The opening under the bottom rail. The opening limit runs from the walking surface up to the required guard height, so the space between the deck and the bottom rail is under the same sphere test. IRC R312.1.3 (2021)
    • Balusters on the open side of a stair, or on a ramp. Between plumb balusters on a slope the gap depends on the exact slope, so a small error in measuring it changes the gap. The code tests stair guards with a 4 3/8 in sphere; this tool does not lay them out. IRC R312.1.3 Exception 2 (2021)
    Mark-out table: where every baluster goes
    BalusterNear edge from the postCentre from the post

    Guard height
    Enter the drop and the guard height

    Rule: 2021 IRC R312.1 · Tested against 18 worked examples, 3 printed in a published source · How this is worked out →

    Common cases

    Questions people ask

    How far apart can deck balusters be?
    Under 2021 IRC Section R312.1.3 a required guard may not have an opening that lets a 4 in sphere through, from the walking surface up to the required guard height. A sphere just fits through a gap of its own width, so this tool treats a gap of exactly 4 in as a fail: the clear gap between balusters has to be less than 4 in. The limit is on the clear gap, not the centre-to-centre spacing. States and cities can amend it.
    How many balusters do I need for a 6 ft section?
    For a level section that measures 72 in between the inside faces of the posts, with balusters 1 1/2 in wide, 13: they leave 14 equal gaps of 3 3/4 in, counting the gap at each post. On paper the count is the smallest number n for which (distance between posts − n × baluster width) ÷ (n + 1) is less than 4 in. This tool then uses one more than the fewest on paper whenever the paper gap would be within 1/16 in of the limit, because two tape marks can open a gap by that much. That happens on about one section in four; for 47 3/4 in between posts the fewest on paper is 8 and the tool uses 9.
    Do the gaps at the posts count?
    Yes. The opening between a post and the first or last baluster is an opening in the guard like any other. For 48 in between posts and 1 1/2 in balusters, 8 balusters leave 9 gaps of 4 in, which is at the limit, so it takes 9. This tool spaces the balusters so the two end gaps are the same as all the others.
    Is the baluster spacing different on stairs?
    The 2021 IRC tests the guard on the open side of a stair with a 4 3/8 in sphere instead of a 4 in one (R312.1.3 Exception 2). This tool does not lay out balusters on a stair: between plumb balusters on a sloped rail the gap depends on the exact slope of the stair, so a small error in measuring the slope changes the gap. The layout here is for level runs, and a landing is a level run. The guard height check on this page does cover a stair guard.
    When does a deck need a guard, and how high?
    Under 2021 IRC Section R312.1.1 a guard is required where the walking surface is more than 30 in above the floor or ground below, measured at any point within 36 in out from the open edge. A required guard is at least 36 in high above the walking surface, or 34 in above the line of the tread nosings on the open side of a stair, and 34 in to 38 in there if its top serves as the handrail. Some states and cities ask for more.