Baluster calculator: how many balusters do I need, and what baluster spacing meets code?
17 balusters
18 equal gaps of 3.92 in (a 3 7/8 in spacer) · 5.42 in on center · every gap under the 4 in sphere of IRC R312.1.3 · for 8 ft between posts with 1 1/2 in balusters
Run your own numbers
Enter it the way you measured it: 4.5, 4 1/2,
3/8 or 10' 6".
17 balusters
18 equal gaps of 3.92 in (a 3 7/8 in spacer) · 5.42 in on center · every gap under the 4 in sphere of IRC R312.1.3
Source: 2021 International Residential Code, R312.1.3 Opening limitations (2021 Seattle Residential Code, chapter 3), read October 21, 2026. Data sheet (PDF)
An 8 foot space between posts takes 17 balusters 1 1/2 inches wide, leaving 18 equal gaps of 3.92 inches: IRC 2021 R312.1.3 bars any guard opening a 4 inch sphere can pass, 4 3/8 inches on a stair's open side.
A worked example
The open side of a stair with 6 ft 9 in of level run between its posts, in 3/4 inch square metal balusters needs 15 balusters. On a stair the limit is a 4 3/8 inch sphere: 15 balusters leave 16 gaps of 4.36 inches, so cut a 4 5/16 inch spacer block and set them 5.11 inches on center.
What is the code for baluster spacing?
Under 4 inches. IRC 2021 R312.1.3 says a required guard cannot have openings that let a 4 inch sphere through, from the walking surface up to the guard height. On the open side of a stair the sphere is 4 3/8 inches, and the triangle formed by the riser, the tread and the bottom rail must stop a 6 inch sphere.
How many balusters per foot of railing?
About 2.2 with 1 1/2 inch wood balusters and about 2.5 with 3/4 inch metal ones, at the 4 inch limit: each baluster and its gap take just under 5.5 inches in the first case and 4.75 in the second. Count per section, not per foot, because each section starts and ends with a gap: a 10 ft section of 1 1/2 inch balusters takes 22.
What else it is called
Balusters are also called spindles, and searched as a baluster spacing calculator, baluster calculator, deck baluster spacing calculator or stair baluster spacing calculator. The 4 inch rule people quote is this sphere: the gap has to be under 4 inches, not 4.
Balusters by section length
| Space between posts | 3/4 in balusters | 1 1/4 in | 1 1/2 in |
|---|---|---|---|
| 4 ft | 10 at 3.68 in | 9 at 3.67 in | 9 at 3.45 in |
| 6 ft | 15 at 3.80 in | 13 at 3.98 in | 13 at 3.75 in |
| 8 ft | 20 at 3.86 in | 18 at 3.87 in | 17 at 3.92 in |
| 10 ft | 25 at 3.89 in | 23 at 3.80 in | 22 at 3.78 in |
| 12 ft | 30 at 3.92 in | 27 at 3.94 in | 26 at 3.89 in |
Balusters per section and the gap between them, every gap under the 4 in sphere of IRC 2021 R312.1.3 for a guard on a deck, porch or landing. On the open side of a stair the sphere is 4 3/8 in: pick it in the calculator.
Where the numbers come from
- Gap limits: 2021 International Residential Code, Section R312.1.3: «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»; on the open side of a stair the sphere is 4 3/8 inches, and the triangle formed by the riser, the tread and the bottom rail must stop a 6 inch sphere. Read in the 2021 Seattle Residential Code, where R312.1.3 carries no Washington amendment, and checked word for word against the 2021 IRC as adopted in New Jersey. Read October 21, 2026. Read the code chapter (PDF)
- Baluster width: you enter it. A 2 × 2 wood baluster is 1 1/2 inches dressed dry by PS 20-20, the American Softwood Lumber Standard, Table 3, which is the default here; metal and composite balusters vary by maker. Read PS 20 (PDF)
- The rest is arithmetic: the fewest balusters that leave every gap under the limit, n = floor((space − limit) ÷ (width + limit)) + 1, and the gap = (space − n × width) ÷ (n + 1). The spacer is that gap rounded down to the 1/16 inch.
This spaces balusters; it does not set guard height or loads. The guard height of the 2021 IRC is in R312.1.2, and the copy read here carries a Washington amendment there, so it is not quoted. Measure the space between posts at the rail, inside face to inside face.
By Javier Miralles · Last updated . How this site is made.
Other materials
Embed this calculator
Free to use on your own site. Copy the code and keep the credit line.