Short answer: on most Massachusetts homes, a guard is required where a deck, porch or stair is more than 30 inches above the ground below, and it must be at least 36 inches tall with no opening that lets a 4-inch sphere through. Stairs with 4 or more risers need a handrail 34–38 inches above the stair nosing that you can grip. Commercial and multi-family buildings generally require 42-inch guards. Your local building department has the final say.
| Rule | One- and two-family homes | Commercial / most multi-family |
|---|---|---|
| Guard required | Open side more than 30 in above the floor or grade below | Open side more than 30 in above the floor or grade below |
| Minimum guard height | 36 in | 42 in |
| Openings in a guard | Must stop a 4 in sphere | Must stop a 4 in sphere |
| Handrail required | Stairs with 4 or more risers | Generally on both sides of stairs |
| Handrail height | 34–38 in above the nosing | 34–38 in above the nosing |
| Handrail grip (round) | 1¼–2 in diameter | 1¼–2 in diameter |
Which code applies in Massachusetts
Massachusetts writes its own building code, 780 CMR. The 10th edition, in effect since October 2024 and the only edition in force since mid-2025, is based on the 2021 International Residential Code (for one- and two-family homes) and the 2021 International Building Code (for everything else), with Massachusetts amendments. Railing rules come from the guard and handrail sections of those codes.
Two other sets of rules show up on railing jobs. Rental housing is also covered by the State Sanitary Code (105 CMR 410), which has its own guard and baluster requirements for existing buildings. Public and commercial buildings must meet the Massachusetts Architectural Access Board rules (521 CMR) and the federal ADA standards for accessible routes.
Guards vs. handrails
People use “railing” for both, but the code treats them differently. A guard keeps you from falling off an open side: a porch edge, a deck, a stair open on one side, a landing. A handrail is what you hold while you walk up or down. On many stairs one railing does both jobs, so it has to meet both sets of numbers: tall enough to be a guard where the drop needs one, and with a graspable rail at handrail height.
The 4-inch sphere
Openings in a guard are checked with a 4-inch ball. If the ball passes through anywhere, the guard fails. There are two common exceptions in the residential code: the triangle under the bottom rail of a stair, which may be larger (a 6-inch sphere), and openings on stair guards, which may allow a 4⅜-inch sphere. Cable railings are tested with the cable pushed, not at rest.
When a handrail is required
In homes, a handrail is required on stairs with four or more risers. It must be continuous for the full flight, 34 to 38 inches above the line of the stair nosings, and graspable: a round rail between 1¼ and 2 inches in diameter, or an equivalent shape. Ends should return to a wall or post so clothing cannot catch.
Commercial and accessible railings
In commercial buildings and most multi-family buildings, guards are 42 inches tall. Accessible ramps and stairs need handrails on both sides, with extensions past the top and bottom of the run. Exact extension lengths and clearances depend on whether ADA, 521 CMR or both apply; your architect or the access board should confirm them for the project.
Before you build
Call your local building department and ask two questions: does this job need a permit, and is there anything local the inspector checks on railings? Historic districts in towns like Lexington, Cambridge and Boston may also review how a new railing looks from the street.
