Skip to calculator content
9×GooGooCalc⌕

Deck Railing Calculator

Railing posts, rail length and baluster count at code-compliant spacing.

Measurements

What to order

Railing is posts, rails and infill. Posts every six feet or less, two rails per section, and balusters close enough that a four inch sphere cannot pass between them.

Baluster spacing

The requirement is that a four inch sphere cannot pass through any opening. With standard 1.5 inch square balusters that means about five inches on centre — roughly 2.4 balusters per foot of railing.

The gap under the bottom rail counts too. Leave it under four inches or the inspection fails on an otherwise perfect railing.

Height and load

Residential deck railing is generally 36 inches high, measured from the deck surface to the top of the rail. Commercial and some elevated decks require 42.

Railing also has to resist a 200 pound load applied in any direction at the top. That load goes into the post connection, which is why through-bolting posts to the frame matters far more than how the rails are attached.

Notching posts is a bad idea

Notching a 4×4 post to fit over the rim joist removes most of its strength exactly where the bending force is highest.

Bolt the full post to the inside of the frame with blocking, or use a purpose-made post base hardware kit.

Post spacing drives everything else

Railing posts are typically set no more than six feet apart, and closer where the rail has to resist more load or where the span looks slack.

Post spacing then sets the rail lengths, the baluster count per section, and how the sections divide around corners and stairs. Changing it late means recalculating all of them.

Lay the posts out on paper first, starting at corners and stair landings and working toward the middle. Even spacing looks deliberate; an odd short bay in the middle of a run does not.

Stair rails are a different calculation

A raking rail follows the stair slope, which makes it longer than the horizontal run beneath it, and the balusters have to be cut at the slope angle at both ends.

Baluster spacing is measured along the rail, not horizontally, and the four inch sphere rule is applied to the opening as built on the slope.

Graspability requirements also apply to stair handrails in a way they do not to a flat guard rail — a wide, flat top rail that is fine on a deck is generally not an acceptable handrail on stairs.

Where these numbers come from

No external table is used in the core formula unless one is listed above. Product guidance and local requirements can change.

Related calculators