A pressure treated deck railing is still the workhorse of the deck world — cheap, strong, paintable, and available at every lumberyard in the country. It won’t turn heads like powder-coated aluminum, but for a mid-height deck on a budget, nothing gets you a code-compliant guard faster or for less money. I’ve built hundreds of feet of PT railing, and the difference between one that passes inspection and lasts 20 years and one that wobbles loose in three comes down to a handful of details most weekend builders skip.
Part of our Decks & Outdoor guide — explore the full guide →
Here’s what it costs in 2026, what code actually requires, and how to build it so it doesn’t move.
- What Pressure-Treated Railing Costs in 2026
- The Code You Have to Hit
- Post Attachment: Where Railings Live or Die
- Step-by-Step Build
- Choosing and Prepping the Lumber
- Finishing and Long-Term Maintenance
- Stair Railings and Graspable Handrails
- Cost-Saving Moves That Don't Compromise Safety
- Is Pressure-Treated the Right Call for You?
What Pressure-Treated Railing Costs in 2026
Material for a basic PT railing runs roughly $18 to $30 per linear foot as of 2026, before labor. That covers 4×4 posts, 2×4 top and bottom rails, and 2×2 balusters in #2 southern yellow pine. Step up to a 6×6 post and a wider 2×6 top cap and you’ll land closer to $30 to $40 per foot. A pro will charge $35 to $70 per linear foot installed, depending on your region and how many posts, stairs, and corners the layout involves.
To put that in perspective, a 200-square-foot deck with about 40 linear feet of railing costs roughly $700 to $1,200 in PT materials, versus $2,000 to $3,500 for the same run in composite or aluminum systems. That price gap is the entire reason PT railing still dominates the value end of the market.
The Code You Have to Hit
Deck railing isn’t optional trim — it’s a life-safety guard, and inspectors treat it that way. Under the IRC, here are the numbers that govern almost every residential deck:
- Guard required whenever the walking surface is more than 30 inches above the grade below.
- Guard height of at least 36 inches, measured from the deck surface to the top of the rail.
- 4-inch sphere rule: a 4-inch ball cannot pass through any opening in the guard, which sets your maximum baluster gap.
- Load rating: the guard must resist a 200-pound concentrated force applied in any direction at the top rail.
- Stair guards can be 34 to 38 inches at the graspable handrail, with the triangular opening at the tread limited to a 6-inch sphere.
That 200-pound load requirement is the one people underestimate. It means the connection between post and framing has to be engineered, not just nailed. A post lag-screwed into a single rim joist will fail that test every time.
Post Attachment: Where Railings Live or Die
The posts carry all the load, so they get all the attention. Space 4×4 posts no more than 6 feet on center; for a stiffer rail, or with a 2×6 top cap that people lean on, tighten that to 5 or even 4 feet. Never notch a 4×4 post to sit over the rim — notching cuts its strength roughly in half at exactly the spot that’s most stressed. Run the full post face against the framing instead.
For the connection itself, use a tested hardware system. Simpson DTT2Z tension ties bolt the post to the joist and are rated for the code load. Back that up with two 1/2-inch through-bolts with washers, not lag screws, wherever you can get behind the rim. Block solidly between the joists behind each post so the load spreads instead of prying a single board loose. Do these three things and your railing will not wobble.
Step-by-Step Build
Once the framing is ready, the assembly is straightforward. Work in this order:
- Set and plumb all posts first, bolting each to blocked framing. Get them dead vertical — everything references off the posts.
- Mark 36 inches up from the deck surface on each post for the top rail, and mark the bottom rail position, keeping the lower gap under 4 inches.
- Cut and fasten the 2×4 top and bottom rails between posts with hidden rail hangers or angle brackets and structural screws.
- Add a 2×6 top cap over the posts and top rail for a comfortable, water-shedding surface and a stiffer assembly.
- Install 2×2 balusters, holding your spacing jig at 3.5 inches to guarantee the 4-inch sphere never passes.
- Fasten balusters top and bottom with two coated screws each so they can’t spin or work loose.
A baluster spacing jig is worth the five minutes it takes to cut one. Eyeballing gaps is how you end up ripping out a whole run because one opening measured 4.25 inches at final inspection.
Choosing and Prepping the Lumber
Not all PT is equal. For posts and anything touching the ground or trapping water, buy ground-contact rated lumber, marked “GC” or with a higher retention number on the end tag. For rails and balusters, standard above-ground treatment is fine. Sort through the pile and reject boards with big splits, heavy twist, or the pith dead center — those move the most as they dry.
Fresh PT is soaking wet from the treatment process and will shrink as it dries. If you’re going to paint or solid-stain the railing, let it dry for several weeks to a couple of months first, or the finish will peel. Use only hot-dipped galvanized or stainless fasteners — modern PT chemistry eats plain steel and electro-galvanized screws within a few years, leaving you with rust streaks and loose connections.
Finishing and Long-Term Maintenance
PT railing looks best and lasts longest with a finish. A penetrating semi-transparent stain every two to three years is the low-maintenance route and hides the greening that treatment can cause. Solid stain or exterior paint gives a cleaner, more finished look but demands more upkeep, since any crack lets water under the film. Whatever you choose, seal the end grain of every cut — the exposed fibers at cut ends drink up water and rot first.
Once a year, walk the railing and grab each post firmly. Any movement means a connection is backing out; catch it early and it’s a five-minute retighten instead of a rebuild. Reset popped baluster screws and touch up the finish on the top cap, which takes the most sun and rain.
Stair Railings and Graspable Handrails
Stairs are where DIY railings most often fail inspection, because the rules shift from the deck guard. Any stair with four or more risers needs a graspable handrail, and “graspable” has a specific meaning: a round rail 1.25 to 2 inches in diameter, or a graspable profile you can wrap your fingers around, mounted 34 to 38 inches above the tread nosings. A flat 2×6 cap that’s comfortable on the deck does not qualify as a graspable handrail on the stairs — inspectors check this every time.
The guard on open stair sides still applies too, but the baluster spacing there is measured against a 4-3/8-inch sphere at the triangular opening formed by the tread, riser, and bottom rail, with the 6-inch sphere allowed only at that triangle. Run your stair balusters at the same tight 3.5-inch spacing you used on the deck and you’ll clear every requirement without measuring each opening. Set the handrail returns into the post so nothing snags a sleeve, and you’ve built a stair rail that’s both legal and genuinely safe to grab in the dark.
Cost-Saving Moves That Don’t Compromise Safety
You can trim a PT railing budget without cutting the parts that matter. Buy your lumber in full units rather than by the piece, sort for the straightest boards yourself, and build the rail sections on sawhorses before mounting them to save labor. Standard 2×2 balusters are far cheaper than turned or metal ones and pass code identically. What you should never economize on is the post-to-frame connection hardware or the fasteners — hot-dipped galvanized or stainless throughout is non-negotiable in treated lumber, and a $40 box of the right screws is cheap insurance against a rail that works loose in three years.
Is Pressure-Treated the Right Call for You?
Choose PT railing when budget is the priority, when you plan to paint it to match trim, or when it’s a utility deck where looks matter less than cost. It’s strong, it’s repairable board by board, and every part is available same-day at any home center. The tradeoffs are real: it needs periodic staining, it can check and crack as it weathers, and it will never look as crisp as a metal system.
If you want low maintenance above all and you’re willing to pay two to three times as much, aluminum or composite railing is the better long-game. But dollar for dollar, a well-built pressure treated deck railing remains the smartest value in decking — provided you hit the code numbers and bolt the posts to blocked framing instead of just screwing them to the rim. Get those bones right and the rest is easy.