Deck Stair & Railing Codes: Rise/Run, Height, & Spacing Codes

Are you thinking about building a brand new deck or adding to an old one? Then you’ve come to the right place.

There’s a ton of stuff that you should know before starting your project regarding code requirements, rules, and other regulations.

Your deck stairs need to have a minimum width of 35 inches, and any deck stairway with three or more steps will usually require a railing.

Also, the top rail of your stairway must be a minimum of 42″ high from the floor part of your deck. If your deck is higher than 30″ off the ground, then a railing will be required.

These are just some of the codes and requirements you must adhere to. Knowing the rules before you start your project is critical and could save you money and headache down the road.

In this article, we’ll look at deck stair and railing codes, and rise, run, height, and spacing codes. 

Do Deck Stairs Need a Railing?

If the top of your deck is more than 2” above the ground, then your deck stairs require a railing. You’re not going to get in severe trouble or face fines if you don’t have one, but a building inspector will need deck railing on new construction.

If your deck stair gets put up against your house on one side, then only the bare side of the stairs needs a railing. 

You don’t necessarily have to put a railing on if you own a house without deck stairs railing or buy one without them.

However, if you want to sell your house and face a home inspection, a missing railing is something that a home inspector will point out, and it will be up to you to fix it.

A deck railing can be a simple handrail or a more complex one with spindles. The focal point is to have something protecting you from falling. You’ll also need something to hold onto when going up and down the stairs.

How Many Steps on Deck Require a Railing?

Before your deck requires a railing, the number of steps depends on how high the steps are and how elevated your deck is.

As a general rule, however, any deck stairway with three or more steps will usually require a railing.

Building codes are different in nearly every region, so check on your local jurisdiction before finalizing. 

In nearly all situations, a deck stairway of only two steps does not require a railing, and if there is only one step, you certainly don’t need a barrier.

One can be added if you wish for either cosmetic purposes or practical ones, but a building inspector will not require it. 

If you’re concerned about what the OSHA requirements are, here you go: 

  • The top rail of your stairway must be a minimum of 42” high from the floor part of your deck. 
  • The handrail itself must be somewhere between 30” and 38” above your decks’ platform. 
  • Handrails or guardrails should always be added to the side of any open stairway. 
  • A handrail or guardrail should be added to the open side of a half-closed stairway.

What Can I Use for My Deck Stair Railing?

You can make your railing or handrail out of many different materials. Here are some of those options:

1. Wood  

Wood is perhaps the most readily accessible material for guardrails. Depending on the design that you’re looking for, you can purchase a ready-made handrail at most home improvement and lumber stores. 

2. Black Steel Gas Pipe

Handrails made out of steel gas pipes have become quite trendy lately. This material offers a modern and industrial look to your deck and stairway. 

3. PVC pipe 

PVC pipe is an excellent material for a handrail because of its round shape and cheap material cost. 

4. Steel & Aluminum

While both steel and aluminum are viable options for a handrail because of the round shape and texture, you must be cautious when using them.

Steel and aluminum can be dangerous during a thunderstorm. Lightning is attracted to them, and they can get very slippery when wet. 

What is the Code for Deck Stairs Width?

The minimum width of the stairs on your deck is 36 inches. You can choose to have wider stairs if you’d like, but you shouldn’t have anything narrower than 36 inches wide. Here are some additional code requirements regarding your stairs. 

  • A minimum of 36 ”at all points above the permitted handrail height.
  • A minimum of 31.5 “width below handrail height where a handrail is on one side.
  • A minimum of 27 “width below handrail where handrails are on both sides.
  • A maximum rise of 7-3 / 4 ”- maximum difference among risers 3/8″.
  • A minimum tread width of 10 “- maximum difference among treads 3/8”.

If you follow these requirements and adhere to whatever your local code rules are, building your deck will be a pleasant and problem-free experience. 

Do Decks Require a Railing?

If your deck is higher than 30″ off the ground, a railing is required.

The maximum height without a barrier is 24″ in some areas, but that number can go up or down depending on where you live. Building codes and requirements change drastically from town to town and city to city.

Even though the building code may not require a railing, it’s still a good idea to have one for your safety. A fall from anything over 1 or 2 feet can be enough to injure someone, and if a simple railing can prevent this from happening, then take caution and build one. 

If you have a railing on your deck or deck stairway, the minimum height requirement is 36″ to 42″, depending on where you live.

Remember that building codes vary greatly from place to place, and check with your local building inspector before starting your deck construction

How Far Apart Do Pickets (Spindles) Need to Be?

Pickets and spindles on a deck railing can be as close together as possible, but they should never be more than 4 inches apart.

This minimum requirement allows for enough space to see through but not enough room for a child or adult to fall through. A good rule of thumb to follow is that there should be three spindles for every foot of the railing. 

Like the railing on your deck, you can make your spindles out of various building materials. Wood, metal, and piping are just a few of the items you can use, but the spacing requirements remain the same. 

While you can put your pickets or spindles closer to 4 inches, this isn’t advisable. Having extra spindles will cost you a lot of money, but they will also take away from your deck’s view. 

How Do I Install a Deck Railing & Stairs?

Installing a deck railing on your stairs can be fun and save you a lot of money. Listed below are a set of numbered instructions to follow.

While every deck railing and situation is different, this list will be a great guide to set you on the right path. 

  1. Always start by laying out the position of your deck railings before you begin the installation process. You should place the top rail post at the rear of the thread, then align the bottom pole in the same manner.
  2. Install guard rails on all open sides of stairs that rise more than 30” above ground level. Secure the bottom stair post to the frame using two bolts that are ½” in diameter. You must do this to ensure that your deck meets code and safety requirements. 
  3. Bolt the rail post securely to the riser board or the stair stringer. Ensure the rail post is long enough to support a 34” railing at a minimum. Do not forget to allow for extra space for cap mountings. This step is crucial to ensuring the integrity of your railing. 
  4. Check to make sure that both the top and bottom stair posts are aligned. A crooked stairway will quickly derail your deck plans. Lay the bottom rail on top of the stairs and mark the intersection of the rail posts with the bottom rail to determine the correct angle.
  5. Cut the top and bottom rails to equal length. If you’re going to cut a piece of wood wrong, it’s always best to cut too long because you can cut shorter if needed. Better safe than sorry. 
  6. Use screws and attach the rail connector to the ends of both the top and bottom rails. Only use screws that are either stainless steel or otherwise safe for outdoor use. Using the wrong screws will result in them rusting out and becoming an eyesore. 
  7. Install the bottom rail centered between the posts. Ensure your stair spindle connectors are placed no more than 4” apart from each other, as per code requirements.
  8. Align the top and bottom rail sections using a level or chalk line to mark the corresponding connector locations. The last thing you want is a crooked staircase or a crooked railing. 
  9. Measure and cut each baluster accordingly, so they fit your railing assembly. Use the same precautions that were mentioned above and cut long rather than short. Getting the angles right will also take a little practice, so don’t get frustrated if you mess up a time or two. 
  10. Slide the spindles over the bottom stair rail connectors. Next, slide the top rail connectors into each spindle, starting at the bottom and working your way up.
  11. Use rail connector screws to attach the top rail to the 4×4 post. Once again, use only screws that are safe for the outdoors and won’t rust after being outside for some time. 
  12. Install the 2×4 rail cap over the top rail. Begin by pre-drilling and screwing the ends of the top caps into the rail posts. Always pre-drill your holes to keep your screw or drill from slipping and scratching your wood. 
  13. Next, secure the center with extra screws. Don’t use so many that it doesn’t look right, but enough to ensure security. 
  14. Then, fasten the top cap to the end of the 2×4 and into the side of the bottom stair rail post.
  15. Tighten the top cap to the bottom stair rail post, and voila, your deck stair railing is complete. This may seem like a daunting task, but don’t get frustrated. It may take time and money, but it will be a growing experience and one that will stick with you for a lifetime. 

If you follow the instructions mentioned above, you will safely and securely build your deck railing. Following these steps will also ensure that your fence is up to code and will pass building inspections.

Frequently Asked Questions

1. Do Cable Railings Meet Building Code?

Cable railings meet building codes in most areas as long as it is appropriately assembled. A cable railing that is overly slack and loose is both unsafe and unacceptable, and no building inspector who is doing their job right will say it passes code. 

For a cable railing to meet building code, it’s not just about the material you use. It’s about the construction and integrity of the barrier itself that matters.

A building inspector will apply the same standard to any railing. If it’s shabbily constructed and not capable of safely supporting a person’s weight, no railing, cable, or otherwise will meet building code requirements. 

2. Is There a Difference Between a Handrail & a Stair Rail?

A stair rail comprises a handrail and spindles or pickets to ensure maximum safety and falling prevention.

A handrail is just what it sounds like: something to hold onto when going up or down the stairs. Most building codes only require a guardrail, but a stair rail is best for maximum safety. 

3. Do Deck Stairs Need Railings on Both Sides?

If your deck stairs are open on both sides, you will need a railing or handrail. If, however, your deck stairs are built against your house or other forms of construction, then only the opposite, open side needs a railing. 

The whole point of the railing requirements is to keep people from falling and provide support when going up or down the stairs.

The reason that pickets need 4-inch spacing, is to prevent children from getting their heads stuck between the pickets.

If there is protection on one side and a barrier on the other to provide needed support and protection, your deck stairs will be up to code. 

Final Thoughts

Hopefully, this has answered any questions regarding code regulations about the steps and railing on your deck. Remember that code regulations vary significantly from town to town and state to state. 

The best and wisest thing you can do before beginning any construction is to check your local building requirements and stick to them. Good luck with your next steps!


Photo of author

Hubert Miles

Hello! My name is Hubert Miles. I'm a licensed Home Inspector, Certified Master Inspector (CMI), and FHA 203k Consultant. One of my favorite parts of my job is inspecting decks and patios. I also enjoy spending time in our backyard with friends and family. My team and I started this site to share this journey. We hope you enjoy the content.

DISCLAIMER: The content published on is not professional advice. You should consult with a licensed professional and check local permit requirements before starting any project. is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to We also participate in other affiliate programs with other affiliate sites. We are compensated for referring traffic and business to these companies.