Skip to content

Baluster Spacing Calculator

A baluster spacing calculator for deck, porch and stair railings: how many balusters fit between two posts, and the even gap that keeps you under the 4 inch rule.

Baluster Spacing Calculator Results update as you type
Railing
Measure from the face of one post to the face of the next, not center to center. Posts 6 ft on center with 4 × 4s (3½ in) leave 68½ in.
The residential code limits the gap so a 4 in ball can't pass through (IRC R312.1.3).
Balusters
Balusters
Measure one of your balusters across the face that shows from the deck.
How many post-to-post sections of the same length. Work out different lengths separately.
Your price
Your price
$
Leave at 0 to skip the cost estimate.

Results

Balusters per section 12 balusters 12 balusters per section with a 3 7/8 in gap, 5 3/8 in on center.

Layout

Gap between balusters
3 7/8 in
Gap, in decimal inches
3.88 in
Center to center (mark this)
5 3/8 in
Post face to first baluster center
4 5/8 in

Order

Balusters for all sections
12 balusters

Cost

On this page 11 sections
  1. How do I calculate baluster spacing?
  2. Worked example: 2 × 2 balusters between posts 68½ in apart
  3. Baluster spacing chart: balusters per section
  4. The 4 inch rule for balusters
  5. How to lay out balusters
  6. Why a gap of exactly 4 in is cutting it close
  7. Spindles, balusters and pickets
  8. Frequently asked questions
  9. Related calculators
  10. Sources and method
  11. Add this calculator to your website

How do I calculate baluster spacing?

Baluster spacing comes from two steps. First, number of balusters = (space between posts − 4) ÷ (baluster width + 4), rounded up. Then gap = (space − balusters × width) ÷ (balusters + 1). Work in inches. Between posts 68½ in apart, 2 × 2 balusters (1½ in wide) need 12 balusters with a 3 7/8 in gap, 5 3/8 in on center.

Worked example: 2 × 2 balusters between posts 68½ in apart

One railing section between two 4 by 4 posts, 68 and a half inches apart, with twelve 2 by 2 balusters. Each gap is 3 7/8 inches, under the 4 inch code limit, and the balusters are 5 3/8 inches apart center to center. Drawn to scale. 68½ in between posts, twelve 2 × 2 balusters gap 3⅞ in 5⅜ in on center A 4 in ball must not fit through any gap (IRC R312.1.3)
  1. Space: posts 6 ft on center, 4 × 4s (3½ in wide), leave 72 − 3½ = 68½ in between the post faces. A 2 × 2 is actually 1½ in wide.
  2. How many balusters: (68½ − 4) ÷ (1½ + 4) = 11.7, rounded up to 12. Eleven would leave gaps over 4 in.
  3. Gap: 12 × 1½ = 18 in of balusters. 68½ − 18 = 50½ in, shared by 13 gaps (one more gap than balusters) = 3.88 in, or 3 7/8 in.
  4. Marks: the first baluster center is 4 5/8 in from the post face. Mark every 5 3/8 in after that.

Baluster spacing chart: balusters per section

Balusters needed between two posts, spaced evenly, with the largest gap the code allows: 4 in for decks and porches, 4⅜ in on the open side of stairs. Gaps are rounded to the nearest 1/16 in.

Space between posts2 × 2 (1½ in)¾ in metal2 × 2 on stairs
36 in6 · gap 3⅞ in7 · gap 3⅞ in6 · gap 3⅞ in
48 in8 · gap 4 in10 · gap 3 11/16 in8 · gap 4 in
60 in11 · gap 3⅝ in12 · gap 3 15/16 in10 · gap 4 1/16 in
68½ in (6 ft posts, 4 × 4)12 · gap 3⅞ in14 · gap 3⅞ in11 · gap 4 5/16 in
72 in13 · gap 3¾ in15 · gap 3 13/16 in12 · gap 4⅛ in
84 in15 · gap 3⅞ in17 · gap 3 15/16 in14 · gap 4 3/16 in
92½ in (8 ft posts, 4 × 4)17 · gap 3¾ in19 · gap 3 15/16 in15 · gap 4⅜ in
96 in17 · gap 3 15/16 in20 · gap 3⅞ in16 · gap 4¼ in

On stairs, measure the space along the slope of the rail, between the post faces.

The 4 inch rule for balusters

The International Residential Code (IRC R312.1.3) says a required guard must not let a 4 in sphere pass through anywhere from the walking surface up to the guard height. In practice, inspectors push a 4 in ball against the gaps. Two exceptions apply on stairs:

  • Open side of stairs: the limit is a 4⅜ in sphere.
  • The triangle formed by the tread, the riser and the bottom rail must stop a 6 in sphere.

A guard is required where the walking surface is more than 30 in above the ground within 36 in of its edge (R312.1.1). It must be at least 36 in high, or 34 in on stairs, measured from the line of the stair nosings (R312.1.2). Many towns amend the code, so check with your building department.

How to lay out balusters

  1. Measure each section between the post faces at rail height. Posts are rarely perfectly evenly spaced, so measure every section.
  2. Run the numbers for each different length. Sections of the same length can share one calculation.
  3. Mark the rail: the first baluster center sits one gap plus half a baluster from the post. Mark every "center to center" distance after that.
  4. Use a spacer block cut to the gap width. It is faster than measuring each one, but check against your marks every few balusters, because small errors add up.
  5. Check the last gap before fastening the final few. It should match the others.

Why a gap of exactly 4 in is cutting it close

Some lengths, like 48 in with 2 × 2s, work out to a gap of exactly 4 in. That meets the rule on paper, but it leaves no room for a baluster that is slightly out of plumb or a board that varies in width. If you want a margin, choose "My own maximum gap" and enter something smaller, such as 3½ in. The calculator then adds balusters until every gap is at or under your number.

Spindles, balusters and pickets

Balusters and spindles are the same thing: the vertical pieces in a railing. Turned wooden ones on indoor stairs are usually called spindles. The spacing math is identical, so this works as a spindle spacing calculator too. For fence pickets, which have no code gap limit, use the fence calculator. To work out decking for the same project, use the deck calculator, and for the steps, the stair calculator.

Frequently asked questions

What is the code for baluster spacing?
Under the International Residential Code (R312.1.3), a 4 in sphere must not pass between balusters on a required guard. On the open side of stairs, the limit is 4⅜ in, and the triangle under the bottom rail must stop a 6 in sphere. Local codes can be stricter.
How many balusters do I need per foot?
With 2 × 2 balusters and gaps under 4 in, roughly 2.2 per foot of railing (one every 5½ in or less). With ¾ in metal balusters, about 2.5 per foot (one every 4¾ in or less). Work out each section between posts for the exact count, because the posts take up some of the length.
How many balusters are in a 6 ft section?
With 4 × 4 posts 6 ft on center, the space between posts is 68½ in. That takes 12 wood 2 × 2 balusters with a 3⅞ in gap, or 14 ¾ in metal balusters with a 3⅞ in gap.
How many balusters are in an 8 ft section?
With 4 × 4 posts 8 ft on center, the space is 92½ in: 17 wood 2 × 2 balusters with a 3¾ in gap, or 19 ¾ in metal balusters.
Do I measure baluster spacing center to center?
The code limit is the clear gap between balusters, not center to center. The calculator gives both: the gap to check against the 4 in rule, and the center-to-center distance to mark on the rail.
What size are 2 × 2 balusters?
A dry 2 × 2 is actually 1½ × 1½ in (American Softwood Lumber Standard, PS 20). Metal balusters are commonly ¾ in. Measure yours, and choose "Other width" if they are different.

Sources and method

Last checked October 22, 2026. How we build and test every calculator: methodology.

Add this calculator to your website

Free for any site: paste this code into a page and the calculator appears there, always up to date. No sign-up. It works on phones and resizes itself.

All embeddable calculators