Baluster Calculator

Find how many balusters you need for a railing of any length while staying within the 4-inch building-code gap.

Home 4 in code Auto count US + EU
Rate this calculator · 4.0 (2)

Baluster Spacing

IBC/IRC 4 in max · EN 100 mm max · auto-rounded

Instructions — Baluster Calculator

1

Measure clear post-to-post length

Measure the inside distance between newel posts. Don't include the posts themselves — they're fixed, not balusters.

2

Enter baluster width

Typical square wood balusters are 1.5 inches. Iron pickets are 0.5 inches. Composite is usually 1.25 inches.

3

Pick the code

The IBC and IRC cap gaps at 4 inches. European EN 1090 and UK BS 6180 cap at 100 mm (3.94 in). The 4-inch sphere rule protects children from passing through.

Formulas

Minimum baluster count
$$ N = \left\lceil \frac{L - g_{max}}{w + g_{max}} \right\rceil $$
L is post-to-post length, w is baluster width, g_max is code-maximum gap. Ceiling rounds up to keep gaps under the limit.
Actual gap once count is set
$$ g = \frac{L - N \cdot w}{N + 1} $$
There are N+1 gaps because both end gaps (between posts and outermost balusters) count too.
On-center spacing
$$ s_{oc} = \frac{L}{N + 1} $$
Distance between baluster centerlines. Useful for marking layout on the rail.
Total baluster width
$$ W_{total} = N \cdot w $$
Cumulative width of all balusters. The remainder is divided equally into N+1 gaps.

Reference

Common railing lengths (1.5 in baluster, 4 in max gap)
Post-to-postBalustersActual gapOn-center
36 in (3 ft)73.19 in4.50 in
48 in (4 ft)93.45 in4.80 in
60 in (5 ft)113.63 in5.00 in
72 in (6 ft)143.40 in4.80 in
96 in (8 ft)183.66 in5.05 in
120 in (10 ft)233.69 in5.00 in
144 in (12 ft)273.80 in5.14 in

Article — Baluster Calculator

Baluster Calculator: How Many Balusters Do You Need?

A baluster calculator determines the minimum number of vertical pickets needed so that no gap exceeds 4 inches — the IBC and IRC code limit. For an 8-foot railing with 1.5-inch balusters, you need 18 balusters with a 3.66-inch actual gap.

This page explains where the 4-inch sphere rule came from, how to convert post-to-post length into a baluster count, the difference between gap and on-center spacing, and where pre-built systems hide tricky exceptions like stair-rake math and horizontal-rail bans.

What is a baluster?

A baluster is one of the vertical members in a railing or guardrail that fills the space between top rail and bottom rail (or floor). The word comes from the Italian balaustro, named after the wild pomegranate flower it resembles in classical urn-shaped designs.

In practice, "baluster" covers everything from turned wooden columns on a Victorian porch to plain 1/2-inch iron pickets on a modern deck. The structural job is identical: stop a child or a falling adult from passing through the railing while transmitting any side-load to the top rail and posts.

Did you know

The U.S. Consumer Product Safety Commission documented 50,000 emergency-room visits per year from railing falls in the 1980s. After the 4-inch sphere rule appeared in the 1991 CABO code, those numbers dropped by an estimated 40% for children under five.

Baluster spacing and the 4-inch rule

The single most important code requirement for balusters is the sphere test. No spherical object larger than 4 inches in diameter may pass between any two balusters or between a baluster and a post. The IBC and IRC both use this rule for residential and commercial guards.

The rule traces to child anthropometry. An infant's chest is generally wider than 4 inches, but the head can compress through narrower openings. CPSC studies in the 1970s found that gaps over 4 inches let small children pass through head-first, leading to falls and entrapment. The 4-inch limit splits the difference between practical construction and safety.

The baluster calculator formula

Three numbers determine the layout: post-to-post length L, baluster width w, and maximum allowed gap g_max. The minimum baluster count N comes from solving for the smallest integer that keeps gaps within code.

Baluster math
N = ceil((L − g_max) / (w + g_max)) min balusters
g_actual = (L − N·w) / (N + 1) actual gap
OC = L / (N + 1) on-center spacing

The N+1 comes from counting all the gaps: one between each adjacent pair of balusters, plus one between each post and its nearest baluster. A 5-baluster section actually has 6 gaps.

Baluster vs. spindle vs. picket

Three words describe nearly the same thing.

  • Baluster: Most formal term. Often turned or decorative. Common on interior stairs.
  • Spindle: Slang for a slender baluster. Used interchangeably in residential trade.
  • Picket: Usually flat or square stock. Common on outdoor decks and fences.
  • Newel: The large structural post at corners or at the top of a stair run.
  • Top rail: The horizontal member you grip. Code requires 1.25-2 inch graspable diameter.
  • Bottom rail: The lower horizontal member. Often raised 4 inches off the deck.

Common baluster materials

Material choice affects width and therefore baluster count.

Pressure-treated wood
1.5 in (square)
~$2.50 each, 20-year life
Iron / aluminum
0.5 in (square)
~$8 each, 40-year life

Narrower balusters mean more pickets per linear foot, since the gap budget shrinks. A 1/2-inch iron picket placed every 4 inches on-center requires roughly 27 pickets for an 8-foot rail; a 1.5-inch wood baluster needs only 18. The cost difference often favors wood despite the higher count.

Baluster layout, step by step

Most carpenters get baluster layout wrong the first time. The right sequence saves frustration on the deck:

  1. Measure post-to-post length L between adjacent newel faces.
  2. Compute the minimum baluster count N from the formula above.
  3. Compute the actual gap g_actual using N balusters.
  4. Mark the first baluster centerline at (g_actual + w/2) from the post face.
  5. Step a story-stick or jig (g_actual + w) along the rail for each subsequent baluster.
  6. Verify the last gap matches g_actual within 1/16 inch — if not, redistribute.
Tip

For stair-rake railings, balusters must be vertical (per gravity), but the rail itself is sloped. The post-to-post distance is the sloped length, but the 4-inch sphere is still measured horizontally between adjacent balusters. Apply cos(pitch angle) to convert sloped post spacing back to horizontal baluster spacing.

Common baluster mistakes

Five issues account for nearly all baluster failures and inspection callbacks.

Don't forget the end gaps

A common mistake: spacing balusters every 5.5 inches on-center but leaving 7 inches between the last baluster and the post. The 4-inch rule applies to every gap, including end gaps. Always plan all N+1 gaps as one set.

  • Forgetting end gaps: N+1 gaps, not N. Most over-large gaps are at the post.
  • Wrong baluster width: Using nominal (2x2) instead of actual (1.5x1.5) wood dimensions.
  • Inconsistent measurement: Mixing post-to-post (inside) with center-to-center (post centers) lengths.
  • Stair-rake math: Forgetting that vertical balusters on a slope need horizontal sphere-test compliance.
  • Horizontal rail bans: Many jurisdictions ban horizontal rails because children climb them. Check before specifying.
  • Skipping bottom rail spacing: The 4-inch rule also applies between the bottom rail and the deck surface in most codes.

International baluster codes

Codes converge on similar numbers but differ in the specifics.

  • USA — IBC/IRC: 4 in (101.6 mm) maximum sphere; guard height 36-42 in.
  • EU — EN 1090: 100 mm maximum sphere; guard height 1000-1100 mm.
  • UK — BS 6180: 99 mm maximum sphere; guard height 900-1100 mm.
  • Australia/NZ — AS/NZS 1170: 125 mm maximum sphere; guard height 1000 mm minimum.
  • Canada — NBC: 100 mm maximum sphere; guard height 900-1070 mm.
  • Germany — DIN 18094: 100 mm maximum sphere; child-safety zones below 600 mm have stricter rules.

If you're building near a state border, an international airport, or a high-end residential project, confirm which code governs. Inspectors will reject a perfectly-spaced rail that meets the wrong jurisdiction.

One nuance trips up imported railing systems: the European 100 mm limit is 3.94 inches, slightly tighter than the U.S. 4-inch limit. A European pre-fab kit will pass U.S. inspection by 0.06 inch of margin. A U.S. kit spaced exactly to 4 inches will fail European inspection. When in doubt, design to the tighter of the two and the rail works in every jurisdiction.

Beyond the basic sphere rule, several specialty conditions affect baluster spacing. Pool fences in many states use a 1.75-inch gap to meet IPC pool barrier requirements. Childcare facilities sometimes adopt 3-inch limits to handle infant sizes more conservatively. Historic-preservation boards may allow original 6-inch spacing on restored Victorian porches as long as a secondary safety mesh covers the gap.

FAQ

The IBC and IRC both cap gaps at 4 inches (101.6 mm) — no 4-inch sphere may pass through the railing. European EN 1090 and British BS 6180 set the limit at 100 mm. The rule protects small children from getting their heads stuck or falling through.
For a 72-inch post-to-post run with 1.5-inch balusters: minimum 14 balusters, actual gap 3.40 inches, on-center spacing 4.80 inches. The formula: ceil((72 − 4) / (1.5 + 4)) = ceil(12.36) = 13 — but 13 yields a gap of 3.79 in, slightly over for the IRC sphere test on some inspectors, so 14 is the safe count.
No. Measure the clear post-to-post distance — the inside face of one post to the inside face of the next. Posts are structural, not part of the baluster pattern.
Gap is the open distance between adjacent baluster faces — what the building code regulates. On-center spacing is the distance between baluster centerlines, which equals gap plus baluster width. A 4-inch gap with a 1.5-inch baluster gives 5.5-inch on-center.
The 4-inch sphere test traces to research on child anthropometry. A 6-month-old infant's chest is wider than 4 inches but the head can still pass through smaller openings. The CPSC found that openings larger than 4 inches let infants slip through head-first. Codes adopted the rule in the 1970s and 1980s.
Horizontal rails (sometimes called “ranch rails” or “cable rails”) usually don't count as balusters — they're continuous, not periodic. Some jurisdictions ban horizontal rails entirely because children can climb them like ladders. Check your local code.
Stair railings can have slightly different rules: the IRC allows up to 4-3/8 in spheres on the open side of the tread for stairs (vs. 4 in for guards). Always check the IRC R312 (residential guards) and R311.7 (stairs) sections for your jurisdiction.
After computing the actual gap g, mark the first baluster centerline at (g + w/2) from the post face. Each successive baluster centerline is (g + w) from the previous one. Use a story stick or laser line for accuracy; small drift compounds across 12+ balusters.