Constructiondeckconstructiondiy

How to Build a Deck: Complete Materials & Cost Calculator Guide

Published: 7 February 2026
Updated: 12 February 2026
22 min read
How to Build a Deck: Complete Materials & Cost Calculator Guide

Building a deck costs between $15 and $75 per square foot for materials, depending on whether you choose pressure-treated lumber, composite, or cedar. A typical 16x20 deck requires 50-60 deck boards, 20-25 joists, 8-12 posts, and roughly 15 pounds of structural screws and hardware. Getting the material quantities right before you order saves hundreds of dollars in waste and emergency trips to the lumber yard.

Last year I built a 16x24 composite deck for a client in suburban Maryland. The material bill came to $8,200 -- and that was after negotiating a bulk discount on the composite boards. I ordered 15% extra decking and used every single piece, because cuts around the stair landing and the angled corner ate through boards faster than the calculator predicted. That project reinforced what I tell every homeowner: always round up, never down.

Use our Deck Calculator to get precise material quantities and cost estimates for your project before you buy a single board.

Planning Your Deck: Size, Layout & Building Codes

Before you pick up a tape measure, you need to answer three questions: how will you use the deck, where will it attach to the house, and what does your local building code require?

Deck Size Guidelines

Most homeowners build decks between 200 and 500 square feet. The right size depends on how you plan to use the space.

  • Dining area only: 12x12 (144 sq ft) minimum for a table and four chairs
  • Dining + grilling: 12x16 (192 sq ft) for comfortable movement around a grill station
  • Entertaining space: 16x20 (320 sq ft) accommodates seating groups, a dining area, and foot traffic
  • Full outdoor living: 16x24 (384 sq ft) or larger for multiple zones, planters, and furniture groupings

Tip

Sketch your furniture layout on graph paper first. A deck that looks generous on a blueprint can feel cramped once you add a 6-person dining set, a grill, and lounge chairs. Allow 3 feet of clearance around furniture for walkways.

Building Permits and Codes

Almost every jurisdiction in the United States requires a building permit for a new deck. According to the International Residential Code (IRC), decks must meet structural requirements for live loads (40 psf), dead loads (10 psf), and lateral bracing.

Common code requirements include:

  • Guardrails required when the deck surface is 30 inches or more above grade
  • Guardrail height of at least 36 inches (42 inches in some jurisdictions)
  • Baluster spacing no more than 4 inches apart (a 4-inch sphere must not pass through)
  • Ledger board attachment to the house with lag bolts or through-bolts, not nails
  • Footing depth below the local frost line (varies by region -- 12 inches in the South, 48+ inches in northern states)

Warning

Building without a permit can result in fines, forced demolition, or problems when you sell your home. I have seen homeowners forced to tear down $15,000 decks because they skipped the $150 permit. Always check with your local building department before starting.

Ledger Board vs. Freestanding

A ledger board bolts directly to the house rim joist and is the most common attachment method. Freestanding decks use an additional beam and posts instead of a ledger and are required in some jurisdictions for manufactured homes. Freestanding designs also work well for detached pool decks or garden platforms.

Deck Material Comparison: Pressure-Treated vs Composite vs Cedar

Choosing the right decking material is the single biggest decision affecting your budget, maintenance schedule, and deck lifespan. Here is a side-by-side comparison of the four most common options.

FeaturePressure-Treated (PT) LumberCompositeWestern Red CedarPVC / Cellular PVC
Cost per sq ft (material)$2 - $5$6 - $12$5 - $9$8 - $14
Installed cost per sq ft$15 - $25$30 - $60$25 - $40$35 - $75
Lifespan15 - 20 years25 - 50 years15 - 25 years30 - 50 years
MaintenanceStain/seal every 2-3 yearsOccasional cleaningStain/seal every 1-2 yearsOccasional cleaning
AppearanceNatural wood, weathers to grayWood-grain or smooth, many colorsRich warm tones, weathers to grayUniform, many colors
Splinter riskYesNoMinimalNo
Best forBudget builds, DIY projectsLow-maintenance family decksHigh-end natural lookCoastal or high-moisture areas

Pressure-Treated Lumber

Pressure-treated pine is the most affordable decking material and the easiest to work with for DIYers. The lumber is infused with preservatives (typically micronized copper azole, or MCA) that resist rot and insect damage. The downside is ongoing maintenance: PT lumber needs staining or sealing every two to three years to prevent cracking, warping, and a weathered gray appearance.

Composite Decking

Composite boards are made from a blend of wood fibers and plastic polymers, with a protective cap layer on premium brands. According to the North American Deck and Railing Association (NADRA), composite decking has grown to represent over 40% of the residential decking market due to its low maintenance and long warranty periods.

Brands like Trex, TimberTech, and Fiberon offer 25- to 50-year warranties. Composite costs more upfront but eliminates annual staining costs, which can total $1,500-$3,000 over a decade for a standard-sized deck.

Info

Composite decking gets hot in direct sun. If your deck faces south with no shade, consider lighter colors or capped composite with heat-reflective technology. Surface temperatures can reach 30-40 degrees above ambient air temperature on dark composite boards.

Cedar and Redwood

Western red cedar offers a beautiful natural look and inherent resistance to rot and insects. It costs more than PT lumber but less than composite. Cedar requires regular sealing (every one to two years) to maintain its color, but many homeowners prefer the natural silver patina it develops if left untreated.

PVC Decking

PVC (polyvinyl chloride) decking contains no wood fibers and offers the highest moisture resistance. It is the best choice for docks, pool surrounds, and coastal applications where salt spray is a concern. PVC is the most expensive option and can feel less natural underfoot than composite.

How to Calculate Deck Materials

Accurate material takeoffs prevent expensive mistakes. Here is how to calculate every structural component your deck needs. You can also use our Deck Calculator to automate these calculations.

Deck Boards

Formula: Total deck boards = (Deck area in square feet / Board coverage) x (1 + waste factor)

Standard deck boards are 5.5 inches wide (actual width of a nominal 6-inch board). For a deck measured in feet:

  • Number of boards (lengthwise): Deck width (in inches) / 5.75 (board width + 0.25-inch gap) = number of rows
  • Board length: Match to deck depth, or plan for a butt joint if deck depth exceeds available board lengths

For a 16x20 deck using 16-foot boards:

  • 20 feet = 240 inches / 5.75 = 42 rows of boards
  • Each row needs one 16-foot board, so 42 boards
  • Add 10-15% waste: 42 x 1.15 = approximately 49 boards

Tip

Order boards 10% longer than your measurement when possible. This lets you trim to exact length on site rather than dealing with boards that are a quarter inch too short. On my Maryland project, buying 20-foot composite boards instead of 16-foot ones reduced butt joints from 12 to zero.

Joists

Joists are the horizontal framing members that support the deck boards. They typically run perpendicular to the deck boards.

Joist Spacing (OC)When to UseMax Span (2x8 SPF)Max Span (2x10 SPF)Boards per 16 ft of Deck Width
12 inchesDiagonal decking, heavy loads, composite at 45 degrees10 ft 6 in13 ft 3 in17 joists
16 inchesStandard residential decks, most composite boards13 ft 3 in16 ft 7 in13 joists
24 inchesLight-use decks, PT lumber decking only15 ft 0 in (2x10)19 ft 6 in (2x12)9 joists

Formula: Number of joists = (Deck length in inches / Joist spacing) + 1

For a 20-foot span at 16 inches on center: (240 / 16) + 1 = 16 joists

Span values above are based on American Wood Council (AWC) span tables for No. 2 grade Spruce-Pine-Fir. Always verify spans against your local code and the specific lumber species and grade you are using.

Posts and Footings

Deck posts (typically 4x4 or 6x6) transfer the deck load to the footings. Post spacing depends on beam size and the load the deck must carry.

  • Typical post spacing: 6 to 8 feet on center along each beam line
  • Post size: 4x4 for decks under 6 feet tall; 6x6 for taller decks or heavy loads
  • Footing diameter: 12 inches for light decks; 16-24 inches for heavy loads or soft soil

Formula: Number of posts per beam = (Beam length / Post spacing) + 1

For a 20-foot beam with posts every 8 feet: (20 / 8) + 1 = 3.5, rounded up to 4 posts.

Beams

Beams run perpendicular to joists and sit on top of the posts. Common beam sizes:

  • Double 2x8: Supports joists spanning up to 8 feet, with posts spaced up to 6 feet apart
  • Double 2x10: Supports joists spanning up to 10 feet, with posts spaced up to 8 feet apart
  • Double 2x12: Supports joists spanning up to 12 feet, with posts spaced up to 8 feet apart

The number of beams depends on the joist span. If your joists can span the full deck depth on a single beam plus the ledger, you need one beam. Deeper decks may require two parallel beams.

Hardware and Fasteners

Do not underestimate the hardware budget. A typical deck requires:

  • Joist hangers: One per joist (both ends if not using a ledger)
  • Post bases: One per post
  • Lag bolts or carriage bolts: For ledger attachment (every 16-24 inches)
  • Structural screws: 5-10 pounds for a 300 sq ft deck
  • Deck screws or hidden fasteners: Approximately 350 screws per 100 square feet of decking (face-screwed) or one clip per board gap (hidden fasteners)

Important

Use stainless steel or coated fasteners with treated lumber. Regular galvanized screws react with the copper in pressure-treated wood and corrode within a few years. ACQ-rated screws or stainless steel are code-required with modern treated lumber.

Building Deck Stairs: Steps, Stringers & Rails

Stairs are the most technically demanding part of a deck build. Getting the rise and run right is critical for safety and code compliance.

Rise and Run Basics

The IRC requires:

  • Maximum riser height: 7 3/4 inches (7.75 in)
  • Minimum tread depth: 10 inches
  • Uniform risers: All risers must be within 3/8 inch of each other
Total Height (in)Number of RisersRiser Height (in)Tread Depth (in)Total Run (in)
2446.001133
3657.2010.542
4876.8610.563
6087.5010.573.5
72107.2010.594.5

Use our Stairs Calculator to compute exact rise, run, and stringer dimensions for your deck height.

Stringer Sizing and Count

Stringers are the angled boards that support the treads. They are typically cut from 2x12 lumber.

  • Minimum stringer count: 3 for stairs up to 36 inches wide
  • Add one stringer for every additional 16 inches of stair width
  • Maximum stringer spacing: 16 inches on center for 5/4 treads; 12 inches for heavy-traffic stairs

For a 48-inch-wide staircase: (48 / 16) + 1 = 4 stringers

Our Stair Stringer Calculator computes the exact angle, cut dimensions, and lumber requirements for your stringers.

Stair Rails

Stair rails are required when there are four or more risers. The rail must be between 34 and 38 inches high, measured vertically from the stair nosing. Balusters must be spaced so that a 4-inch sphere cannot pass through, the same requirement as deck guardrails.

Lumber Board Feet Calculator

When buying framing lumber (joists, beams, posts, stringers), lumber yards often price by the board foot rather than by the linear foot. Understanding board feet helps you compare prices and estimate costs accurately.

What is a Board Foot?

A board foot is a volume measurement equal to a piece of lumber 1 inch thick, 12 inches wide, and 12 inches long (144 cubic inches).

Formula: Board feet = (Thickness in inches x Width in inches x Length in feet) / 12

Examples:

  • 2x6, 12 feet long: (2 x 6 x 12) / 12 = 12 board feet
  • 2x10, 16 feet long: (2 x 10 x 16) / 12 = 26.67 board feet
  • 4x4, 10 feet long: (4 x 4 x 10) / 12 = 13.33 board feet

Use our Lumber Calculator to convert between board feet, linear feet, and total cost for any lumber dimension.

Board Feet for Common Deck Framing

For a 16x20 deck framed with 2x10 joists at 16 inches OC, the framing lumber breaks down as follows:

  • 16 joists at 16 feet long (2x10): 16 x 26.67 = 427 board feet
  • 2 rim joists at 20 feet long (2x10): 2 x 33.33 = 67 board feet
  • Double beam, 20 feet long (2x10): 2 x 33.33 = 67 board feet
  • 4 posts at 4 feet long (6x6): 4 x 12 = 48 board feet
  • Total framing: Approximately 609 board feet

At $0.80-$1.20 per board foot for No. 2 grade SPF, the framing lumber alone runs $490-$730.

Deck Cost Breakdown by Size

Here are realistic material cost ranges for 2026, broken down by deck size and material type. These are material costs only and do not include labor, permits, or site preparation.

Deck SizeSquare FeetPT LumberComposite (Mid-Range)Western Red CedarPVC (Premium)
10x12120$1,200 - $1,800$2,400 - $3,600$1,800 - $2,700$3,000 - $4,200
12x16192$1,900 - $2,900$3,800 - $5,800$2,900 - $4,300$4,800 - $6,700
16x20320$3,200 - $4,800$6,400 - $9,600$4,800 - $7,200$8,000 - $11,200
16x24384$3,800 - $5,800$7,700 - $11,500$5,800 - $8,600$9,600 - $13,400
20x24480$4,800 - $7,200$9,600 - $14,400$7,200 - $10,800$12,000 - $16,800

These estimates include decking, framing, hardware, and fasteners. Stairs, railings, and permits add 20-40% to the total, depending on deck height and railing style.

Info

Labor typically doubles the material cost. A $6,000 materials bill for a PT lumber deck usually translates to a $12,000-$15,000 installed price from a contractor. DIY installation saves 40-60% of the total project cost, but plan on 3-6 weekends for a first-time builder.

How Material Prices Fluctuate

Lumber prices are volatile. In 2021, framing lumber spiked to over $1,600 per thousand board feet before dropping back to $400-$500 by mid-2022. As of early 2026, prices have stabilized in the $450-$550 range for framing lumber. Composite decking prices are more stable because they are manufactured products, but they typically increase 3-5% annually.

Best time to buy: Late fall and winter (October through February) when demand drops. Lumber yards often run clearance sales on decking materials at the end of summer.

Common Deck Building Mistakes

After overseeing hundreds of deck projects, here are the mistakes I see most often -- and how to avoid them.

1. Skipping the Permit

As mentioned earlier, unpermitted decks create legal and financial problems. The permit process also catches structural errors before they become safety hazards. Many jurisdictions now require inspection at the footing, framing, and final stages.

2. Undersized Footings

Footings that are too small or too shallow will settle over time, causing the deck to sag or pull away from the house. Dig below the frost line and size footings to your local soil bearing capacity. In clay soils, you may need 18-24 inch diameter footings even for a modest deck.

3. Improper Ledger Attachment

The ledger board is the most critical connection on an attached deck. It must be bolted (not nailed) through the house rim joist with 1/2-inch lag bolts or carriage bolts, with flashing to prevent water intrusion behind the siding. According to the American Wood Council, improper ledger connections are the leading cause of deck collapses.

Warning

Never attach a ledger to brick veneer, stucco over foam, or cantilevered floor systems without engineering. These surfaces cannot support the weight of a deck. A structural engineer can design an alternative connection or recommend a freestanding design.

4. No Flashing Behind the Ledger

Water intrusion behind the ledger causes rot in the house rim joist, which can lead to catastrophic failure. Install self-adhesive flashing membrane behind and over the ledger, tucking it under the house siding. Metal Z-flashing over the top of the ledger directs water away from the connection.

5. Not Accounting for Board Shrinkage

Pressure-treated lumber is sold "wet" -- it has a high moisture content from the treatment process. A 2x10 that is 9.25 inches wide when you buy it may shrink to 9 inches or less as it dries. Account for this in your joist spacing and deck board gap calculations.

6. Ordering Exact Quantities

Always add 10-15% to your decking order and 5-10% to your framing order. Boards arrive with defects, cuts produce waste, and you will inevitably discover a measurement error. Running out of material mid-project means delays and potentially mismatched lot colors for composite or stained lumber.

How to Use Our Deck Calculator

Our Deck Calculator simplifies the entire estimating process. Here is how to get the most out of it:

Step 1: Enter your deck dimensions (length and width in feet). If your deck has an irregular shape, break it into rectangular sections and calculate each one separately.

Step 2: Select your decking material (pressure-treated, composite, cedar, or PVC). The calculator adjusts pricing and board dimensions accordingly.

Step 3: Choose your joist spacing (12, 16, or 24 inches on center). When in doubt, use 16 inches -- it is code-compliant for nearly all residential applications.

Step 4: Enter stair parameters if your deck has stairs: total rise (deck height above grade), stair width, and tread material.

Step 5: Review the material list, which includes deck boards, joists, beams, posts, hardware, and estimated cost. Adjust quantities by your preferred waste factor.

For framing lumber calculations, pair the Deck Calculator with our Lumber Calculator to convert board feet to cost and compare lumber yard pricing. If your deck includes a roof or pergola, our Rafter Calculator can help you size the overhead framing -- and our roofing materials guide covers shingle and metal panel estimation for covered structures. Planning a fence around the same yard? Our fence cost calculator guide walks through post spacing, material comparison, and total cost estimation.

Tip

Save or print your calculator results before visiting the lumber yard. Having an organized material list speeds up the ordering process and ensures you do not forget small items like joist hangers, post bases, and flashing.

Frequently Asked Questions

How much does it cost to build a deck per square foot?

Material costs range from $2-$5 per square foot for pressure-treated lumber to $8-$14 per square foot for PVC decking. Installed costs (materials plus labor) range from $15-$25 per square foot for PT lumber to $35-$75 per square foot for premium PVC. The total depends on material choice, deck height, railing style, and regional labor rates. Use our Deck Calculator to estimate your specific project.

Do I need a permit to build a deck?

In most jurisdictions, yes. Any attached deck or any deck more than 30 inches above grade almost universally requires a permit. Even low-to-grade platform decks may require a permit depending on your local code. Permits typically cost $100-$500 and require a site plan showing dimensions, footing locations, and structural details. Check with your local building department before starting work.

What is the best decking material for a DIY build?

Pressure-treated lumber is the most forgiving material for DIY builders. It cuts easily with standard tools, accepts screws without pre-drilling, and costs significantly less than alternatives. Composite decking is also DIY-friendly but requires hidden fastener systems and special blade types for cutting. Cedar is easy to work with but more expensive and less forgiving of fastener mistakes because it splits more easily.

How long does it take to build a deck?

For a first-time DIY builder working weekends, plan on 4-6 weekends for a simple 12x16 deck, or 6-10 weekends for a larger 16x24 deck with stairs. Professional crews typically complete a similar project in 3-5 working days. Factors that extend the timeline include concrete footing cure time (24-48 hours minimum), permit inspection wait times, and weather delays.

What joist spacing should I use?

The standard is 16 inches on center, which works for virtually all residential decking materials. Use 12-inch spacing if you are installing composite decking at a 45-degree diagonal pattern, if the deck will support a hot tub, or if your local code requires it for the span. Use 24-inch spacing only for pressure-treated lumber decking in low-traffic applications. Always check the decking manufacturer's installation guide for their specific joist spacing requirements.

Is composite decking worth the extra cost?

Over 20 years, composite often costs less than pressure-treated lumber when you factor in maintenance. A 320 sq ft PT deck needs staining every 2-3 years at $300-$500 per application, totaling $2,000-$5,000 in maintenance over 20 years. Composite requires only periodic cleaning with soap and water. The break-even point is typically 8-12 years, after which composite becomes the more economical choice. Composite also adds more to home resale value than PT lumber according to most real estate appraisers.

At what height does a deck need a railing?

The IRC requires guardrails on any deck surface 30 inches or more above the adjacent grade. Some local jurisdictions set this threshold lower, at 24 inches. Guardrails must be at least 36 inches tall (42 inches in some states and for commercial applications). Even if your deck is below the threshold, adding a railing at seating height (18-20 inches) can serve as an attractive bench or planter border.

Can I build a deck directly on the ground?

Yes, ground-level or "floating" decks are a popular option for patios and garden platforms. They typically use concrete deck blocks instead of traditional footings and do not require a ledger attachment. However, they still benefit from proper framing. Keep the deck surface at least 2-4 inches above the ground to allow air circulation, and use ground-contact rated lumber (or composite) for any material within 6 inches of the soil. Ground-level decks may still require a permit depending on your jurisdiction -- check with your local building department.

How do I estimate how many screws I need for a deck?

For face-screwed decking, plan on approximately 350 deck screws per 100 square feet of decking (based on two screws per board at each joist, with 16-inch joist spacing). A 320 sq ft deck needs roughly 1,120 deck screws, which is about 7-8 pounds of #10 x 3-inch screws. For hidden fastener systems (common with composite), you need one clip per board gap per joist, which works out to a similar count. Add 20-30 structural screws for joist-to-beam connections and miscellaneous framing connections.

  • Deck Calculator — Calculate deck boards, joists, posts, beams, and total material costs for any deck size
  • Stairs Calculator — Compute rise, run, and number of steps for any total height
  • Stair Stringer Calculator — Get exact stringer cut dimensions, angles, and lumber requirements
  • Lumber Calculator — Convert board feet, linear feet, and pricing for any lumber dimension
  • Rafter Calculator — Size rafters for pergolas, deck roofs, and covered porches

Conclusion

Building a deck is one of the best investments you can make in outdoor living space. Whether you choose budget-friendly pressure-treated lumber or low-maintenance composite, the key to a successful project is accurate material planning. Measure twice, calculate carefully, add your waste factor, and order before prices fluctuate.

Start with our Deck Calculator to generate your complete material list, then use the stair and lumber calculators to dial in the details. The time you spend planning up front saves real money at the lumber yard.


This article provides general information for educational purposes. Always consult local building codes and a licensed contractor or structural engineer for projects requiring permits or structural design. Material prices vary by region and market conditions.

Share this article:

This article is provided for informational and educational purposes only. Content should not be considered professional financial, medical, legal, or other advice. Always consult a qualified professional before making important decisions. UseCalcPro is not responsible for any actions taken based on the information in this article.

Related Articles