Baluster Calculator

Baluster Calculator splits each railing section or stair tread into equal gaps under your code limit, then gives the baluster count, on-center marks and the order size with spares.

Railing & Baluster Size

Enter the full railing length with every post, including both end posts.

Rail Heights & Baluster Length 36 in guard · 27-1/2 in cut
Code, Spares & Fasteners US Dwelling (IRC / IBC R-2, R-3) · 15% spare
Your Railing Needs
48 Balusters for 4 Sections
IRC R312.1.3: your tighter baluster spacing set the count, and every opening also clears the 4 in limit.
2-7/8 in Clear Gap
On-Center Spacing4.39 in (4-3/8)
Gaps per Section13 equal gaps
Equal clear gap at every baluster and both posts, plus the step between centers.
1.11 in Under 4 in Sphere
Gap Under Bottom Rail0.50 in to spare
With One Fewer Baluster3.26 in (3-1/4) gap, passes
Margin under the limit at the baluster gaps and at the deck, and with one fewer.
3-5/8 in to the First Center
Section MidpointGap #7 on center
Baluster Cut Length27.50 in (27-1/2)
Tape marks from the left post face, and the length to cut each baluster to.
56 Balusters to Order
Balusters per Foot2.4 per ft
Screws, 2 per End192 screws
Includes your 15% spare for splits and bad pieces, plus fasteners for the count.
Railing DiagramRailing elevation
Clear span 4 ft 7-5/8 in · 12 balustersGap 2.89 in (2-7/8) · dashed circle = 4 in sphere
Tape-Measure Marks From the Left Post12 marks
BalusterLeft Edge inCenter Mark inRight Edge in
#12.89 (2-7/8)3.64 (3-5/8)4.39 (4-3/8)
#27.29 (7-5/16)8.04 (8-1/16)8.79 (8-13/16)
#311.68 (11-11/16)12.43 (12-7/16)13.18 (13-3/16)
#416.08 (16-1/16)16.83 (16-13/16)17.58 (17-9/16)
#520.47 (20-1/2)21.22 (21-1/4)21.97 (22)
#624.87 (24-7/8)25.62 (25-5/8)26.37 (26-3/8)
#729.26 (29-1/4)30.01 (30)30.76 (30-3/4)
#833.65 (33-5/8)34.40 (34-3/8)35.15 (35-1/8)
#938.05 (38-1/16)38.80 (38-13/16)39.55 (39-9/16)
#1042.44 (42-7/16)43.19 (43-3/16)43.94 (43-15/16)
#1146.84 (46-13/16)47.59 (47-9/16)48.34 (48-5/16)
#1251.23 (51-1/4)51.98 (52)52.73 (52-3/4)
Compare Baluster Counts9 to 15 balusters
BalustersOn-CenterClear Gap inUS Dwelling (IRC / IBC R-2, R-3)
95.71 (5-11/16)4.21 (4-3/16)Fails
105.19 (5-3/16)3.69 (3-11/16)Passes
114.76 (4-3/4)3.26 (3-1/4)Passes
12 (yours)4.39 (4-3/8)2.89 (2-7/8)Passes
134.08 (4-1/16)2.58 (2-9/16)Passes
143.81 (3-13/16)2.30 (2-1/4)Passes
153.57 (3-9/16)2.07 (2-1/16)Passes
Balusters per Foot by SizeSame span, 6 common sizes
Baluster SizePer SectionClear Gap inPer Foot
3/4 in round metal152.77 (2-3/4)3
1 in square metal142.77 (2-3/4)2.8
1-1/4 in turned132.81 (2-13/16)2.6
2x2 wood (1-1/2 in)122.89 (2-7/8)2.4
1-3/4 in square122.66 (2-5/8)2.4
3x3 wood (2-1/2 in)102.78 (2-3/4)2
Step-by-Step MathN = ⌈(L - G) ÷ (W + G)⌉
  1. Section clear span L = (run - posts × post width) ÷ sections = (240 - 5 × 3.5) ÷ 4 = 55.6 in.
  2. From your spacing: N = ⌈(L - G) ÷ (W + G)⌉ = ⌈(55.6 - 3) ÷ (1.5 + 3)⌉ = ⌈11.69⌉ = 12.
  3. Fewest under the 4 in limit S: ⌊(L - S) ÷ (W + S)⌋ + 1 = ⌊9.39⌋ + 1 = 10; use the larger, N = 12.
  4. Gap = (L - N × W) ÷ (N + 1) = (55.6 - 12 × 1.5) ÷ 13 = 2.89 in; on-center = gap + W = 4.39 in.
  5. Total = 12 × 4 sections = 48. The one-step shortcut ⌈(run - posts × post width) ÷ (W + G)⌉ = ⌈(240 - 5 × 3.5) ÷ (1.5 + 3)⌉ gives 50 because it skips the extra gap in each section.
  6. Cut length = guard height - top rail - bottom rail - bottom gap = 36 - 3.5 - 1.5 - 3.5 = 27.5 in.
  7. Order = ⌈48 × 1.15⌉ = 56.
  8. Result: 48 Balusters for 4 Sections.
Even Layout Passes the 4 in Rule
Hook the tape on the inside face of the left post, mark 3.64 in (3-5/8) for the first center, then step 4.39 in (4-3/8) for each center. A spacer block cut to the gap keeps every opening equal.

Three Ways to Use the Baluster Calculator

The Baluster Calculator works three ways. For a full deck railing, enter the total length across every post, the number of posts and the post width. For one section, enter the clear span between two posts. For stairs, enter the tread count, riser height and tread run.

Each mode sets the fewest balusters that keep every opening under your code limit and your own spacing choice. You get the equal clear gap, the on-center spacing, tape-measure marks from the left post and how far the widest gap sits under the sphere.

On level railings it also gives the baluster cut length and checks the gap under the bottom rail. You also get the order count with spares and the screws or connectors to fix them.

Take a 20 ft deck railing with five 4x4 posts, which are 3-1/2 in wide, and 2x2 balusters at their real 1-1/2 in width. Each of the 4 sections gets 55-5/8 in of clear span. With a 3 in maximum gap, that takes 12 balusters per section, 48 in total, with an even 2-7/8 in gap and 4-3/8 in on center. With 15% spares, you order 56.

Baluster Spacing Formula

The math works section by section, because every section starts and ends at a post. First, take the post widths out of the total railing length and split what is left between the sections.

Here S is the clear span of one section, L is the railing length across the outside of both end posts, P is the post count and wp is the post width. Next, find the baluster count N for a baluster width b and a maximum gap g, rounding up.

A section with N balusters has N + 1 gaps, because there is a gap at each post. The equal clear gap G is the space left after the balusters, shared by those gaps.

Dividing the whole railing by baluster width plus gap in one step skips that extra gap in each section. For the 20 ft rail with five 4x4 posts, 2x2 balusters and a 3 in gap, the one-step method gives 50 balusters. The section method gives 48, and every gap still stays under 3 in.

How to Evenly Space Balusters

Lay out each section from the inside face of the left post. The first baluster center sits one gap plus half a baluster from the post. Every center after that is one baluster width plus one gap further along, so a spacer block cut to the gap keeps the layout honest.

In the 55-5/8 in example, the first center mark is at 3-5/8 in and each next mark is 4-3/8 in further on. The Baluster Calculator lists every mark as a decimal and a sixteenth-inch fraction, so you can read them straight off the tape.

Some builders lay out from the middle so the section looks centered. With an odd count, a baluster sits on the midpoint; with an even count, a gap does. The tool tells you which one applies, so the pattern matches on both sides of each section.

Maximum Distance Between Balusters

Codes cap the opening, not the on-center spacing. IRC Section R312.1.3 says a 4 in sphere must not pass through a required guard. Guards on the open sides of stairs may allow up to a 4-3/8 in sphere, and the triangle formed by the riser, tread and bottom rail may allow 6 in.

The IBC uses the same 4 in rule but keeps the 4-3/8 in stair allowance for stairs inside dwelling and sleeping units of Group R-2 and R-3. Public and commercial stairs stay at 4 in, so pick the US IBC Public / Commercial option for those. The city of Pittsburg, California, sets out these rules in its guard opening handout. Bremerton, Washington, lists the same guardrail height and opening rules.

CodeMaximum OpeningInchesMillimeters
US IRC and IBC, level guards4 in sphere4102
US stairs in homes and dwelling units4-3/8 in sphere4.375111
US stair triangle under bottom rail6 in sphere6152
Canada NBC100 mm sphere3.94100
UK Approved Document K100 mm sphere3.94100
Ireland TGD K100 mm sphere3.94100
New Zealand F4/AS1100 mm sphere3.94100
Spain CTE DB-SUA100 mm sphere3.94100
Australia NCC125 mm sphere4.92125
France NF P01-012110 mm spacing4.33110
Germany DIN 18065120 mm opening4.72120

A sphere rule means the opening must be smaller than the sphere, so a gap of exactly 4 in fails. France and Germany set a spacing limit instead, where a gap equal to the limit is allowed. The Baluster Calculator applies each rule the way its code words it.

The same sphere applies under the bottom rail, from the deck surface to the top of the guard, and the Baluster Calculator checks that gap against your chosen code. The Journal of Light Construction covers this in its guide to code-compliant guardrails, along with the 36 in guard height for homes and the 50 lb infill load.

Balusters for a 6 Foot Rail by Size

A 6 ft railing can mean posts 6 ft on center or 6 ft clear between posts. With 4x4 posts set 6 ft on center, the clear span is 68-1/2 in. The table shows the fewest balusters that pass the US 4 in sphere for common sizes, with the gap that results.

BalusterActual Width68-1/2 in Clear72 in ClearFewest per Foot
Round metal3/4 in14, 3.87 in gap15, 3.80 in gap2.5
Square metal1 in13, 3.96 in gap14, 3.87 in gap2.4
Turned1-1/4 in13, 3.73 in gap13, 3.98 in gap2.3
2x2 wood1-1/2 in12, 3.88 in gap13, 3.75 in gap2.2
Square wood1-3/4 in12, 3.65 in gap12, 3.92 in gap2.1
3x3 wood2-1/2 in10, 3.95 in gap11, 3.71 in gap1.9

So for 2x2 balusters, plan on at least 2.2 per foot of clear rail. The common rule of 3 per foot gives tighter gaps near 2-1/2 in. Gaps that sit right at 3.9 in leave no room for a baluster that bows or a cut that runs long.

Always enter the actual width, not the lumber name. A 2x2 is 1-1/2 in and a 4x4 post is 3-1/2 in. For turned or tapered balusters, enter the thinnest part of the shaft, because that is where the opening is widest.

Baluster Length From Rail Heights

On level railings, the tool works out how long to cut each baluster. Enter the guard height, the depth of the top and bottom rails, and the gap under the bottom rail. The cut length is what is left between the rails.

Here H is the guard height, dt and db are the top and bottom rail depths, and gb is the gap under the bottom rail. A 36 in guard with a 3-1/2 in top rail, a 1-1/2 in bottom rail and a 3-1/2 in bottom gap takes 27-1/2 in balusters.

For a 42 in commercial guard with the same rails and gap, the cut length grows to 33-1/2 in. The tool warns when the guard is under 36 in for homes, per IRC R312.1.2, or under 42 in for public and commercial guards, per IBC 1015.3.

The bottom gap counts as an opening too. A 3-1/2 in gap clears the 4 in sphere by 1/2 in. If the gap reaches the limit, the card turns red, and the fix is to lower the bottom rail or add a skirt board.

Many decks skip the bottom rail and screw the balusters to the face of the rim joist. Pick the face-mounted option and enter how far the balusters drop below the deck surface. The length then runs from that point up to the underside of the top rail or cap.

Here dr is the drop below the deck and dt is only the part of the rail above the baluster tops. A 36 in guard with a 3-1/2 in rail above the balusters and a 6 in drop takes 38-1/2 in balusters. With a flat 2x6 cap that is 1-1/2 in thick instead, they grow to 40-1/2 in.

Face-mounted balusters lap the rim, so there is no open gap at deck level to check. The guard height checks still apply, measured from the deck surface to the top of the rail.

Stair Baluster Calculator and Balusters per Step

Stair mode works per tread. The balusters on each tread share its run, so the gap is the tread run divided by the count, minus one baluster width. The tool also gives the stair angle, the rail length along the slope and the top-of-rail height above the tread at each baluster.

Baluster Width10 in Tread10-1/2 in Tread11 in Tread
3/4 in round metal2 home / 3 public3 / 33 / 3
1 in square metal2 / 32 / 33 / 3
1-1/4 in turned2 / 22 / 32 / 3
1-1/2 in (2x2 wood)2 / 22 / 22 / 3
1-3/4 in square2 / 22 / 22 / 2

The first figure in each cell uses the 4-3/8 in stair limit for homes, and the second uses 4 in for public stairs, which is the US IBC Public / Commercial option. Two balusters per step covers most 2x2 wood stairs. Thin metal balusters and wider treads often need three.

To calculate staircase railing length, multiply the tread count n by the diagonal of one step. R is the riser height and T is the tread run, both measured on one step.

A flight of 13 treads with a 7-1/2 in rise and 10-1/2 in run has a 35.5 degree slope. The rail runs 167.7 in, or about 13 ft 11-3/4 in. With 2x2 balusters at 2 per tread, the stair needs 26 balusters with a 3-3/4 in level gap.

Stair guards and handrails sit 34 to 38 in above the nosing line in homes. The 6 in triangle rule matters only when balusters stand on a sloped bottom rail. Stair mode assumes they stand on the treads, so check that triangle yourself if your stair uses a bottom rail.

Screws and Fasteners for Balusters

The tool counts screws at two per end, or four per baluster, which is the usual pattern for wood. A 2-1/2 in exterior deck screw passes through a 1-1/2 in 2x2 and leaves about 1 in in the rail or rim. For metal balusters, pick connectors, one per end, and the count drops to two per baluster. Fasteners are counted on the installed balusters, not the spares, so the 20 ft example needs 192 screws or 96 connectors.

Spindles per Metre

Switch the results to metric for mm and metre marks. Under the 100 mm sphere used in the UK, Canada and Ireland, a 1 m clear span takes 7 spindles at 41 mm, leaving 89 mm gaps. With slimmer 32 mm spindles, 7 still fit, at 97 mm gaps.

Interior stair balustrades follow the same rules as deck railings, so the tool works for both. On interior stairs, use the clear-span mode for a level landing between two newels and stair mode for the raking part.

Ordering Balusters With Spares

Order 10% to 15% more balusters than the layout needs, to cover splits, knots and bad cuts. The Baluster Calculator starts at 15%, adds your spare percentage and rounds up, and the Identical Sections field multiplies the count for repeated runs or flights.

Post count and spacing come first, so set them with the Deck Post Spacing Calculator before counting balusters. For decorative spindle layouts, the Spindle Spacing Calculator spaces them evenly within code gaps. The Balcony Size Calculator gives the guardrail run around a balcony, and the Decking Calculator counts the boards, screws and joists below it.