Baluster calculator

How many balusters a deck, porch or stair railing needs and exactly where to put them, with every gap under the code's 4 in. sphere.

Start from:

You need

52 balusters

Per section
13 × 4 sections
Gap
3 3/4 in (3.75 in.)
On center
5 1/4 in
First center from post
4 1/2 in
Guard height
at least 36 in.

Mark centers from the left post at: 4 1/2, 9 3/4, 15, 20 1/4, 25 1/2, 30 3/4, 36, 41 1/4, 46 1/2, 51 3/4, 57, 62 1/4, 67 1/2 in.

Every gap is under 4 in, IRC R312.1.3's sphere. Guards are required where the floor is more than 30 in. above the ground. Local codes amend these, so check yours.

72 in between posts: 13 balusters, 3 3/4 in gaps
One section drawn to scale from your numbers.

How to calculate baluster spacing

With n balusters in a section there are n + 1 equal gaps: one at each post and one between each pair. The code says no gap may let a 4 in. sphere through (4 3/8 in on the sides of stair treads), so the calculator finds the fewest balusters that keep every gap smaller than that.

  1. Balusters = (space − max gap) ÷ (baluster width + max gap), rounded down, plus 1
  2. Gap = (space − balusters × width) ÷ (balusters + 1)
  3. On center = gap + width; the first center is gap + half a width from the post

Worked example

A deck section with 72 in. between posts and 1 1/2 in wide 2x2 balusters: (72 − 4) ÷ (1.5 + 4) = 12.36, rounded down is 12, plus 1 = 13 balusters. The gaps are (72 − 13 × 1.5) ÷ 14 = 3 3/4 in, with centers 5 1/4 in apart, the first 4 1/2 in from the post.

Balusters per section

1 1/2 in wide 2x2 balusters, inside-to-inside space between posts. Deck gaps stay under 4 in, stair gaps under 4 3/8 in; gaps are rounded down to 1/16 in.

SpaceDeckGapStairGap
36 in.63 13/16 in63 13/16 in
48 in.93 7/16 in84 in
60 in.113 5/8 in104 1/16 in
72 in.133 3/4 in124 1/8 in
84 in.153 13/16 in144 3/16 in
96 in.173 7/8 in164 3/16 in

Code text from the 2018 IRC section R312, as quoted by Knox County Code Administration.

Baluster questions

What is the code for baluster spacing?

The International Residential Code (R312.1.3) says guards can't have openings that let a sphere 4 in. in diameter pass through, so the space between balusters must be less than 4 in. On the open sides of stairs the limit is 4 3/8 in, and the triangle formed by the riser, tread and bottom rail may stop a 6 in. sphere. Cities and counties adopt and amend the code, and some allow a little more, so check with your building department.

How many balusters do I need?

For 2x2 balusters, a 6 ft (72 in.) section takes 13 and an 8 ft (96 in.) section takes 17, measured inside the posts. Measure each section, enter the most common size with how many there are, and run the odd ones separately. The table above covers common sizes.

How many balusters per stair tread?

With the 10 in. minimum tread depth and 2x2 balusters, 2 per tread keeps the gaps under 4 3/8 in: 10 ÷ 2 − 1.5 = 3 1/2 in. Deeper treads or wider balusters can change that; enter the run between newel posts with "Open side of a stair" to check.

How tall does a deck railing need to be?

The IRC requires guards at least 36 in. high on porches, balconies, ramps and raised floor surfaces such as decks more than 30 in. above the ground below, and at least 34 in. on the open sides of stairs, measured from the tread nosings. Some places require more.

Are balusters measured on center?

The code limits the clear gap between balusters, not the center-to-center distance. Once you know the gap, on-center spacing is gap + baluster width (5 1/4 in in the 72 in. example). Marking centers is easiest: the calculator lists each center from the left post.

How do I keep the spacing even?

Use the gap the calculator gives, which is the same at both posts and between balusters, and cut a spacer block to that width. Start at one post, set a baluster against the spacer, and work across. Check against the center marks every few balusters so small errors don't add up.