# What baluster spacing do I need?

Works out how many balusters fit between two posts so every gap is under the 4-inch sphere rule (IRC R312.1.3), and the exact even gap and on-center spacing.

- Page: https://www.acalculator.org/construction/baluster-spacing-calculator
- JSON spec: https://www.acalculator.org/construction/baluster-spacing-calculator.json
- Version: 3f37af2c6c64

## Default answer

Example with the default inputs (Measure in Inches, Space between posts 72, Baluster width 1.5, Opening limit 4, Sections 1): Use 13 balusters per section, 3.75 in apart.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| u | Measure in | Inches or centimeters, for every length on the page. |
| l | Space between posts | The clear distance from the face of one post to the face of the next (72 in for a 6 ft section). |
| w | Baluster width | The width of one baluster as seen along the rail (1.5 in for a 2 × 2). |
| g | Opening limit | Every gap must be smaller than this: 4 in (10.16 cm) under IRC R312.1.3, or 4 3/8 in on the open side of a stair. |
| s | Sections | How many equal sections between posts you are building. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| balusters | Balusters per section | The fewest balusters that make every gap smaller than the opening limit. |
| spacing | Gap between balusters | The even gap: (space − balusters × width) ÷ (balusters + 1), in your unit. |
| fraction | Gap to the nearest 1/16 in | The gap in inches to the nearest sixteenth, halves rounded up (inches only). |
| center | On-center spacing | From the middle of one baluster to the middle of the next: gap + width. |
| total | Balusters in all | Balusters per section × sections. |
| unitName | Unit | The unit of the lengths. |

## Method

n = ⌊(L − g) ÷ (w + g)⌋ + 1 balusters; gap = (L − n w) ÷ (n + 1); on center = gap + w.

## Assumptions

- Each gap must be smaller than the opening limit: a 4 in (102 mm) sphere must not pass (IRC R312.1.3).
- Balusters are spaced evenly with a full gap at each post.
- Lengths are exact fractions of the typed decimals, so a gap of exactly the limit is caught.
- Check your local code: some places adopt other limits, and stair guards have their own exceptions.

## Worked examples

1. u = in, l = 72, w = 1.5, g = 4, s = 1 gives balusters = 13, spacing = 3.75, fraction = 3 3/4 in, center = 5.25, total = 13. Source: International Code Council, 2021 International Residential Code, R312.1.3 Opening limitations (required guards shall not have openings from the walking surface to the required guard height that allow passage of a sphere 4 inches (102 mm) in diameter; stair exceptions 6 in and 4 3/8 in), https://codes.iccsafe.org/content/IRC2021P2/chapter-3-building-planning#IRC2021P2_Pt03_Ch03_SecR312.1.3 (retrieved 2026-10-02).
2. u = in, l = 92, w = 1.5, g = 4, s = 4 gives balusters = 17, spacing = 3.694444, fraction = 3 11/16 in, total = 68. Source: International Code Council, 2021 International Residential Code, R312.1.3 Opening limitations (required guards shall not have openings from the walking surface to the required guard height that allow passage of a sphere 4 inches (102 mm) in diameter; stair exceptions 6 in and 4 3/8 in), https://codes.iccsafe.org/content/IRC2021P2/chapter-3-building-planning#IRC2021P2_Pt03_Ch03_SecR312.1.3 (retrieved 2026-10-02); Humboldt County, CA, Guards and Window Fall Protection (the 4-inch sphere rule for guard openings and the 4 3/8-inch stair exception), https://humboldtgov.org/3432/Guards-and-Window-Fall-Protection-CRC-R3 (retrieved 2026-10-02).
3. u = cm, l = 180, w = 4, g = 10.16, s = 2 gives balusters = 12, spacing = 10.153846, center = 14.153846, total = 24. Source: International Code Council, 2021 International Residential Code, R312.1.3 Opening limitations (required guards shall not have openings from the walking surface to the required guard height that allow passage of a sphere 4 inches (102 mm) in diameter; stair exceptions 6 in and 4 3/8 in), https://codes.iccsafe.org/content/IRC2021P2/chapter-3-building-planning#IRC2021P2_Pt03_Ch03_SecR312.1.3 (retrieved 2026-10-02).
4. u = in, l = 36, w = 1.5, g = 4.375, s = 1 gives balusters = 6, spacing = 3.857143, fraction = 3 7/8 in. Source: International Code Council, 2021 International Residential Code, R312.1.3 Opening limitations (required guards shall not have openings from the walking surface to the required guard height that allow passage of a sphere 4 inches (102 mm) in diameter; stair exceptions 6 in and 4 3/8 in), https://codes.iccsafe.org/content/IRC2021P2/chapter-3-building-planning#IRC2021P2_Pt03_Ch03_SecR312.1.3 (retrieved 2026-10-02).

## FAQ

### What is the 4-inch rule for balusters?

IRC R312.1.3 says required guards must not have openings that let a sphere 4 inches (102 mm) in diameter pass, from the walking surface up to the required guard height. In practice, every gap between balusters must be smaller than 4 inches.

### How do I calculate baluster spacing?

Find the fewest balusters n with (space − n × width) ÷ (n + 1) under 4 in: n = ⌊(space − 4) ÷ (width + 4)⌋ + 1. Then the even gap is (space − n × width) ÷ (n + 1). For 72 in and 1.5 in balusters: 13 balusters, 3.75 in apart.

### How many balusters do I need for a 6-foot section?

With 1.5 in (2 × 2) balusters and the 4 in rule, a 72 in space between posts takes 13 balusters with 3 3/4 in gaps. With wider balusters you need fewer: 3.5 in balusters take 10, with gaps of about 3.36 in.

### Is the gap measured from center to center?

No. The 4 in rule is about the clear opening, from the face of one baluster to the face of the next. The on-center spacing, which you mark on the rail, is the gap plus one baluster width.

### Are stairs different?

Yes. On the open side of a stair, the IRC allows openings that stop a 4 3/8 in sphere, and the triangle under the bottom rail at the stair may stop a 6 in sphere. Type 4.375 as the opening limit for a stair guard.

### Why aim a little under 4 inches?

Wood shrinks, balusters bow, and an inspector measures the widest opening. Spacing evenly with the fewest balusters already gives gaps under the limit; some builders add one more baluster for a margin.

## Sources

- International Code Council, 2021 International Residential Code, R312.1.3 Opening limitations (no passage of a 4 in (102 mm) sphere; exceptions of 6 in for the stair triangle and 4 3/8 in on the open side of stairs). https://codes.iccsafe.org/content/IRC2021P2/chapter-3-building-planning#IRC2021P2_Pt03_Ch03_SecR312.1.3 (retrieved 2026-10-02)
- Humboldt County, California, Guards and Window Fall Protection (CRC R312: guard height and the 4 in sphere rule with its stair exceptions). https://humboldtgov.org/3432/Guards-and-Window-Fall-Protection-CRC-R3 (retrieved 2026-10-02)
