A deck is one of the highest-return home projects you can build, and most of the work is straightforward carpentry. The hard part is getting the quantities and structure right so you don't run short of lumber or fail an inspection. This guide walks through the whole process and links to free tools that size each part for you.
1. Plan the size, layout, and permits
Start by deciding the deck's footprint and height. Most residential decks are built from pressure-treated lumber, composite boards, or hardwood. Before you buy anything, check with your local building department — almost every attached deck, and any deck more than about 30 inches off the ground, requires a permit and must meet code for footings, joist spacing, and railing.
Once you know the dimensions, estimate your materials. Our decking calculator turns your deck size into the exact number of boards, joists, and screws, including a waste allowance so you buy the right amount once.
2. Set the footings and posts
Footings carry the entire load of the deck into the ground. In most regions they must extend below the frost line so they don't heave in winter — commonly 36 to 48 inches deep in cold climates, shallower in warm ones. Concrete footings with post bases are the standard approach.
3. Build the beams and frame
Posts support beams, and beams support the joists. If the deck attaches to your house, it connects with a ledger board bolted securely to the house rim joist and flashed to keep water out — a poorly attached ledger is the most common cause of deck collapses, so this step matters.
4. Install the joists
Joists are the repeating horizontal boards that hold up the decking. They're usually spaced 16 inches on-center for standard decking, or 12 inches for diagonal patterns or thinner composite boards. Figuring out joist count and framing lumber is easy with the decking calculator and our lumber calculator, which also estimates board feet and cost.
5. Lay the decking boards
Deck boards run perpendicular to the joists. Leave a small, consistent gap (about 1/8 inch) between boards for drainage and expansion. Hidden fasteners or deck screws both work — screws are cheaper and faster, hidden clips give a cleaner surface.
| Decking material | Relative cost | Lifespan |
|---|---|---|
| Pressure-treated pine | $ — lowest | 10–15 years |
| Cedar / redwood | $$ | 15–20 years |
| Composite | $$$ | 25–30 years |
| Tropical hardwood | $$$$ | 25–40 years |
6. Add the railing and balusters
Most codes require a railing on any deck more than 30 inches above grade, typically 36 inches tall for homes. The vertical balusters (spindles) must be close enough that a 4-inch sphere cannot pass between them — a critical safety rule. Our baluster calculator works out exactly how many balusters you need and the even spacing between them so you stay code-compliant.
What does it cost to build a deck?
Deck cost depends mostly on size and material. Pressure-treated decks are the cheapest to build; composite and hardwood cost more upfront but last far longer with less maintenance. Because material is the biggest line item, getting an accurate board and joist count is the single best way to control your budget — which is exactly what the calculators above are for.
Try the free calculator
Skip the manual math — get instant numbers for your own project:
Frequently Asked Questions
Do I need a permit to build a deck?
In most areas yes — attached decks and any deck more than about 30 inches off the ground almost always require a permit and inspection. Always check with your local building department before starting.
How far apart should deck joists be?
Deck joists are typically spaced 16 inches on-center for standard decking, or 12 inches for diagonal board patterns and some composite boards. Your decking manufacturer and local code set the exact requirement.
What is the 4-inch rule for deck railings?
Balusters must be spaced so a 4-inch sphere cannot pass between them, which prevents a child from slipping through. A baluster calculator sizes the gaps for you automatically.
What is the cheapest decking material?
Pressure-treated pine is the least expensive decking material to build with, though it needs regular sealing and lasts about 10 to 15 years compared with 25-plus for composite.