How to use it
- Enter the total rise, from the finished floor to the finished floor above, and your tread depth. The calculator works out the risers the same way as the stair calculator.
- Pick your baluster and gap limit. Use 1 1/2” for square wood balusters (2x2) or 3/4” for metal. Keep the gap at 4” unless your building department says the IRC’s 4 3/8” stair-side allowance applies.
- Read the layout. You get the number of balusters and posts, the clear gap, the spacing to mark on the rail, and the angle for your saw.
How it’s calculated
The rail follows the nosing line, the straight line through the front edge of every tread. Its run is the number of treads × tread depth, and its rise is the number of treads × riser height. The rail length is the diagonal of those two, and the rake angle is the stair angle.
Posts divide the run into equal sections no wider than your maximum post spacing. Each section’s clear width is the post-to-post distance minus one 3 1/2” post (a 4x4). In each section the calculator uses the fewest balusters that keep every gap at or under your limit:
- balusters = round up ((clear width − gap limit) ÷ (gap limit + baluster width))
- gap = (clear width − balusters × baluster width) ÷ (balusters + 1)
Spacing is measured level, across the treads, because the sphere test passes between two plumb balusters. To mark the underside of a sloped rail, divide the level on-center spacing by the cosine of the rake angle. The calculator shows both numbers.
Worked example: 68 1/2” rise
A 68 1/2” rise with 10 1/2” treads gives 9 risers of 7 5/8” and 8 treads. The nosing line runs 84” across and rises 60 7/8”, so the rail is 103 3/4” long at 35.9°. A 10 ft board leaves room for both plumb cuts.
With posts no more than 72” apart you need 3 posts, 42” on center. That leaves 38 1/2” clear between them. With 1 1/2” balusters and a 4” limit, each section takes 7 balusters with 3 1/2” gaps: 14 balusters in all, 5” on center level, or 6 3/16” measured along the rail.
Railing code at a glance (IRC)
| item | requirement |
|---|---|
| Handrail required | 4 or more risers (R311.7.8) |
| Handrail height | 34”–38”, measured straight up from the nosing line |
| Guard required | open sides more than 30” above the floor or grade (R312.1.1) |
| Guard height on stairs | at least 34” from the nosing line |
| Openings in a stair guard | must stop a 4 3/8” sphere under the IRC; many local codes use 4” |
| Triangle under the bottom rail | must stop a 6” sphere |
| Handrail grip | round rail 1 1/4”–2” across (Type I) |
These are IRC limits. Decks, commercial work and some cities are stricter, so check with your building department.
Tips from the job site
- Measure the gap with a 4” block after the first few balusters go in. Wood moves, and a 1/16” lean on each one adds up over a section.
- Cut every baluster top at the rake angle so it sits flat under the rail. Cut a test piece first and check it with the rail in place.
- Fasten posts through the stringer or rim with structural screws or bolts. A guard has to resist a 200 lb push at the top, and a nailed post will not.
Frequently Asked Questions
How do you calculate baluster spacing on stairs?
Subtract the post widths from the distance between posts to get the clear width. Divide (clear width − 4") by (4" + baluster width) and round up for the baluster count. The gap is (clear width − count × baluster width) ÷ (count + 1).
What is the 4-inch sphere rule for stair railings?
A 4" ball must not pass through any opening in the guard, which keeps small children from slipping through. The IRC relaxes this to 4 3/8" on the open sides of stairs, but many local codes and inspectors still require 4".
How many balusters per stair tread?
With 1 1/2" square balusters and treads of about 10"–11", two per tread keeps gaps under 4". With 3/4" metal balusters, two per tread usually works too. The calculator gives the exact count for each section between posts.
How long should a stair handrail be?
The rail runs along the nosing line from the first tread to the top nosing. Its length is the square root of (treads × tread depth)² + (treads × riser height)². For a 68 1/2" rise with 10 1/2" treads that is 103 3/4".
What angle do I cut stair balusters and handrails?
Cut them at the stair angle, the arctangent of riser height ÷ tread depth. A 7 5/8" riser and 10 1/2" tread give 35.9°, so set the miter saw to 35.9° for plumb cuts on the rail ends and the baluster tops.