The short version
- Handrail and guard are separate requirements. A railing can meet one and fail the other.
- In Philadelphia, which adopts the 2021 International Residential Code, a handrail sits 34 to 38 inches above the line of the tread nosings, and openings in a guard must not pass a 4 inch sphere.
- Pennsylvania amends the model code on riser height: 8 1/4 inches maximum, where the model code says 7 3/4.
- New Jersey adopts the 2021 code statewide with its own modifications, and Delaware adopts building codes county by county, so the local code office gives the final number.
- Across the 635 places in our data at /data/, 113 have a median home built before 1950, where original railings are commonly lower and more open than the current code allows.
Handrail and guard are two requirements on one railing
The handrail is the graspable rail and has a height range, and the guard is the barrier on an open side and has a minimum height and a maximum opening.
On a stair that is open on one side, a single assembly usually does both jobs. The top rail is the handrail, and the balusters below it, together with the rail, form the guard. Because it looks like one thing, people assume there is one rule.
The two are measured differently and set in different sections of the code. The handrail is about grip: can a hand close around it, and is it where a hand expects it. The guard is about falling: is it high enough to stop a body, and are the gaps small enough to stop a child.
A stair with a wall on both sides needs a handrail and no guard. A balcony or a landing needs a guard and no handrail. An open stair needs both, and a railing that is solid, handsome and the wrong height meets neither.
When someone says a railing is up to code, ask which requirement they checked. There are two.
The numbers in Philadelphia
Philadelphia adopts the 2021 International Residential Code, which sets the handrail at 34 to 38 inches and limits guard openings to less than a 4 inch sphere.
Handrail height is measured vertically from the sloped line that joins the tread nosings. Section R311.7.8.1 sets it at not less than 34 inches and not more than 38. It is a range, and a rail at 40 inches is not a handrail under this code, however well made it is. The rail also needs at least 1 1/2 inches of clearance from the wall.
Guard height is in a different section. R312.1.2 requires not less than 36 inches above the walking surface in general, with an exception that allows 34 inches on the open side of a stair, measured from the line of the nosings. So on an open stair the two requirements can land within an inch or two of each other and still be separate tests.
The opening limit is in R312.1.3: no opening in a required guard may pass a sphere 4 inches in diameter. That is the rule that decides baluster spacing, and it is the one old railings fail most often.
| Requirement | Dimension | Section |
|---|---|---|
| Handrail height | 34 to 38 inches above the line of the tread nosings | R311.7.8.1 |
| Handrail clearance from the wall | Not less than 1 1/2 inches | R311.7.8.3 |
| Guard height, open side of a stair | Not less than 34 inches from the line of the nosings | R312.1.2, exception |
| Guard height elsewhere | Not less than 36 inches above the walking surface | R312.1.2 |
| Openings in a guard | Must not pass a 4 inch sphere | R312.1.3 |
| Maximum riser height in Pennsylvania | 8 1/4 inches, with no more than 3/8 inch variation in a flight | R311.7.5.1, as amended |
Where Pennsylvania departs from the model code
Pennsylvania amends the stair geometry in the model code, allowing a riser of up to 8 1/4 inches where the unamended code allows 7 3/4.
The International Residential Code is a model. It has no force until a state or a municipality adopts it, and most of them adopt it with changes. Pennsylvania's Uniform Construction Code is one example, and its stair provisions are among the changes people run into.
The model code limits riser height to 7 3/4 inches. Pennsylvania permits 8 1/4. Both limit the difference between the tallest and shortest riser in a flight to 3/8 inch, since an uneven step is the one people trip on.
This is why a figure copied from a national article can be wrong for a house in Pennsylvania, and why we cite the section and the jurisdiction when we quote a number.

New Jersey: the same model code, adopted by the state
New Jersey adopts the 2021 International Residential Code statewide as its one and two family dwelling subcode, with the state's own modifications, and treats work on existing houses under a separate rehabilitation subcode.
New Jersey's Uniform Construction Code is set at state level. The rule that adopts the residential code is N.J.A.C. 5:23-3.21, and it adopts the 2021 edition subject to modifications listed in the rule. Those modifications are New Jersey's own, and they are not the same as Pennsylvania's.
The part that matters most for older houses is the Rehabilitation Subcode, N.J.A.C. 5:23-6. It governs repair, renovation and alteration of existing buildings, and it does not simply apply new construction rules to old houses. What is required of a replaced railing can differ from what is required in a new house.
We do not publish New Jersey railing dimensions here, because we have not confirmed each one against the state's modified text. For a house in New Jersey, the local construction office applies the state code and gives the answer for your project.
Delaware: adopted county by county
Delaware adopts residential building codes at the county and municipal level, so the edition in force depends on where the house is.
Our service area in Delaware is New Castle County. The county's building code is Chapter 6 of the New Castle County Code, which adopts the International Residential Code for one and two family dwellings and townhouses, with county amendments.
Incorporated places can adopt their own edition. The City of Wilmington, the City of Newark and the City of New Castle each administer their own building codes, and the edition one of them uses is not necessarily the edition the county uses.
In practice this means a phone call. The county Department of Land Use, or the city's building office for an address inside city limits, confirms which edition and which amendments apply. We make that call before quoting a railing in Delaware.
Old railings, and when the current code applies
An existing railing is generally allowed to remain as built, and the current code generally applies when the railing or the stair is replaced.
Most of the railings we see were built long before any of these rules. In the dataset we publish at /data/, 113 of 635 towns and Philadelphia neighborhoods have a median home built before 1950, and in Philadelphia 40.0 percent of the housing predates 1940. Railings of that age are often lower than 34 inches, with balusters spaced well beyond 4 inches.
Codes distinguish between repairing what exists and building something new. Tightening a loose newel, resetting balusters or refinishing a handrail is repair. Replacing the railing is new work, and new work is normally held to the code in force.
The line between the two is drawn by the local code office, and whether a permit is needed is their decision as well. We ask before the quote, so the price reflects the railing that will actually be approved.
An old railing that is legal to keep is not the same as a railing that is safe for a small child. Those are two different questions, and the second one is yours to decide.
What graspable means
A handrail has to be a shape and size a hand can close around, which rules out a flat board laid on top of a wall or a wide decorative cap.
Height is half the handrail requirement. The other half is the profile. The code describes acceptable shapes: a round rail within a set range of diameters, or a non round rail within a set perimeter, with a finger recess where the section is larger.
The common failure is a flat two by four or a wide plank used as a rail. It is at the right height, and nobody can grip it in a fall. Another is a rail interrupted by newel posts so the hand has to let go at every turn.
When we replace a handrail, the profile is chosen from shapes that meet the graspability requirement, and the brackets are fastened into framing. A rail anchored only in drywall pulls out under the load it exists to carry.
How to measure your own railing
Measure straight up from the front edge of a tread to the top of the rail, and try to pass a 4 inch object between the balusters.
For handrail height, hold a tape vertically at the nosing, the front edge of a step, and read the height at the top of the rail. Do this at two or three steps. On an old stair the readings often differ, since the rail and the treads have moved independently over the years.
For the openings, a 4 inch ball or a block cut to 4 inches is the test. If it passes between two balusters, or under the bottom rail, the guard does not meet the current rule. Check the triangle formed by the tread, the riser and the bottom rail as well, which has its own allowance in the code.
Then push on it. A railing that moves when you lean on the newel post has a fastening problem that matters more than an inch of height. Send us the measurements and a photo, and we can tell you what the options are before visiting.





