This page is running inside a frame that blocks outside connections. Open aerialquote.com directly.
Get a price Design a deck Calculators Animations Our dataset Guides For pros

Baluster spacing calculator

Type the length between your posts and the width of one baluster. Get the fewest balusters that stop a 4 inch ball, the even gap, and where to mark each one, with a picture that tests every gap.

I measure in

Your rail

Measure from the inside face of one post to the inside face of the other. Typed lengths can use other units: 6 ft, 72 in, 1.8 m, 5 ft 11 1/2 in.

See it, with the 4 inch ball

Balusters for this rail0

Where to mark

The math

    How to use the baluster calculator

    Pick Level rail for a deck or porch guard, Stair rail for a sloped one, or Several runs to total a whole job. For a level rail, measure the clear length between the inside faces of the two posts, type the width of one baluster, and keep the widest gap at 3 7/8 inches or change it. The page picks the fewest balusters that keep every gap at or under that, makes the gaps equal, and tells you where to mark each one. The picture stands the balusters up to scale and rolls a 4 inch test ball along the rail. A red ball means it fell through a gap. Press Metric to type millimeters.

    The formula

    balusters = round up of (length − gap) ÷ (width + gap)
    even gap = (length − balusters × width) ÷ (balusters + 1)
    center to center = width + even gap

    There is one more gap than there are balusters, because a gap sits on each side of every baluster and the two end gaps meet the posts. For every gap to be at most g, n balusters and n + 1 gaps must fill the length: n × width + (n + 1) × g is at least the length. Solve for n, round up, then share the leftover space out equally. Rounding up only shrinks the gaps. If you type your own end gap, the page keeps it at both posts and spreads the rest between the balusters.

    A worked example

    A rail is 72 inches between posts and the balusters are 1 1/2 inches wide. With a 3 7/8 inch limit, (72 − 3.875) ÷ (1.5 + 3.875) = 12.67, which rounds up to 13 balusters. The even gap is (72 − 13 × 1.5) ÷ 14 = 3.75 inches, or 3 3/4. Center to center is 1.5 + 3.75 = 5.25 inches. The first baluster's left face goes 3 3/4 inches from the post and its center 4 1/2 inches from it. Twelve balusters would leave gaps of about 4.15 inches, so a 4 inch ball would pass: that is a fail. That example is what the calculator shows when it opens.

    What the code says

    The International Residential Code, section R312.1.3, says an opening in a required guard may not let a sphere 4 inches across pass. City and county handouts that quote it add two exceptions on stairs: the triangle formed by the riser, tread and bottom rail must stop a 6 inch sphere, and openings on the open side of a stair must stop a sphere of 4 3/8 inches. A deck guard is at least 36 inches high; on the open side of a stair the handouts I read say 34, measured straight up from the line through the front edges of the treads, though one lists 36. A gap of exactly 4 inches lets the sphere through, so the page marks 4 inches or more as a fail. A deck article adds that the space under the bottom rail must stay under 4 inches too.

    Your building department decides which edition applies and whether your town changed these numbers. The page does not replace it or an engineer, and it does not check that the guard is strong enough: the code's test load is 200 pounds at the top rail.

    Why the page aims for 3 7/8 inches, not 4

    A tape mark lands on the nearest 1/16 inch, a baluster can lean, a post can bow, and dry lumber shrinks after the rail is built. Any of those can open a gap that measured 3 15/16 inches on the day you built it. The page leaves 1/8 inch, enough for two marks each rounded by up to 1/32 inch. That margin is ours, not the code's. One Connecticut town handout suggests 3 1/2 inches for pressure-treated wood to allow for shrinkage, so the page has a chip for it. The tile marked Marking to the nearest 1/16 shows the widest gap you would get if you set every baluster on the nearest tape mark.

    Stairs

    Balusters stay plumb on a stair, so the ball sees the level gap, not the gap along the sloping rail. On a 7 1/2 by 10 stair, a level gap of 3.63 inches reads 4.54 inches if you lay a tape along the slope, so never compare a slope reading with 4. Mark with a level, or use the center to center along the slope that the page prints, 6.41 inches here. The angle is the arctangent of rise over run, 36.87 degrees. Cut both ends of each baluster at that angle; the long point is longer than the short point by the width times rise over run, 1 1/8 inches for 1 1/2 inch balusters. Balusters that stand on the treads change length with where they stand, repeating every tread.

    Where the numbers come from

    The spacing is arithmetic, and an inch is exactly 25.4 millimeters, so the metric switch changes only what you type and read. The code numbers come from city and county handouts quoting the 2012, 2018 and 2021 editions of the IRC; ICC's own text was behind a paywall and was not read. The 3 7/8 inch default and the 5 percent extra on the Several runs tab are our choices.

    What people use it for

    • Deck and porch guards, 2x2 wood, round or square metal balusters.
    • Stair rails on decks and entry steps.
    • A buy list for a whole deck, boards or tubes, with spares.
    • Checking a rail that was built before you bought the house.

    Common mistakes

    • Measuring from post center to post center. Use the clear length between the inside faces.
    • Forgetting the extra gap. There are always one more gaps than balusters.
    • Reading a gap along the slope. On a stair the sphere sees the level gap.
    • Rounding the count down. That widens every gap. Round up.
    • Adding up spacings from the last mark. Mark every baluster from the same post so errors do not build up.
    • Calling a 4 inch gap a pass. A 4 inch ball fits a 4 inch gap.

    Questions

    How many balusters do I need per foot?

    About 2.2 for 1 1/2 inch balusters at a 3 7/8 inch gap, because each baluster and gap together take 5 3/8 inches. The calculator gives the exact count for your length.

    Does the end gap at the post have to match the others?

    No, but it has to stop the ball too. Pick I will type it to set your own end gap. The page checks it against the same limit.

    Can I use metric?

    Yes. Press Metric to type millimeters or meters. The 4 inch limit is 101.6 millimeters exactly. Other countries have their own rules, so check yours.

    Does it check that the rail is strong enough?

    No. The page only spaces the balusters. Posts, rail connections and the 200 pound test load are for your building department and the product's instructions.

    Can I share my result?

    Yes. Share makes a link with a picture for Facebook, X and Pinterest, a link you can copy, and a short video for TikTok made on your device. The link keeps only sizes and settings, for 90 days, never prices.

    Related calculators