Freshly built pressure-treated wood deck attached to a suburban home with natural light

Deck Calculator

This deck calculator turns two measurements, your deck length and width, into a shopping list: how many deck boards to buy with 10% waste built in, how many joists you need at 16 or 12 inches on center, and how many deck screws it takes to fasten everything down. Measure the finished deck surface in feet, pick your board width and gap, and the totals above update instantly.

Quick steps: use the deck calculator

  1. Measure the finished deck surface in feet, not the framing, and round each side up to the next half foot.
  2. Enter the side the boards will run along as Deck length (along the boards) and the other side as Deck width (along the joists).
  3. Set Board width (in) to the actual face width: 5.5 for a 5/4×6 or 2×6, 3.5 for a 2×4.
  4. Set Gap between boards (in) to 0.125 for wood or whatever your composite maker specifies, usually 0.1875 or 0.25.
  5. Choose the Board length you can buy that matches your deck length, or pick a shorter one if you plan to butt boards end to end.
  6. Choose Joist spacing: 16 in on center for wood decking, 12 in on center for most composite or diagonal layouts.

How to measure and enter deck dimensions into a deck calculator in four steps

How to use the deck calculator

Every field in the calculator maps to something you can measure with a tape or read off a lumber tag. Get these six numbers right and the output is a real order, not a guess.

Deck length (along the boards) (ft)

This is the dimension the decking runs parallel to. On most attached decks the boards run parallel to the house, so the length is the side along the wall. Measure the finished surface, including any overhang past the rim joist. Most builders let the boards hang 3/4 to 1 inch past the rim, so a deck framed at 15 ft 10 in finishes close to 16 ft. The default is 16 because 16 ft is the most common stock length for both pressure-treated and composite decking.

Deck width (along the joists) (ft)

This is the dimension the joists run along, from the house out to the far rim. It is the direction you count boards across. Again, measure the finished surface. If you are picture framing the deck with a border board, the field boards run shorter but the border adds back the same coverage, so entering the full outside dimension still gives you the right linear footage.

Board width (in)

Enter the actual face width, not the nominal size. A “6 inch” deck board, whether it is 5/4×6 pressure-treated, a 2×6, or a standard composite board like Trex, measures 5.5 inches across. A 2×4 measures 3.5 inches. Some premium composites and PVC boards run 5.25 inches or 5.375 inches, so check the tag. Entering 6 instead of 5.5 undercounts a 12-ft-wide deck by two full rows.

Gap between boards (in)

The default 0.125 (1/8 inch) is the standard spacing for kiln-dried wood. Wet pressure-treated lumber is often installed tight because it shrinks a 1/8 to 3/16 inch gap on its own over the first summer, but entering 0.125 still gives the right count since the boards start at 5.5 inches either way. Composite is different. Trex calls for a 1/4 inch gap between boards on most of its lines and a 3/16 inch side gap on others, and that quarter inch is enough to drop a row on a wide deck, so enter the exact figure from the installation sheet.

Board length

Pick the length you will buy: 12 ft, 16 ft or 20 ft. If your deck is 16 ft long, buy 16 ft boards and you have no butt joints. If your deck is 24 ft long and 20-footers are not available locally, choose 12 ft boards and plan to stagger two per row, with every end joint landing on the center of a joist. The calculator converts your linear footage into whole boards of the length you chose.

Joist spacing

16 in on center is standard for 5/4 and 2x wood decking run perpendicular to the joists. 12 in on center is required by most composite manufacturers for commercial loads or for boards run at a 45 degree angle, and many homeowners use it for a stiffer floor under composite in general. The spacing changes your joist count and your screw count, not your decking count.

Measuring mistakes that throw off the count

Measuring the framing plan instead of the finished surface is the most common one. The 3/4 inch overhang on three sides adds up. The second is swapping length and width. Boards run along the length in this calculator, so if you enter them backwards on a 20 x 12 deck you will be told you need 12-footers and 16 joists when you really need 20-footers and 10 joists. The third is forgetting stairs, landings and a bump-out. Run each of those as a separate rectangle and add the totals.

Deck board calculator math, written out

The calculator runs five calculations in order. Here is each one and why it is built that way.

Rows of boards = Deck width x 12 / (Board width + Gap), rounded up. Converting width to inches and dividing by the space one board occupies tells you how many boards fit across. It always rounds up because a partial row still needs a full board, which you rip to width on the last course.

Linear feet = Rows x Deck length. Every row is one board run the full length of the deck, so rows times length is total linear footage of decking.

Boards = Linear feet / Board length x 1.10. Dividing by the stock length gives the raw board count, then 10% is added for end trim, cull boards with cupping or wane, and mistakes. The result rounds up to a whole board.

Joists = Deck length x 12 / Joist spacing + 1, each as long as the deck width. Joists sit perpendicular to the decking at the spacing you chose. The plus one accounts for the joist at the very end of the run, because 16 ft of layout at 16 inches gives 12 spaces but 13 joists. On a deck length that is not an even multiple of the spacing, round up.

Screws = Rows x Joists x 2. Standard face fastening uses two screws at every point a board crosses a joist. Rows times joists is the number of crossings.

The calculator does not count rim joists, ledger, beams, posts, blocking, joist hangers or railing. Those are covered in the ordering section below.

Worked example: the default 16 x 12 deck

Default inputs: 16 ft long, 12 ft wide, 5.5 inch boards, 0.125 inch gap, 16 ft boards, 16 in on center.

  1. Deck area: 16 x 12 = 192 sq ft.
  2. Rows: 12 x 12 = 144 inches across. 5.5 + 0.125 = 5.625 inches per board. 144 / 5.625 = 25.6, rounded up to 26 rows.
  3. Linear feet: 26 x 16 = 416 linear feet of decking.
  4. Boards: 416 / 16 = 26 boards. 26 x 1.10 = 28.6, rounded up to 29 boards of 16 ft decking.
  5. Joists: 16 x 12 = 192 inches. 192 / 16 = 12. 12 + 1 = 13 joists, each 12 ft long.
  6. Screws: 26 x 13 x 2 = 676 deck screws.

That matches the calculator output exactly: 29 boards, 192 sq ft, 26 rows, 416 linear feet, 13 joists at 12 ft, 676 screws.

Second worked example: a 20 x 14 composite deck at 12 in on center

Say you are building a 20 ft by 14 ft Trex deck. Trex specs a 3/16 inch side gap on this line, you can buy 20 ft boards, and you want the stiffer 12 inch joist layout.

Inputs: Deck length 20, Deck width 14, Board width 5.5, Gap 0.1875, Board length 20 ft, Joist spacing 12 in on center.

  1. Area: 20 x 14 = 280 sq ft.
  2. Rows: 14 x 12 = 168 inches. 5.5 + 0.1875 = 5.6875 inches per board. 168 / 5.6875 = 29.54, rounded up to 30 rows.
  3. Linear feet: 30 x 20 = 600 linear feet.
  4. Boards: 600 / 20 = 30 boards. 30 x 1.10 = 33 boards of 20 ft Trex.
  5. Joists: 20 x 12 = 240 inches. 240 / 12 = 20. 20 + 1 = 21 joists, each 14 ft long.
  6. Screws: 30 x 21 x 2 = 1,260 screws.

Notice that going from 16 to 12 inch spacing on a 20 ft deck adds five joists and nearly doubles the fastener count compared with a wood deck of similar size. If you use hidden clips instead of face screws, you need roughly one clip per crossing, so 30 x 21 = 630 clips, plus starter clips along the first row.

Pro tip

Before you order, divide your deck width in inches by 5.625 and look at the decimal. The 16 x 12 default lands on 25.6, which means the last board gets ripped to about 3 inches. Shrink the deck width by 3 inches, or widen the gap slightly across all rows, and you finish with a full board on the outside edge and no skinny rip.

Quick-reference deck estimator for common sizes

All rows use 5.5 inch boards, a 1/8 inch gap and 16 in on center joists, computed with the formula above. Board length matches deck length where possible; the 24 ft deck uses two 12 ft boards per row with staggered joints.

Deck size (L x W) Area Rows Linear ft Boards (+10%) Joists Screws
12 x 10 120 sq ft 22 264 25 x 12 ft 10 x 10 ft 440
12 x 12 144 sq ft 26 312 29 x 12 ft 10 x 12 ft 520
16 x 12 192 sq ft 26 416 29 x 16 ft 13 x 12 ft 676
16 x 16 256 sq ft 35 560 39 x 16 ft 13 x 16 ft 910
20 x 12 240 sq ft 26 520 29 x 20 ft 16 x 12 ft 832
20 x 16 320 sq ft 35 700 39 x 20 ft 16 x 16 ft 1,120
24 x 14 336 sq ft 30 720 66 x 12 ft 19 x 14 ft 1,140

A quick rule of thumb falls out of the table: with 5.5 inch boards and a 1/8 inch gap, you need about 2.13 linear feet of decking per square foot of deck, or 2.35 linear feet once the 10% waste is added. A 300 sq ft deck therefore needs about 700 linear feet of decking delivered.

Decking calculator for L-shapes, angles and borders

The calculator handles one rectangle at a time. For anything else, break the deck into rectangles and add the results.

L-shaped and T-shaped decks. Split the shape along the line where the board direction or joist direction changes. A 24 x 12 main deck with an 8 x 8 bump-out is two calculator runs: 24 x 12 and 8 x 8. Add boards, joists and screws. If the boards on the bump-out run the same direction as the main deck, you can also treat the whole thing as a 24 x 20 rectangle and subtract the missing corner’s share, but two separate runs is less error-prone. For odd outlines, our “square footage calculator” helps you get the total area right before you divide it up.

Diagonal (45 degree) decking. Enter the deck dimensions as normal, then increase the result by another 15%, because each board end is cut at an angle and the offcuts rarely reuse well. Switch Joist spacing to 12 in on center; diagonal boards span farther between joists and most codes and manufacturers require the tighter layout.

Picture frame borders. Run the calculator on the full outside dimensions for the field boards, then add one extra board for each border side, bought in the length of that side. A single border on the default 16 x 12 deck adds two 16-footers and two 12-footers, plus a double rim joist or blocking under the border to catch the field board ends.

Herringbone and inlays. Run each section as its own rectangle and add 20% to those sections. Every board in a herringbone gets two angled cuts.

Deck stair calculator: risers, treads and stringers

Stairs are the piece the main calculator skips, and they are where most DIY decks fail inspection. Here is how to size them.

Count the risers. Measure total rise from the finished deck surface straight down to where the stairs will land, in inches. Divide by 7.5 and round to the nearest whole number; that is your riser count. Divide total rise by that count for the exact riser height. A 44 inch rise gives 44 / 7.5 = 5.87, so 6 risers at 7.33 inches each. The IRC caps risers at 7-3/4 inches and allows no more than 3/8 inch variation between the tallest and shortest, so measure the landing slab, not the dirt.

Count the treads. Treads equal risers minus one when the deck surface acts as the top tread, which is typical. Tread depth must be at least 10 inches. Two 5/4×6 boards with a 1/8 inch gap give 11-1/8 inches, which is the standard deck tread, with a 3/4 to 1 inch nosing past the riser.

Total run. Treads times tread depth. Five treads at 11 inches is 55 inches of run, which tells you where the landing pad goes and how big to pour it. Size that pad with a “concrete calculator“; a 4 inch slab 4 ft wide by 3 ft deep takes about a third of a cubic yard, or nine 80 lb bags.

Stringers. Use 2×12 stock, never 2×10, and keep at least 5 inches of uncut wood behind the notches. Space stringers 16 inches on center for wood treads and 12 inches on center for composite. A 36 inch wide stair needs three stringers for wood and four for composite. Stringer length is roughly the hypotenuse of rise and run; for 44 inch rise and 55 inch run that is about 70 inches, so a 7 ft 2×12 trimmed to length, but buy 8-footers so you can cut the bottom level for the slab.

Stair materials for a typical 36 inch wide, 6 riser stair: three or four 2x12x8 stringers, ten 5/4×6 tread boards cut from five 8-footers (two treads per 8 ft board at 36 inches plus trim), six riser boards from 1×8 or decking, a stringer hanger or 2x ledger at the top, and a 2×4 or 2×6 kicker bolted to the slab.

Safety first

Stairs with uneven risers, stringers notched too deep or no graspable handrail cause real falls. Any deck surface more than 30 inches above grade requires a 36 inch guardrail with balusters spaced so a 4 inch sphere cannot pass, and stairs with four or more risers need a handrail 34 to 38 inches above the nosings. Pull a permit; nearly every US jurisdiction requires one for a deck.

Buying and ordering deck materials

Units suppliers use

Lumber yards sell decking by the piece in stock lengths of 8, 10, 12, 16 and 20 ft, and quote price per linear foot or per board. Composite comes in 12, 16 and 20 ft lengths from most brands, and Trex also sells 12 ft grooved-edge boards for hidden fasteners. Framing lumber is sold by the piece in 2 ft increments. Screws come in 1 lb and 5 lb boxes or by the count in bulk; a 5 lb box of 2-1/2 inch #9 coated deck screws holds roughly 350 screws, so the default deck’s 676 screws is two 5 lb boxes with spare. Hidden fastener clips are sold in boxes sized by square footage, typically 50 or 90 sq ft per box for Trex Hideaway.

What the calculator leaves out

Add these to your list, sized to your deck:

  • Ledger: one 2×8 or 2×10 the length of the deck, flashed and lagged or through-bolted to the house rim.
  • Rim joists: two the length of the deck (one is the ledger on an attached deck, so one for the outer rim) plus end joists already in the joist count.
  • Beam: doubled or tripled 2×10 or 2×12 the length of the deck, sized to post spacing by the span tables in IRC R507.
  • Posts: 6×6 pressure-treated, one every 6 to 8 ft along the beam. The default 16 ft deck takes three posts on one beam.
  • Footings: one per post, dug below frost line, which runs from 12 inches in the Deep South to 48 inches or more in the upper Midwest. A 12 inch diameter tube form 42 inches deep holds about 0.12 cubic yards, or roughly five 80 lb bags of mix.
  • Joist hangers: one per joist at the ledger (13 for the default deck), plus hangers at the beam if the joists frame flush rather than resting on top.
  • Blocking: one row of mid-span blocking cut from joist stock, roughly one extra joist’s worth of lumber.
  • Drainage bed: landscape fabric and 2 to 3 inches of crushed stone under the deck to stop weeds and splash; a “gravel calculator” sizes that from the same length and width.

How much extra to order and why

The 10% waste factor on decking is the floor, not a target. Bump it to 15% for diagonal layouts, 15 to 20% if you are cutting around posts, hot tubs or a tree, and 5% on a simple rectangle where every board runs full length and you are willing to pick through the stack. Order framing lumber at exactly the count plus two sticks, because joists get crowned, culled and re-cut. Order screws at 10% over the calculator figure; stripped heads and dropped screws add up. Composite boards from different production lots can vary slightly in color, so order the full decking quantity in one shipment rather than topping up later.

Realistic US prices

Prices move with the lumber market and your region, so treat these as early 2025 ranges for planning, and confirm with your yard.

  • Pressure-treated 5/4×6 decking: about $1 to $2 per linear foot, so $420 to $830 for the default deck’s 29 boards (464 linear feet).
  • Cedar 5/4×6: about $3 to $5 per linear foot, often special order outside the West.
  • Trex Enhance Basics: roughly $2 to $3 per linear foot, about $900 to $1,400 for the default deck’s decking alone.
  • Trex Transcend and other premium capped composites: roughly $5 to $7 per linear foot, so $2,300 to $3,300 for the same 464 linear feet.
  • Pressure-treated 2x8x12 joists: about $12 to $18 each, so $160 to $230 for 13.
  • Coated deck screws: $10 to $15 per 1 lb box, $35 to $50 per 5 lb box.
  • Composite hidden fasteners: $0.40 to $0.60 per clip when bought by the box.

A full materials bill for the default 16 x 12 pressure-treated deck, including framing, footings, hardware and a basic railing, typically lands between $2,500 and $4,500. The same deck in Trex Transcend with matching composite railing runs $6,000 to $10,000 in materials. Hired out, a professional deck build in most of the US runs $30 to $60 per square foot for pressure-treated and $45 to $85 per square foot for composite, which puts the default deck at $5,800 to $16,000 installed depending on material and market.

Pro tip

Ask your lumber yard for a delivered quote on the complete list, then ask the big box store to match it. Yards often beat the box stores on framing lumber and will cull the bad boards for you, and most waive the delivery fee above a $500 to $1,000 order. Have them drop the stack where you can tarp it, and sticker it with 2×4 spacers so the pressure-treated boards dry evenly before you install.

Common mistakes that cause running short or over-buying

Right vs wrong ways to measure deck dimensions for a deck calculator

Using nominal widths. Entering 6 for a 5.5 inch board on a 16 ft wide deck gives 32 rows instead of 35. You would be three boards short before waste.

Ignoring the composite gap. A 1/4 inch gap instead of 1/8 on a 16 ft wide deck changes the row count from 35 to 34. Not catastrophic, but it tells you the gap matters, and on wood it goes the other way: if you install wet treated boards tight, you still need the 5.625 inch count because you cannot shrink the boards on day one.

Forgetting butt joints land on joists. When your deck is longer than your boards, each row needs two boards and the joint must sit on a joist center. With 12 ft boards on a 20 ft deck, a 12 and an 8 fill one row, and the 8 ft offcut from the next 12-footer fills the row after that. The 10% waste assumes you plan this stagger. Random cuts can push waste to 20%.

Counting joists without the plus one. 16 ft at 16 inches on center is 13 joists, not 12. Miss it and your last bay is 32 inches wide.

Buying 16-footers for a 16 ft 2 in deck. Measure the finished dimension. If the frame plus overhang comes to 16 ft 2 in, you need 20 ft boards or you need to pull the deck in 2 inches. Deciding that before you set the ledger is free; deciding it after is a whole order of 20-footers.

Doubling the border. If you picture frame the deck, the field boards are shorter by two board widths each way, so running the calculator on the full dimensions already covers the border’s area. Add only the border boards themselves, not a second full waste factor.

Skipping the rip test. Check what the last row looks like. A 1 inch rip on the outside edge will split, cup and look wrong. Adjust the gap or the frame so the last board is at least 3 inches wide.

Over-buying screws by weight guess. A 1 lb box of 2-1/2 inch screws holds about 70 screws, so the 676 for the default deck is ten 1 lb boxes or two 5 lb boxes. People routinely buy three 5 lb boxes and keep 400 screws in the garage for a decade.

Trex deck cost calculator: converting board counts to dollars

Trex and the other capped composite brands are priced per board, so the fastest way to a Trex deck cost estimate is the calculator’s board count times your local per-board price, plus framing. Trex boards are 5.5 inches wide and the company specifies 1/4 inch side-to-side gapping for Transcend, Select and Enhance, with a 3/16 inch gap in some conditions, so enter 0.25 or 0.1875 in the gap field rather than the wood default. Grooved boards for the Hideaway hidden fastener system cost a little more per board than square-edge boards but save you the face screws.

For the default 16 x 12 deck at a 1/4 inch gap: 144 / 5.75 = 25.04, which rounds up to 26 rows, 416 linear feet, 29 boards of 16 ft Trex. Multiply those 29 boards (464 linear feet) by the per-board or per-linear-foot price your yard quotes for the Trex line you chose to get the decking cost. Framing is the same pressure-treated lumber either way, though you should hold the joist spacing at 16 inches for perpendicular boards and 12 inches for diagonal, per the Trex installation guide. Composite also wants joist tape over every joist top, roughly 13 joists x 12 ft = 156 linear feet, or two 65 ft rolls plus a short roll.

Remember that Trex boards flex more than wood and cannot be ripped to a narrow width without exposing the uncapped core, so the rip-test tip above matters twice as much. Plan the width so the last board is a full board or a full groove-edged border.

When to call a pro

Hire a licensed deck contractor or structural engineer if the deck is more than 30 inches above grade and over 200 sq ft, if any joist or beam span exceeds the IRC R507 prescriptive tables, if the ledger attaches to a cantilevered floor or brick veneer (both prohibited without engineering), or if you are supporting a hot tub, which can exceed 100 lb per sq ft and needs its own framing design. An electrician must run any power to lighting or a spa, and a plumber handles gas to a built-in grill.

FAQ

What is the best free deck calculator?

The best deck calculator is one that lets you set the actual board width and gap, choose your stock board length, and pick joist spacing, then shows the math so you can check it. The calculator on this page does all of that and adds 10% waste automatically. Manufacturer tools like Trex’s cost estimator are useful for a dollar figure on their own products but assume their boards, their gap and their fasteners, so use them after you have a board count you trust.

How many 2x6s do I need for a 12×12 deck?

For the decking: 12 x 12 = 144 inches / 5.625 = 25.6, so 26 rows of 2×6 at 12 ft, which is 312 linear feet and 29 boards with 10% waste. For the frame, 2×6 is not enough. A 2×6 joist tops out at roughly 9 to 10 feet of span at 16 inches on center under the IRC tables, so a 12 ft deck needs 2×8 joists; you need 10 of them at 12 ft, plus a 2×8 ledger and rim, and a doubled 2×10 beam on three 6×6 posts. Total 2x6s: 29, all for the deck surface.

How do I calculate how much decking I need?

Multiply deck width in feet by 12, divide by the board width plus gap in inches, and round up to get rows. Multiply rows by deck length for linear feet. Divide by your board length and add 10%. For a 16 x 12 deck with 5.5 inch boards and a 1/8 inch gap that is 26 rows, 416 linear feet and 29 boards of 16 ft decking. The shortcut is about 2.35 linear feet of 6 inch decking per square foot of deck, waste included.

How many footings for a deck calculator?

Footings equal the number of posts. On an attached deck with one beam, divide the deck length by your post spacing (6 to 8 ft for a doubled 2×10 beam carrying a 12 ft joist span) and add one, so a 16 ft deck takes three posts and three footings. A freestanding deck needs a second beam at the house side, doubling it to six. Footing size depends on soil bearing and tributary load; a 12 inch diameter footing is common for a 6 ft post spacing on good soil, with 16 to 20 inch diameters for wider spacing or poor soil. Dig below the local frost line.

How do I use a stair calculator for a deck?

Measure total rise from deck surface to landing in inches, divide by 7.5, round to a whole number of risers, then divide the rise by that number for riser height, which must be 7-3/4 inches or less. Treads are risers minus one, at least 10 inches deep, which two 5/4×6 boards provide. Total run is treads times tread depth. Cut stringers from 2×12 at 16 inches on center for wood treads or 12 inches on center for composite.

Does the deck calculator work for Trex and other composites?

Yes. Set Board width (in) to 5.5 and Gap between boards (in) to the figure in the manufacturer’s installation guide, usually 0.25 or 0.1875. Choose 12 in on center joist spacing if you are running boards diagonally or the manufacturer requires it. If you use hidden clips instead of face screws, divide the screw count by two for a clip count and add a box of starter clips.

Should I run deck boards along the length or the width?

Boards almost always run parallel to the house, perpendicular to joists, which means joists run from the house out to the far rim. Enter the side along the house as Deck length (along the boards) and the depth away from the house as Deck width (along the joists). Running boards the long way also lets you buy a single stock length with no butt joints on decks up to 20 ft.

How much extra decking should I buy?

Ten percent on a straight rectangular layout, which the calculator already adds. Go to 15% for diagonal boards or lots of obstructions, and 20% for herringbone or inlays. Buy all composite in one order so the color lots match, and keep two or three spare boards from the job stored flat for future repairs.

Guides that use this calculator

Scroll to Top