Deck Railing Post Spacing: Bays, Counts and Connections

A railing is only as strong as its posts, and the posts are only as strong as their fixing to the frame. Spacing sets how much load each one has to carry.

  • Guide
  • 10 min read
  • Reviewed 20 October 2026
  • Same code as the calculator

Quick answer Most prescriptive deck guides keep guard posts no more than 6 ft apart. Divide each run by 6 ft and round up to get the bays, then divide the run by the number of bays so they are equal. A 16 ft run takes 3 bays of 64 in and 4 posts. The posts must be fixed with through-bolts and a hold-down anchor to a solid frame member, because the railing has to resist a 200 lb load at the top.

Why post spacing matters

The 2021 IRC requires a guard to resist a single concentrated load of 200 pounds applied at the top in any direction (Table R301.5). Wherever you push on the rail, the load goes into the nearest post, then into the deck frame. Posts spaced wide apart share the load badly, because the top rail has to bend further and each post carries more of the force. Narrow spacing costs more posts, but it makes the rail stiffer and cuts the movement you feel when you lean on it.

Post spacing is not in the IRC as a number. The code sets the load and the height, and leaves you to meet them with a tested detail. The most common detail is the American Wood Council's DCA 6, and the connection hardware makers publish matching instructions. Simpson Strong-Tie's guide to deck guardrails, for example, says posts should be spaced no more than 6 feet apart, and that is the figure most deck guides use. Treat it as the maximum for a wood post-and-rail guard, not as a target.

Laying out equal bays

Divide each straight run of guard by the maximum spacing, round up to get the number of bays, and then divide the run by the number of bays so every bay is the same. Equal bays look right, and they make every baluster the same length and every rail section the same length, so you can cut them in one batch.

bays = the whole number above (run ÷ 6 ft)
posts on a run with open ends = bays + 1
bay length (post center to post center) = run ÷ bays
clear opening for balusters = bay length − post width

Worked example: a 16 ft run

bays = 16 ÷ 6 = 2.67  →  3
bay length = 192 in ÷ 3 = 64 in  (5.33 ft)
clear opening = 64 − 3.5 (a 4×4 post is 3½ in square) = 60.5 in
balusters (1½ in wide, gaps under 4 in) = 11, with gaps of 3.67 in
A 16 ft run from the frontFour posts, three equal bays, the same infill in each
64 in64 in64 in3 equal bays, each under the 6 ft maximum (72 in)60.5 in clear11 balusters in every bay, gaps of 3.7 in

The 3½ in post width is the real size of a 4×4. If your posts are 4×6 or you wrap them in sleeves, use the finished width. The clear opening is the number to enter in the baluster calculator to get the infill, and it must be a different number from the bay length. Mixing the two is a common way to end up with a gap that is a half inch too wide.

Posts and bays by run length

The table applies the 6 ft maximum to common run lengths, with 3½ in posts. Balusters are 1½ in wide with a 4 in maximum gap. The count is for one bay.

Guard posts and bays for a straight run
RunBaysPostsBay lengthClear openingBalusters per bay
6 ft1272 in68.5 in12
8 ft2348 in44.5 in8
10 ft2360 in56.5 in10
12 ft2372 in68.5 in12
16 ft3464 in60.5 in11
20 ft4560 in56.5 in10
24 ft4572 in68.5 in12
30 ft5672 in68.5 in12

Posts at the ends of a run are counted in full. Where two runs meet at a corner, one post serves both, so subtract one post per shared corner.

A whole deck: three sides of a 12 × 16 ft deck

A deck attached to the house usually needs a guard on three sides. For a 12 × 16 ft deck with the 16 ft side facing the yard, the runs are 12 ft, 16 ft and 12 ft.

12 ft run: 2 bays  (72 in each)
16 ft run: 3 bays  (64 in each)
12 ft run: 2 bays  (72 in each)
posts = total bays + 1 = 7 + 1 = 8  (corners are shared)
Plan of the 12 × 16 ft deckEight posts and seven bays; each corner post serves two runs
House wall2 bays of 72 in2 bays of 72 in3 bays of 64 in8 posts7 bays, corner posts shared

Add a stair opening and the count changes: the stair has its own posts at the top of the flight, and the stair guard follows the slope of the stringers. Where you leave a gap for stairs, plan the post positions first and let the bay lengths follow, rather than the other way around. The stair posts are the ones most often fixed badly, because the end of the stringer is in the way. See how to build deck stairs for the stair layout.

The post connection is the real structure

A deck guard fails at the post foot far more often than at the rail. The details below are the common ones from connection makers' guidance and DCA 6-style prescriptive detail; use the instructions for the system you buy, and an engineer if you are unsure.

Section through one postThe bolts and the hold-down carry the load, not the rail
36 in min2 in2 in200 lb, any direction12341Post, 4×4 or larger, not notched2Two ½ in through-bolts with washers, 2 in from the edges3Hold-down anchor on the upper bolt4Solid joist or blocked rim joist, 2×8 or deeper
  • Post size. A 4×4 at least, not notched. Notching the post at the rim takes out the wood that carries the load.
  • Fasteners. Two through-bolts of ½ in diameter with washers, kept at least 2 in from the edge of the joist.
  • Hold-down. A hold-down anchor on the upper bolt, rated at least 1,800 lb of tension for a 36 in guard, according to Simpson Strong-Tie's guidance. A taller 42 in guard needs a stronger one.
  • Frame member. Fix to a solid joist or the rim joist with blocking, at least a 2×8. A post bolted to a rim board with nothing behind it is not enough.
  • Corrosion. Use hardware rated for treated lumber, and flash or seal around the bolt heads where water can get in.

Fixing posts to the outside of the rim with lag screws and no hold-down is a common way to get a wobbly deck rail, and inspectors check the post connection for that reason. If a post moves more than a small amount when you push it by hand, the connection is wrong.

Top rail span and infill

The top rail ties the posts together, and a 2×4 or 2×6 spanning between posts spreads a push over several of them. A rail that spans the full 6 ft between posts can flex, so fix it firmly at each post, and make any joint in the rail land on a post, never in the middle of a bay. Follow the detail in your guide or system for how the rail sits on or between the posts.

Infill is separate. Balusters must keep every gap under 4 inches, and the IRC allows a smaller load on the infill than on the rail. Typical wood balusters are 2×2; metal and cable systems have their own tested spacing, and cable systems often need posts closer together than 6 ft or tensioners that hold the load. For the baluster count and gap use the stair handrail height guide and the baluster calculator.

Manufactured systems

Composite, aluminum, vinyl and cable systems come with a maximum post spacing that has been tested for the system. Many are tested at 6 ft, some at 8 ft, and the numbers are in the installation manual. Follow the maker's figure even when it is shorter than 6 ft, and do not mix posts from one system with rails from another, because the test results apply to the whole assembly. The maker's manual is also the place to find the correct post connection, which is often a specific bracket.

If the manual allows 8 ft between posts but your deck length does not divide evenly, shorten the bays rather than stretching them. Three bays of 5 ft 4 in look better than two bays of 8 ft and a short 4 in cut, and they are stiffer.

Mistakes to avoid

  • Spacing posts to the baluster pack. Set posts for strength first and let the infill follow.
  • Unequal bays. One short end bay shows and gives a different load path at the corner.
  • Notched posts. Cutting a 4×4 down to fit the rim takes away half its section.
  • Posts on the end of a board. A post fixed to the face of a decking board or a fascia has nothing behind it.
  • No blocking. Where a post lands between joists, add solid blocking to receive the bolts.
  • Skipping the stair posts. The stair guard needs posts at the top and bottom of the flight, fixed as strongly as the rest.

Corners, stairs and gates

Spacing rules apply along a straight run. The places where runs meet, where a stair joins the deck and where a gate hangs need their own thought.

  • Corners. One post serves both runs. Fix it to the corner joist or to blocking tied into both rim joists, so it resists a push from either direction. A corner post is the one most often pushed, so give it the best connection on the deck.
  • Stair top. A post at the top of the stair, fixed to the deck frame and not to the stringer, carries the stair guard and handrail. The stringer is too flexible to take the load.
  • Stair bottom. A post at the foot, either fixed to a footing or fastened to the stringer with blocking, depending on the system.
  • Gates. A gate post takes the swing load of the gate as well as the guard load. Use a heavier post or a bracket made for it, and keep the gap at the latch under the sphere limit.
  • Openings. A stair opening or a gap for a grill leaves two end posts on a run. Count them as separate runs when you work out the bays.

Plan the stair guard last, once the stringer positions are fixed, since the posts follow the stair slope rather than the deck grid. The stair guard has the same height and sphere rules as any other, with the exceptions covered in the stair handrail height guide.

From post spacing to a baluster count

Once the bays are set, every bay needs the same infill. Take the 12 ft run, which has 2 bays of 72 in. The post is 3½ in wide, so the clear opening is 68.5 in. With 1½ in square balusters and a maximum gap under 4 in, each bay takes 12 balusters, with a gap of 3.88 in and a center spacing of 5.38 in.

bay = 144 ÷ 2 = 72 in  (6′ 0″)
clear opening = 72 − 3.5 = 68.5 in
balusters per bay = 12, gap = 3.88 in
balusters for the 12 ft run = 12 × 2 = 24

Keep the balusters identical in every bay. Equal bays make that automatic, while uneven bays mean a different count and gap in each, which looks wrong and is harder to build. Enter the clear opening in the baluster calculator to get the count and gap for any bay.

Fixing a railing that wobbles

A loose railing is a safety problem, not a cosmetic one. Work through these checks in order before you replace anything.

  1. Push each post by hand at the top, in and out and along the rail. Note which posts move at the base and which flex along their length.
  2. Look at the connection. Are there bolts or only lag screws? Is there a hold-down? Is the post fixed to a solid member, or only to the rim board?
  3. Check for rot at the post foot and in the rim joist behind it. Soft wood cannot hold a bolt.
  4. Add blocking between joists behind the post where it lands between supports, so the bolts have solid wood to grip.
  5. Replace lag screws with through-bolts and washers, and add a hold-down anchor on the upper bolt.
  6. Retest by pushing hard. If a post still moves more than a little, stop and get advice from a carpenter or engineer.

A railing that has been loose for a while may have rotted its connection. If the wood is soft around the bolts, the frame needs repair before the railing does.

Post materials and caps

Treated 4×4 lumber is the usual post, and it is the size the connection guidance assumes. Posts of 4×6 are stiffer and give more room for a hold-down bolt, at a higher price. Composite and aluminum systems use sleeves or hollow posts that fit over a structural post or a bracket, and the structural member inside, not the sleeve, carries the load. Always find out what the load path is: if a sleeve is only trim, it adds nothing to the strength.

Post caps keep water out of the end grain, which is where rot begins. A cap, a sealed cut end or a coat of preservative on every cut is cheap insurance. Posts should also stand clear of the deck boards by about 1/8 in, so water does not wick into the foot.

Sources and further reading

The 6 ft maximum, bolt sizes and hold-down rating are connection-maker guidance, not IRC figures. The 200 lb load is IRC Table R301.5. Always follow the instructions for your system and your building department.

FAQ

What is the maximum distance between deck railing posts?

Six feet is the usual maximum for a wood post-and-rail guard (Simpson Strong-Tie guidance). The IRC itself sets the 200 lb load, not a spacing, so use a tested detail and the maker's number for manufactured systems.

How many railing posts do I need for a 12 ft run?

Two bays of 72 in, so 3 posts if both ends of the run are open. If a run ends at a corner shared with another run, that post is counted once.

Should railing posts be on the inside or outside of the rim?

Either works if the connection is bolted through a solid frame member with a hold-down. Inside posts take up deck space, and outside posts are easier to fix but need a solid rim and blocking.

Can I notch a 4×4 railing post to fit the rim joist?

Avoid it. Notching removes wood where the load is highest, and connection guidance says posts should not be notched.

How do I space balusters between posts?

Measure the clear opening between posts and divide it with the baluster formula so every gap stays under 4 inches. The bay length minus the post width is the number to use.

What size post is used for a deck railing?

A 4×4 is the minimum, 3½ in square once milled. Some systems use 4×6 posts or posts wrapped in a sleeve.

Do I need a hold-down anchor on every post?

Prescriptive details for a 36 in guard use one on the upper bolt at each post. Follow the instructions for the system you use and your building department's rules.

What is the deck railing post spacing code?

The IRC sets loads and openings for guards, not a post spacing. The spacing comes from the rail system you use, so follow the maker's tested span and check local rules.

Is there a maximum guard post spacing?

No single figure applies. The posts and rail must carry the required load at the span you choose, so the limit is whatever the tested system or your engineer allows.