
deck railing code in massachusetts: what passes inspection
Railings are where most deck inspections get held up. The rules are not complicated, but they are specific: how high, how far apart the balusters can be, how far apart the posts can be, when a handrail is required on stairs and what shape it has to be, and how strong the whole assembly has to be. This guide explains the Massachusetts residential code for deck railings in plain language, so you know what the inspector will measure.
price your deck in seconds
Answer five quick questions and see a standard, premium and deluxe range. No email needed to see the price.
our achievements






★★★★★5/5 · 170+ reviews
★★★★★5/5
★★★★★5/5
★★★★★5/5
★★★★★5/5
★★★★★5/5
★★★★★5/536 inches, 4-inch sphere, graspable handrail
A guard railing is required on any deck surface more than 30 inches above the ground within 36 inches of its edge. On a one- or two-family home the guard must be at least 36 inches tall, and no opening in it can let a 4-inch sphere pass through. Stairs with four or more risers need a graspable handrail between 34 and 38 inches above the nosings, and the guard along a stair must be at least 34 inches. Buildings with three or more units fall under the commercial code, where guards are 42 inches. Plum ProExteriors builds every railing to these rules and schedules the inspection that confirms it.

what a new deck costs
Deck pricing depends on size, height off the ground, the decking and railing you choose, stairs and the site itself. Answer a few questions below for a standard, premium and deluxe range in seconds. Every project is quoted after we visit, and financing is available on every service we offer.
Request your exact quote
Your answers and estimate are already in the message. Add your details and we will schedule a free on-site visit.
the rules, one at a time
What the inspector measures and why. Scroll through them.

When a railing is required
The trigger is height. If any part of the deck walking surface is more than 30 inches above the grade below, measured within 36 inches horizontally of the edge, that edge needs a guard. The 30 inches is measured to the lowest point near the deck, so a deck that is low on the house side and high over a slope needs a guard on the high side. A low deck a step or two off the ground does not need one by code, though many homeowners add one.
Guard height: 36 or 42
Decks and landings on a one- or two-family home: at least 36 inches from the deck surface to the top of the guard. Stairs: at least 34 inches, measured vertically from the nosing. Buildings with three or more units, and any deck under the commercial code: 42 inches. The 36 versus 42 question comes up on three-family porches and condo buildings, and the answer is 42. A guard can always be taller than the minimum.
The 4-inch sphere rule
No opening in a guard, between balusters, under the bottom rail, or between cable or glass panels and their posts, can allow a 4-inch sphere to pass. Two allowances on stairs: openings between balusters along a stair guard may be up to 4-3/8 inches, and the triangle formed by the tread, the riser and the bottom rail may allow up to a 6-inch sphere. Balusters set on 4-inch centers leave a gap larger than 4 inches once you subtract the baluster width, which is the mistake that fails most do-it-yourself railings.
Post spacing and attachment
The code gives a load the railing has to carry, not a spacing in inches, and the spacing follows from that. In practice, 4x4 posts are set no more than 6 feet apart and 6x6 posts no more than 8 feet apart; a manufactured aluminum or composite railing goes in at the spacing its engineering allows, usually 6 or 8 feet by section. Posts bolt through the rim joist with through-bolts and blocking, not lag screws into end grain. Post attachment is the most common failure on old decks, and the inspector will push on the railing.
Stair handrails
Any stair with four or more risers needs a handrail on at least one side, 34 to 38 inches above the nosings, continuous for the full run, returned to the post or wall at the ends, and graspable: a round rail 1.25 to 2 inches across, or a shaped rail with a perimeter of 4 to 6.25 inches and a defined finger recess. A flat 2x4 or 2x6 on edge is not a handrail, and neither is the cap on the stair guard. A separate graspable rail goes on the inside of the posts, with at least 1.5 inches of clearance so a hand can wrap around it.
Strength
Guards must resist a 200-pound force applied at the top in any direction, and the infill must resist 50 pounds over a one-square-foot area. In practice that means the post attachment above, rails fastened to the posts with hardware rather than toe-nails, and manufactured systems installed with the brackets and spacing the maker specifies.
cable, glass and aluminum railings
Cable railings are allowed and popular on composite decks, but they have their own rules. The 4-inch sphere rule applies between cables, so cables run on 3-inch centers, tensioned to roughly 200 to 300 pounds so they cannot be pushed apart, with intermediate supports every 4 feet or so to keep the span short. A rigid top rail is required; cables cannot be the top of the guard. Corner and end posts carry all the tension and are heavier or doubled. A cable railing that is loose, under-supported or missing its top rail fails inspection even if it looks right. Glass railings must use safety glazing, tempered or laminated, with enough support to carry the 200-pound load. Aluminum and composite railing systems are engineered to meet the code when installed per the manufacturer, which is why we use systems rather than site-built rails on most composite decks.

Replacing a railing on an existing deck
A railing can be replaced without rebuilding the deck if the posts and the frame they attach to are sound. We check the rim joist and the post connections first; if the posts are rotted at the base or the rim is soft, the railing cannot be fastened to code. On older decks the new railing usually needs to be taller or tighter than the one it replaces, because the rules have changed over the decades.
Do I need a permit for a railing?
Replacing a railing with the same type in the same location is often treated as a repair, but towns differ, and a new deck or a rebuilt frame always needs one. We confirm with the building department and pull a permit when one is required. Our Massachusetts deck permit guide covers the application, the inspections and what happens with an unpermitted deck.
what a code-compliant railing costs
Composite decking
Composite or aluminum railings at standard; upgraded railings at premium; cable or glass at deluxe
- Standard
- $183
- Premium
- $233
- Deluxe
- $298
Wood decking
Pressure-treated or cedar; Ipe at the deluxe tier
- Standard
- $141
- Premium
- $178
- Deluxe
- $318
Railings are part of the deck price
We do not price railings as an add-on; they are built into the per-square-foot price of the deck, with the railing type set by the tier. A railing-only replacement on a sound frame is quoted after we check the posts and the rim. See our deck cost guide and our Trex vs AZEK comparison. The calculator above gives a planning range; the free estimate turns it into a measured quote.
how plum proexteriors builds a railing that passes
Every deck we build is drawn with the guard height, baluster spacing, post spacing and handrail called out, so the inspector sees the numbers before the deck exists. Posts are through-bolted with blocking, manufactured railings go in at the maker's spacing, cable systems are tensioned and supported to the sphere rule, and stairs get a separate graspable handrail. We schedule the inspection and meet the inspector. We build in Wellesley, Newton, Natick, Needham, Brookline and Framingham. Financing is available.


what our clients say
The owner is on site for every project, and when the job is done he asks every client the same question on camera: what do you think? These are their answers, at their own homes.
Tap to play
Tap to play
Tap to play
Tap to play
Tap to play
Tap to play
Tap to play
Tap to play
Tap to playrailings we have built






more on decks
frequently asked questions
How high does a deck railing have to be in Massachusetts?
At least 36 inches on the deck and 34 inches along the stairs for a one- or two-family home. Buildings with three or more units need 42 inches.
How high can a deck be without a railing?
Up to 30 inches above the ground, measured within 36 inches of the edge. Above that, a guard is required.
What is the baluster spacing rule?
No gap larger than 4 inches anywhere in the guard, up to 4-3/8 inches between balusters on a stair, and up to 6 inches in the triangle at the bottom of a stair. We set balusters so the clear space between them is under 4 inches.
How far apart can deck railing posts be?
Far enough that the railing still carries a 200-pound load. In practice, 4x4 posts at 6 feet and 6x6 posts at 8 feet, and manufactured railings at the spacing their engineering allows.
Can I use a 2x4 as a stair handrail?
No. A handrail has to be graspable: a round rail 1.25 to 2 inches across, or a shaped rail with a 4 to 6.25 inch perimeter. A 2x4 on edge does not qualify, and the guard cap is not a handrail either.
Are cable railings legal in Massachusetts?
Yes, when the cables are on 3-inch centers, tensioned, supported every 4 feet or so, topped with a rigid rail, and the posts carry the required load.
Do stairs need a handrail?
Any stair with four or more risers needs a graspable handrail 34 to 38 inches above the nosings on at least one side.
Do I need a permit to replace a railing?
Replacing a railing with the same type in the same location is often treated as a repair, but towns differ. We confirm with the building department and pull a permit when one is required. See our Massachusetts deck permit guide.
book a free deck estimate
Call us or send the estimate form. We will check your railing and your deck frame and give you a written quote.
Call (508) 266-5411 Send the estimate form