Railings · 4 in sphere rule

Baluster spacing calculator

Enter the clear length between two posts and the width of your balusters. You get how many you need, the equal gap between them, the center to center spacing and where to mark each one, with every gap kept under the 4 in sphere limit. It works for a deck, a porch, a balcony or a stair. For the stairs themselves use the stair calculator, and for the deck frame the deck calculator.

Railing

Level: a deck, porch, balcony or landing. Stair: a rail that follows the stair slope.
Face of one post to the face of the next. On a stair, measure it level.
A 2×2 wood baluster is 1½ in. Metal ones are often ⅝ in.
The limit is a gap under 4 in. 3⅞ in leaves a margin.
–
–
–
–

Layout marks

Printing and saving as PDF are free too. In the print window, choose “Save as PDF” as the destination.

How to use it

  1. Measure the clear length between the two posts, from the face of one to the face of the other.
  2. Enter the baluster width. A 2×2 is 1½ in wide. Metal balusters are often ⅝ in.
  3. Keep the largest gap at 3⅞ in or lower it. The limit is a gap under 4 in.
  4. Choose Stair if the rail follows a stair, and enter the riser and tread.
  5. Mark the layout. The list under the drawing gives the center of each baluster from the first post.
Video: how many balusters do you need? (45 s). Watch on YouTube

The formula

The goal is equal gaps, with the same gap at the two ends against the posts. If L is the clear length, W the baluster width and G the largest gap you allow:

How many balusters for common lengths

With a largest gap of 3⅞ in. The gap shown is the equal gap you get.

Clear length1½ in balusters⅝ in balusters
36 in 6 at 3 7/8 in gap 8 at 3 7/16 in gap
48 in 9 at 3 7/16 in gap 10 at 3 13/16 in gap
60 in 11 at 3 5/8 in gap 13 at 3 11/16 in gap
72 in 13 at 3 3/4 in gap 16 at 3 5/8 in gap
84 in 15 at 3 7/8 in gap 18 at 3 13/16 in gap
96 in 18 at 3 5/8 in gap 21 at 3 3/4 in gap
120 in 22 at 3 13/16 in gap 26 at 3 13/16 in gap

Baluster spacing template: the spacer block method

You do not need a printed template to install balusters evenly. Make a spacer block and use it as the template:

  1. Enter your length and baluster width in the calculator and read the clear gap. For a 6 ft rail with 2×2 balusters it is 3 3/4 in.
  2. Cut a scrap of wood to exactly that width, so it fits between two balusters.
  3. Fasten the first baluster against the post, with the block between the post and it. Place the block against that baluster, set the next one against the block, and repeat.
  4. Check the last gap before you fasten the final baluster. It should match the block. If it does not, a mark was off.

If you prefer marks on the rail, use the list under the drawing (the center of each baluster from the first post), or press Print / save as PDF to get a layout sheet you can take to the job.

The rules behind it

This tool gives estimates for planning. It does not check the strength of the posts, the rail or the connections, which also have to meet the code (a guard has to resist a 200 lb load at the top). Confirm the requirements with your local building department before you build.

Frequently asked questions

How many balusters do I need for a 6 ft railing?

With 1½ in wide (2×2) balusters and a largest gap of 3⅞ in, a 6 ft (72 in) run between posts needs 13 balusters. The gap comes out at 3 3/4 in and they sit 5 1/4 in center to center. Change the width or the gap in the calculator and the count updates.

What is the 4 inch rule for balusters?

A required guard cannot have an opening that lets a 4 in sphere pass. In practice every gap between balusters, and between a baluster and a post, has to be under 4 in. Builders aim for 3⅞ in or a little less, so a small error in cutting or fastening does not push a gap over the limit.

Is the limit different on stairs?

Yes, a little. The IRC lets the open side of a stair use openings that do not pass a 4⅜ in sphere, and the triangle formed by the riser, the tread and the bottom rail can be larger, up to a 6 in sphere. Many builders and inspectors use 4 in everywhere to keep it simple, and local codes change the details, so confirm with your building department.

How do I measure the spacing on a stair?

Keep the balusters plumb (vertical) and measure the spacing level, along the horizontal run of the rail, not along the slope. The calculator does this and also gives the step in height between neighbouring balusters, so you can mark the cuts on the rail.

How high does the guard have to be?

At least 36 in above the walking surface for a deck, porch, balcony or landing. Where the top rail is also a stair handrail, it must be 34 to 38 in above the nosings. Guards are required when the drop is more than 30 in, and local rules differ.

Sources and further reading

See also the deck stairs guide and the stair handrail requirements guide.