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.
- Checked
- 3 sources
- Formula tested
- Works offline
Results
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
- Balusters
- –
On this page 11 sections
- How do I calculate baluster spacing?
- Worked example: 2 × 2 balusters between posts 68½ in apart
- Baluster spacing chart: balusters per section
- The 4 inch rule for balusters
- How to lay out balusters
- Why a gap of exactly 4 in is cutting it close
- Spindles, balusters and pickets
- Frequently asked questions
- Related calculators
- Sources and method
- 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
- 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.
- How many balusters: (68½ − 4) ÷ (1½ + 4) = 11.7, rounded up to 12. Eleven would leave gaps over 4 in.
- 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.
- 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 posts | 2 × 2 (1½ in) | ¾ in metal | 2 × 2 on stairs |
|---|---|---|---|
| 36 in | 6 · gap 3⅞ in | 7 · gap 3⅞ in | 6 · gap 3⅞ in |
| 48 in | 8 · gap 4 in | 10 · gap 3 11/16 in | 8 · gap 4 in |
| 60 in | 11 · gap 3⅝ in | 12 · gap 3 15/16 in | 10 · gap 4 1/16 in |
| 68½ in (6 ft posts, 4 × 4) | 12 · gap 3⅞ in | 14 · gap 3⅞ in | 11 · gap 4 5/16 in |
| 72 in | 13 · gap 3¾ in | 15 · gap 3 13/16 in | 12 · gap 4⅛ in |
| 84 in | 15 · gap 3⅞ in | 17 · gap 3 15/16 in | 14 · gap 4 3/16 in |
| 92½ in (8 ft posts, 4 × 4) | 17 · gap 3¾ in | 19 · gap 3 15/16 in | 15 · gap 4⅜ in |
| 96 in | 17 · gap 3 15/16 in | 20 · gap 3⅞ in | 16 · 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
- Measure each section between the post faces at rail height. Posts are rarely perfectly evenly spaced, so measure every section.
- Run the numbers for each different length. Sections of the same length can share one calculation.
- 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.
- 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.
- 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?
How many balusters do I need per foot?
How many balusters are in a 6 ft section?
How many balusters are in an 8 ft section?
Do I measure baluster spacing center to center?
What size are 2 × 2 balusters?
Related calculators
Sources and method
- International Residential Code 2021, Section R312 Guards (ICC) — R312.1.1 guards over 30 in; R312.1.2 36 in height (34 in on stairs); R312.1.3 4 in sphere, 4⅜ in on stairs, 6 in stair triangle
- American Wood Council, DCA 6: Prescriptive Residential Wood Deck Construction Guide — deck guard openings must not pass a 4 in sphere; guard posts 4 × 4 minimum
- NIST: American Softwood Lumber Standard (PS 20) — a dry nominal 2 in dimension is 1½ in
Last checked October 22, 2026. How we build and test every calculator: methodology.