A deck railing is both a safety feature and a design element, and its price is set mostly by the material. Wood is the cheapest and glass the most expensive, with composite, vinyl, aluminum and cable in between. This calculator multiplies your railing length by the installed price per foot of your chosen material, adds the longer run of a stair railing and any gates, and estimates the number of posts and, for spindle styles, balusters.
How the calculation works
- Railing to buy = deck railing length + stair railing length × 1.25 (stairs run on a slope)
- Total = railing to buy × installed price per foot + gates × $150
- Posts = deck length ÷ post spacing, rounded up, plus one, plus two for a stair railing
- Balusters = deck length × 2.4 (1.5-inch spindles with gaps under 4 inches, which gives about 2.4 per foot)
Example
A deck has 40 ft of railing and a stair railing of 12 ft. Counting the stair run, you need 55 ft of railing. With composite railing at $70 per foot and 1 gate at $150, the total is $4,000, or about $73 a foot. Posts every 6 ft call for about 10 posts, and a spindle style needs about 96 balusters. In wood, the same job costs about $2,350, and in glass about $12,250.
Material comparison
- Pressure-treated wood is the cheapest but needs staining or sealing every year or two and can warp or crack.
- Vinyl is low-maintenance and holds its color, though it can look plain and can crack in extreme cold.
- Composite combines a wood look with low maintenance and sits in the middle on price.
- Aluminum is strong, thin, light and does not rust, with powder-coated finishes that last for years.
- Cable keeps views open but requires tensioning and strict spacing; check that your local code accepts it.
- Glass gives an unobstructed view and is the most expensive. It needs regular cleaning.
Building code basics
In most places, a guard is required when the deck surface is more than 30 inches above the ground. The usual minimum height is 36 inches, and openings must not let a 4-inch sphere pass. The top rail should resist a 200-pound load applied in any direction, and stairs need a graspable handrail between 34 and 38 inches high. Local codes vary, and an inspector must approve the work, so check with your building department before you buy.