How to Build a Deck: Layout, Footings, Ledger, Framing and Stairs

Wooden deck with railings and chairs along a cabin at James River State Park in Virginia

Reader-supported: we may earn a commission when you buy through our links, at no extra cost to you. As an Amazon Associate I earn from qualifying purchases. Learn more

The short answer: get a permit and call 811 first. Lay out the deck with string lines squared using a 3-4-5 triangle. Pour footings below your frost line, attach a flashed ledger to the house rim joist with 1/2 in. lags, bolts or approved structural screws, and set 6x6 posts and a beam. Hang joists sized from the IRC span table (for example, Southern pine 2x8s at 16 in. on center span up to 11 ft 10 in.), add blocking and the rim, then lay decking, guards on any deck over 30 in. high, and stairs with risers no taller than 7-3/4 in.

This guide follows the prescriptive rules in the International Residential Code (IRC section R507) and the American Wood Council's free DCA 6 deck guide, which most building departments accept for simple decks. Your local code and inspector have the final word, and they often amend these rules, especially for frost depth, snow load and ledger attachment.

At a glance
DifficultyAdvanced (a big but learnable project)
Time3 to 6 weekends for a 12 x 16 ft deck, plus inspections
CrewTwo people for posts, beams and joists
PermitRequired almost everywhere for attached decks and decks over 30 in. high
Call a pro forDecks over one story high, hot tubs, roofs over the deck, snow loads over 40 psf, attaching to brick or a cantilevered floor

Step 1: Plan the deck and pull a permit

Draw a simple plan: deck size, height, joist size and spacing, beam location, footing size and depth, ledger attachment, stair location and guard details. Many building departments hand out a deck plan template based on DCA 6. Bring it to the permit counter and ask about:

  • Frost depth for footings, which ranges from a few inches in the Gulf states to 4 ft or more in the northern states
  • Ground snow load in your area (DCA 6 covers decks up to 40 psf)
  • Setbacks from property lines and easements
  • Which inspections they need and when

Call 811 at least a few business days before you dig so utility lines are marked for free.

Step 2: Lay out the deck

Diagram of deck layout with batter boards, string lines and a 3-4-5 triangle used to square the string to the house
Square the strings with a 3-4-5 triangle (or 6-8-10 for more accuracy), then check that the diagonals match.
  1. Snap a level line on the house for the top of the ledger. Set it so the finished deck surface sits at least an inch below the door threshold.
  2. Build batter boards (two stakes and a crosspiece) a couple of feet past each outside corner.
  3. Run mason's string from the house to the batter boards to mark the outside edges.
  4. Square the strings to the house with a 3-4-5 triangle: mark 3 ft along the house and 4 ft along the string; adjust until the diagonal between the marks is exactly 5 ft. Use 6-8-10 or 9-12-15 for bigger decks.
  5. Measure both diagonals of the deck rectangle. When they match, the layout is square.
  6. Mark footing locations along the beam line with spray paint.
Layout
IRWIN

IRWIN Tools STRAIT-LINE Chalk Line, Classic Reel, Blue, 100ft (IWHT48441BC)

A 100-foot IRWIN STRAIT-LINE chalk reel for snapping long layout lines on decks, sheds and floors.

Check price on AmazonCheck price at Home DepotCheck price at Lowe's
Everyday tape
STANLEY

STANLEY FATMAX 25 ft. Tape Measure (33-725)

A wide-blade 25-foot tape that stays stiff when you extend it across a room or a sheet of plywood.

Check price on AmazonCheck price at Home DepotCheck price at Lowe's
Best for most homes
Bosch

Bosch Green-Beam Self-Leveling Cross-Line Laser (GLL50-20G)

A compact green cross-line laser for hanging shelves, cabinets and tile, with a magnetic mount and AA power.

Check price on AmazonCheck price at Home DepotCheck price at Lowe's

Step 3: Dig and pour the footings

Cross-section of a deck footing: concrete footing below the frost line, a post base anchored on top, a 6x6 post, and grade sloped away
Footings rest on undisturbed soil at least 12 in. deep and below the local frost line. A post base keeps the post off the concrete.
  • Footings must sit on undisturbed soil at least 12 in. below grade and below the frost line set by your building department (IRC R507.3).
  • Footing size depends on the load each one carries and your soil. Size them from the DCA 6 footing table, which is based on your beam and joist spans and soil bearing capacity, or from the size your building department gives you.
  • Have the holes inspected before you pour if your building department requires it.
  • Set galvanized post bases in the wet concrete, aligned with the string line, or use anchor bolts and add the bases later.

Step 4: Attach and flash the ledger

Cross-section of a deck ledger attached to the house rim joist with flashing: siding removed, flashing tape on the sheathing, the ledger fastened with lags or bolts, metal Z-flashing over the ledger tucked under the house wrap and siding
Water that gets behind a ledger rots the house rim joist. Flash above and behind the ledger, lapping each layer like shingles.

The ledger is where most deck collapses start. DCA 6 and the IRC require:

  • A ledger at least a 2x8 of pressure-treated or naturally durable No. 2 or better lumber (IRC R507.9.1)
  • Attachment to a solid house rim joist (at least 2x8, or engineered rim board) with 1/2 in. lag screws or through-bolts in a staggered pattern from the IRC fastener table, or an approved structural ledger screw used per its evaluation report
  • No attachment to brick veneer, a cantilevered floor overhang, or through siding left in place; those need a freestanding deck or engineering
  • Flashing that keeps water off the house framing: remove the siding where the ledger goes, apply self-adhered flashing to the sheathing, fasten the ledger, then install metal or vinyl Z-flashing over the top of the ledger, tucked under the house wrap and siding above

DCA 6 also details lateral load connectors (hold-down devices) that tie deck joists to the house floor framing. Ask your inspector what your area requires and show it on your plan.

Flashing
3M

3M All Weather Flashing Tape 8067, Tan, 3 in x 75 ft, 1 Roll

3M All Weather Flashing Tape 8067 for sealing door and window flanges and deck ledger details.

Check price on AmazonCheck price at Home DepotCheck price at Lowe's

Step 5: Set the posts and beam

  • DCA 6 calls for 6x6 posts minimum, rated for ground contact, with a maximum height from its post table.
  • Cut posts to height after the concrete cures, using a level line from the ledger minus the joist and beam depth.
  • Build the beam from two or three 2x8 to 2x12 boards, glued and nailed or screwed as DCA 6 shows, with joints over a post. Size it from the DCA 6 or IRC beam span table based on how far the joists span onto it.
  • Notch the post to carry the beam, or use a post cap, and bolt it per the plan. Never just toe-nail a beam to a post.

Step 6: Hang the joists

Table graphic of maximum deck joist spans from IRC Table R507.6 for Southern pine, Douglas fir-larch and hem-fir, and cedar or redwood, for 2x8, 2x10 and 2x12 joists at 12, 16 and 24 inches on center
Maximum joist spans from IRC Table R507.6 (No. 2 grade, 40 psf live load, 10 psf dead load). Your inspector's table rules.

Maximum deck joist spans, IRC Table R507.6, No. 2 grade, 40 psf live and 10 psf dead load:

SpeciesSize12 in. o.c.16 in. o.c.24 in. o.c.
Southern pine2x813 ft 1 in.11 ft 10 in.9 ft 8 in.
Southern pine2x1016 ft 2 in.14 ft 0 in.11 ft 5 in.
Southern pine2x1218 ft 0 in.16 ft 6 in.13 ft 6 in.
Douglas fir-larch, hem-fir, SPF2x812 ft 6 in.11 ft 1 in.9 ft 1 in.
Douglas fir-larch, hem-fir, SPF2x1015 ft 8 in.13 ft 7 in.11 ft 1 in.
Douglas fir-larch, hem-fir, SPF2x1218 ft 0 in.15 ft 9 in.12 ft 10 in.
Redwood, western cedars2x811 ft 8 in.10 ft 7 in.8 ft 8 in.
Redwood, western cedars2x1014 ft 11 in.13 ft 0 in.10 ft 7 in.
Redwood, western cedars2x1217 ft 5 in.15 ft 1 in.12 ft 4 in.

Most pressure-treated lumber in the East and South is Southern pine; in the West it is often hem-fir or Douglas fir. The species is on the lumber stamp. Check your decking too: many composite boards need joists at 16 in. or 12 in. on center, and closer still on diagonal layouts.

Plan view of a deck frame: ledger on the house, joists at 16 inches on center in joist hangers, a doubled beam on 6x6 posts, rim joists and blocking
A typical attached deck frame. The joists hang from the ledger in hangers and bear on the beam, with a rim joist across the ends.
  1. Mark joist locations on the ledger and the rim at 16 in. on center (or your plan's spacing).
  2. Install galvanized joist hangers on the ledger with the nails the hanger maker specifies (not drywall or deck screws).
  3. Set each joist crown up in its hanger and over the beam, and fasten it to the beam with hurricane ties or the connection your plan shows.
  4. Cantilever joists past the beam only as far as the IRC table allows for your joist size.
  5. Fasten the rim joist across the joist ends and add solid blocking over the beam where your plan calls for it.
  6. Butyl joist tape on the tops of the joists is optional but helps wood framing last longer under the decking.

Use hardware rated for treated lumber: hot-dip galvanized (such as Simpson ZMAX) or stainless steel, and match fasteners to the hanger's finish.

Complete kit
Makita

Makita 18V LXT Brushless Impact Driver Kit (XDT131)

A complete brushless impact driver kit with a battery and charger, a good match for the XFD131 drill.

Check price on AmazonCheck price at Home DepotCheck price at Lowe's
Cordless pick
DEWALT

DEWALT 20V MAX 7-1/4 in. Brushless Circular Saw (DCS570B)

A full-size 7-1/4-inch cordless circular saw that cuts through 2x lumber in one pass, no cord to drag around the yard.

Check price on AmazonCheck price at Home DepotCheck price at Lowe's

Step 7: Lay the decking

  • Start at the house with a full board, or at the outside edge with a starter board so the last board at the house can be ripped.
  • Gap wood boards as recommended for your lumber (wet treated boards shrink, so they can go tight); follow the maker's gapping for composite.
  • Use two deck screws per joist, about 3/4 in. from each edge, or hidden fasteners made for the board.
  • Stagger butt joints, and land every joint over a joist (or doubled joist for composite).
  • Snap a line and trim the ends flush with a circular saw.

Step 8: Build guards and stairs

Diagram of deck stairs showing maximum riser height of 7-3/4 inches, minimum tread depth of 10 inches, minimum width of 36 inches, handrail 34 to 38 inches high, and guard height of 36 inches
IRC stair limits: risers 7-3/4 in. max, treads 10 in. min, 36 in. wide, handrail 34 to 38 in. Guards are 36 in. min on decks over 30 in. above grade.
  • Guards: required where the deck surface is more than 30 in. above grade. They must be at least 36 in. high (some areas require 42 in.) with openings that will not pass a 4 in. sphere. Guard posts need the strong blocking or hardware attachment shown in DCA 6; posts screwed only to the outside of the rim do not pass.
  • Stair risers: 7-3/4 in. maximum, with no more than 3/8 in. difference between the tallest and shortest riser.
  • Stair treads: 10 in. minimum depth.
  • Stair width: 36 in. minimum.
  • Handrails: required on stairs with four or more risers, 34 to 38 in. above the tread nosings, and graspable.
  • Stringers: cut stringers have span and spacing limits in DCA 6, and the bottom of the stairs needs a footing or a solid landing pad. Light stairways as your code requires.

To lay out stair stringers, measure the total rise from the deck surface to the landing, divide by 7-3/4 and round up to get the number of risers, then divide the total rise by that number for the exact riser height. A speed square with stair gauges makes marking the stringer fast.

Must have
Swanson

Swanson 7 in. Speed Square (S0101)

The original rafter square: marks square and 45-degree lines, finds angles and guides a circular saw for straight crosscuts.

Check price on AmazonCheck price at Home DepotCheck price at Lowe's
Cordless pick
DEWALT

DEWALT 20V MAX 7-1/4 in. Brushless Circular Saw (DCS570B)

A full-size 7-1/4-inch cordless circular saw that cuts through 2x lumber in one pass, no cord to drag around the yard.

Check price on AmazonCheck price at Home DepotCheck price at Lowe's
Stairs and gutters
Little Giant

Little Giant Velocity Multi-Position Ladder

A multi-position ladder that works as an A-frame, extension ladder, staircase ladder or trestle. One ladder instead of three.

Check price on AmazonCheck price at Home DepotCheck price at Lowe's

Lumber and hardware shopping list

  • Pressure-treated lumber rated for ground contact for posts, and for above-ground or ground contact (as your code requires) for framing
  • Concrete, tube forms and post bases
  • Ledger fasteners: 1/2 in. hot-dip galvanized lags or bolts, or approved structural ledger screws
  • Flashing: self-adhered flashing tape and Z-flashing
  • Joist hangers, hurricane ties and the hanger nails they specify
  • Deck screws or hidden fasteners
  • Preservative for cut ends of treated lumber, as DCA 6 requires

When to call a deck builder or engineer

  • The deck is more than one story above the ground, or holds a hot tub or outdoor kitchen
  • You want a roof or pergola on the deck
  • The house has brick veneer, an overhanging floor, or no solid rim joist
  • Your area has heavy snow loads or expansive soils
  • You are replacing an old deck and the house rim joist shows rot

Deck guides and codes to read first

Related guides: how to choose a circular saw, why you need a speed square, stain and seal a deck, build a shed and impact driver vs drill.

Frequently asked questions

Do I need a permit to build a deck?

Almost always for a deck attached to the house or more than 30 in. above the ground, and often for freestanding decks over a certain size. Call your building department before you buy lumber.

How far can deck joists span?

It depends on species, size and spacing. In IRC Table R507.6, Southern pine 2x8s at 16 in. on center span up to 11 ft 10 in., 2x10s up to 14 ft and 2x12s up to 16 ft 6 in. Other species span less.

How deep do deck footings need to be?

At least 12 in. below grade on undisturbed soil, and below the frost line your building department sets, which can be 4 ft or more in cold climates.

Can I attach a deck ledger with deck screws or nails?

No. Use 1/2 in. lag screws or through-bolts in the pattern the code shows, or a structural ledger screw approved for that use. Deck screws and nails are not allowed for ledger attachment.

Do I need a railing on a low deck?

The IRC requires guards where the deck surface is more than 30 in. above grade. Many people add them on lower decks anyway, especially with kids.

Buy the tool that fits the job you actually do, not the biggest number on the box.

How we choose

Matched to the job

We recommend tools by the work you will do with them, from hanging a shelf to framing a shed, not by spec-sheet bragging.

Researched, not sponsored

Picks come from manufacturer specs and manuals, safety guidance and owner reviews. No brand pays for placement.

Honest about the money

Some links earn us a small commission at no cost to you. It never changes what we recommend. Our disclosure