How to Build a Deck — Step by Step
A deck fails at its connections — footings, ledger and railings — so build those like they matter, because they do.
A ground-level or low deck is a realistic DIY project; a tall or second-story deck, and any deck with a roof, belongs to a licensed contractor. This guide covers a freestanding or ledger-attached deck up to about 2 feet off the ground. Check your local building code and permit rules before you buy lumber — most US jurisdictions require a permit for decks over 30 inches high or attached to the house, and footing depth is set by your local frost line. As a 2026 planning estimate, DIY materials run roughly $15 to $30 per square foot (Angi / Home Depot 2026 cost guides); a pro build runs roughly $30 to $60 per square foot.
1. Plan, permit and lay out the footings
Size the deck to the furniture, not the yard: a 12 ft by 16 ft deck (192 sq ft) holds a table for six plus a grill with room to walk. Mark the outline with batter boards and string, square it with the 3-4-5 method, and mark footing positions — typically every 6 to 8 feet along the beams, no more than 8 feet apart for 2x8 joists at 16 inches on center. Footings must reach below the local frost line (12 inches in warm climates, 36 to 48 inches in the northern US) and sit on undisturbed soil. Dig 12 inch diameter holes, pour concrete piers, and set post bases in the wet concrete — never bury wood posts directly in concrete, which traps moisture and rots them.
- Call 811 before digging, and confirm the frost depth and permit rules with your local building department.
- Use adjustable post bases so you can level the beams after the concrete cures.
- Wait at least 24 to 48 hours before loading fresh concrete piers.
2. Ledger, beams and joists
If the deck attaches to the house, the ledger board is the most safety-critical connection on the whole project: bolt a pressure-treated 2x8 or 2x10 ledger to the house rim joist with 1/2 inch lag screws or through-bolts every 16 inches, staggered, and flash it properly — metal flashing tucked behind the siding and over the top of the ledger — so water never sits against the house framing. Ledger failures are the leading cause of deck collapses, so if the house framing is uncertain, build freestanding instead. Set beams on the posts, crown side up, then hang joists at 16 inches on center with joist hangers and proper hanger nails (never roofing nails or screws in hangers).
- Flashing is not optional: a ledger without flashing rots the house rim joist from the inside.
- Joist spacing of 16 inches on center suits wood decking; composite boards often need 12 inches — check the manufacturer's span table.
- Crown every joist the same way up, and plane down any joist that sits high before decking.
3. Lay the deck boards
Start at the house and work outward, keeping a consistent gap between boards — 1/8 inch for dry wood, 1/4 inch for wet pressure-treated lumber, which shrinks as it dries. Fasten each board to every joist with two deck screws (or hidden clips for grooved composite), and stagger butt joints so they never line up on the same joist in adjacent rows. Snap a chalk line every few rows to keep the field straight; a deck that drifts 1/2 inch over 16 feet is visible from the yard. Cut the ends flush with a circular saw guided by a straight edge once all boards are down.
- Pre-drill near board ends to stop splitting, especially with hardwood or composite.
- Leave a 1/4 inch gap between the first board and the house for drainage and expansion.
- Sort boards before you start: put the straightest ones where they show most.
4. Railings, stairs and finishing
Any deck more than 30 inches above grade needs a guardrail at least 36 inches high (International Residential Code), with balusters spaced so a 4 inch sphere cannot pass through. Anchor railing posts through the deck frame with bolts and blocking — surface-mounted posts screwed only to the decking will fail a push test. Build stairs with a rise of about 7 inches and a run of about 11 inches, keeping every step within 3/8 inch of the others, and add a handrail on any stair with four or more risers. Finish by sealing pressure-treated lumber after it dries (typically 3 to 6 months) and re-sealing every 2 to 3 years.
- Test every railing post by pushing hard at the top — it should not move.
- Stair stringers need solid bearing at the bottom on a concrete pad or paver, not bare soil.
- Keep the deck's underside clear of stored lumber and leaves; trapped moisture rots joists from below.
Frequently asked questions
How deep do deck footings need to be?
Below the local frost line — 12 inches in warm climates, 36 to 48 inches in the northern US. Your local building department publishes the exact depth; building above the frost line lets winter heave lift the deck.
How far apart should deck joists be?
Sixteen inches on center is standard for wood decking. Many composite boards require 12 inches on center — check the manufacturer's span table before you frame.
Do I need a permit to build a deck?
Usually yes if the deck is attached to the house or more than 30 inches above grade, in most US jurisdictions. Low freestanding decks are often exempt, but the rule varies by town — ask your building department before you dig.
How big a gap should I leave between deck boards?
About 1/8 inch for dry lumber and 1/4 inch for wet pressure-treated lumber, which shrinks as it dries. Composite boards follow the manufacturer's gap, usually 3/16 to 1/4 inch.
Related calculators
- Deck Calculator — Joists, boards and screws for a wood or composite deck.
- Post Hole / Sonotube Calculator — Concrete volume, bag count and water for round post holes and Sonotube footings.
- Concrete Calculator — Cubic yards and bag counts for slabs, patios and pads.
- Board Foot Calculator — Board feet and lumber cost from thickness, width, length and quantity.
Sources & method: International Residential Code (IRC) — guardrail 36 in minimum, baluster spacing under 4 in, stairs rise ~7 in / run ~11 in; ledger flashing and bolted ledger practice (IRC / Fine Homebuilding deck framing guides); footing depth below local frost line (local building codes); 2026 planning cost range $15–$30/sq ft DIY materials, $30–$60/sq ft pro-built (Angi / Home Depot 2026 cost guides).