How it’s calculated
Railing codes limit the size of the openings, not the number of balusters. In the US, the International Residential Code (IRC R312.1.3) requires that a sphere 4 in (101.6 mm) or larger cannot pass through a guard opening, so a gap of exactly 4 in fails. The Australian National Construction Code (Housing Provisions 11.3.4) uses a 125 mm sphere. This calculator finds the fewest balusters that keep every gap at or below a maximum that is smaller than the sphere (by default 3⅞ in or 120 mm, common design choices rather than code figures), then makes all the gaps equal, including the two next to the posts.
Example: 72 in (6 ft) between posts, 1½ in square balusters, maximum gap 3⅞ in (US default). n = ⌈(72 − 3.875) ÷ (1.5 + 3.875)⌉ = ⌈12.67⌉ = 13 balusters. The gap is (72 − 13 × 1.5) ÷ 14 = 3.75 in, and the on-center spacing is 5.25 in.
Stair railings have their own rules (for example a triangle at the tread and rail, and a larger sphere on the open side of a stair in the IRC), and the gaps are measured on the slope. This tool is for level rails, so check your local adopted code and the inspector’s method for stairs.
Frequently asked questions
What is the 4 inch sphere rule?
In the International Residential Code a guard must have no opening that lets a sphere 4 in (101.6 mm) or larger pass through. Some jurisdictions amend it, so check with your local building department.
How many balusters do I need for a 6 foot section?
With 1½ in balusters and the default maximum gap of 3⅞ in (a design choice just under the 4 in sphere), you need 13 balusters. The gaps come out at 3.75 in and the balusters sit 5.25 in on center.
Do the gaps next to the posts count?
Yes. Every opening in the guard is tested, including the gap between the end baluster and the post, so this calculator makes those gaps the same as all the others.
What is the baluster spacing rule in Australia?
Under the NCC Housing Provisions (clause 11.3.4) openings in a barrier must not allow a 125 mm sphere to pass. Choose the Australia rule: it designs to 120 mm by default, under the 125 mm sphere.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- 2021 International Residential Code, Chapter 3 (R312 Guards and window fall protection) — International Code Council
- Stair requirements, quoting IRC R312.1.3 opening limits (a 4 in sphere shall not pass) — Knox County Codes Administration
- NCC 2022 Housing Provisions, Part 11.3 Barriers and handrails (clause 11.3.4: 125 mm sphere) — Australian Building Codes Board
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator