Railings & Stairs PhaseStep 31 of 41

How to Install Top and Bottom Deck Rails

The horizontal rails connect your railing posts and provide the framework for balusters. A wide 2x6 top rail gives you a comfortable place to set drinks while creating a finished look, while the bottom 2x4 rail anchors your balusters and maintains the required safety gap from the deck surface.

Quick Summary

Time needed

1-3 hours

Difficulty

Easy to Moderate

Cost

$50-150 (materials)

Understanding Deck Rail Components

A standard deck railing system has several horizontal components that work together. The top rail is the piece you lean on and rest your hands on—it should be wide, smooth, and at a comfortable height. The bottom rail runs parallel below, anchoring the bottom of balusters and keeping them spaced properly.

Some railing systems also include a sub-rail or cap rail—an additional piece that sits on top of the posts and covers baluster tops. For this guide, we'll focus on the essential two-rail system that works with most baluster styles.

Materials You'll Need

Lumber

  • 2x6 pressure-treated or cedar – for top rails (one board per rail section)
  • 2x4 pressure-treated or cedar – for bottom rails (one board per section)
  • 3-inch deck screws – stainless or coated for treated lumber

Hardware Options

  • Rail brackets – metal connectors for strongest attachment
  • Pocket screw jig – for hidden fasteners from rail underside
  • Wood glue – exterior grade for added strength at joints

Tools

  • Miter saw or circular saw – for cutting rails to length
  • Drill/driver – for pre-drilling and driving screws
  • Level (4-foot) – essential for horizontal alignment
  • Tape measure – measure twice, cut once
  • Clamps – to hold rails in position while fastening
  • Router with roundover bit (optional) – for comfortable grip on top rail

Rail Height Requirements

Building codes specify minimum railing heights measured from the deck surface to the top of the railing:

ApplicationTypical MinimumNotes
Residential (IRC)36 inchesMany areas now require 42"
Commercial (IBC)42 inchesStandard for public spaces
High decks (>30" drop)Check local codeOften requires 42"

Pro Tip: Even if your code allows 36-inch railings, consider building to 42 inches. The extra height feels more secure, especially for taller people, and future-proofs your deck if codes change or you decide to sell.

Step-by-Step Installation

Step 1: Plan Rail Layout

Before cutting anything, determine how rails will connect between posts:

  • Between posts: Rails cut to fit between post faces (most common)
  • Across posts: Rails span across post tops (cap rail style)
  • Notched into posts: Dadoes cut in posts to receive rails

Step 2: Mark Rail Heights on Posts

Using a level and tape measure, mark consistent heights on each post:

  1. 1.Measure up from deck surface to your required top rail height (36-42")
  2. 2.Mark the TOP of the top rail at this height on each post
  3. 3.For bottom rail, mark 2-4 inches above deck surface
  4. 4.Use a long level or laser to transfer marks consistently

Step 3: Measure and Cut Rails

Measure carefully for each section—post spacing can vary slightly:

  • Measure at both top and bottom rail heights (distances may differ slightly)
  • Cut rails 1/16" shorter than measured for easy installation
  • Label each piece with its location (e.g., "North side - Top")

Avoid This Mistake: Don't assume all rail sections are the same length. Even if posts were carefully spaced, minor variations are common. Measure each section individually.

Step 4: Install Bottom Rails First

The bottom rail goes in first because it's easier to work with at lower height:

  1. 1.Position rail between posts at marked height
  2. 2.Check level—adjust as needed with shims
  3. 3.Clamp in position
  4. 4.Pre-drill through post into rail end (two holes per side)
  5. 5.Drive 3-inch deck screws through post into rail

Step 5: Install Top Rails

Top rails get more attention because they're visible and touched often:

  1. 1.Consider rounding over edges with router for comfort (optional but recommended)
  2. 2.Position rail flat (wide face up) between posts at marked height
  3. 3.Check that top surface is level
  4. 4.Secure with screws through posts or use rail brackets
  5. 5.If using exposed screws, countersink slightly and fill if desired

Step 6: Handle Corners and Angles

Where rails meet at corners:

  • For 90-degree corners: Miter both rails at 45 degrees for clean joint
  • For other angles: Divide angle by 2 for miter cut (e.g., 135-degree corner = 22.5-degree miter)
  • Apply glue: Use exterior wood glue on miter joints for strength
  • Screw through joint: Pre-drill and drive screws through one rail into the other

Fastening Methods Compared

Toe-Screwing Through Posts

Pros: Simple, requires minimal tools, strong connection

Cons: Visible screw heads on post face, requires pre-drilling to prevent splits

Pocket Screws from Rail Underside

Pros: Hidden fasteners, clean look, very strong

Cons: Requires pocket hole jig, more time-consuming, screws visible from below

Metal Rail Brackets

Pros: Strongest connection, easier alignment, allows rail expansion

Cons: Brackets visible, higher cost, may not match aesthetic

Quality Check

Before moving on to balusters, verify your rails are installed correctly:

  • Height: Top rail is at or above required height at all points
  • Level: Rails are level between posts (use 4-foot level)
  • Parallel: Top and bottom rails are same distance apart along entire length
  • Secure: Rails don't wobble or flex when pushed
  • Smooth: No splinters or rough spots on top rail surface

FAQ

What height should the top rail be on a deck?

The top of the deck railing must be at least 36 inches above the deck surface in most jurisdictions. However, many areas now require 42 inches, especially for decks more than 30 inches above grade. Always check your local building code.

Should I use 2x4 or 2x6 for the top rail?

A 2x6 top rail is generally preferred because it provides a wider, more comfortable surface to rest hands and drinks on. It also better conceals the tops of balusters. A 2x4 can work but feels narrower and shows fastener heads more prominently.

How do I attach rails to posts?

Rails can be attached by toe-screwing through the rail into the post, using pocket screws from the hidden side, or with metal rail brackets. Toe-screwing is most common for DIY work. Use 3-inch deck screws, pre-drill to prevent splitting.

How high should the bottom rail be above the deck?

The bottom rail should be positioned so that balusters meet the 4-inch sphere code requirement at both top and bottom. Typically this means the bottom rail is 2-4 inches above the deck surface. If using 36-inch balusters with a standard rail height, mounting the bottom rail 2-3 inches up usually works well.