Skip to content
Yardox

Decking calculator

Work out how many deck boards to buy, how to cut them with the least waste, how many joists the deck needs and how many screws, following the Trex installation guide.

Deck

16 ft12 ft

Deck

The direction the boards run.

Rows of boards are laid across this side.

Boards and joists

Board length as sold

in

Trex: 5.5 in (140 mm).

in

Trex: at least 3/16 in (5 mm), at most 1/2 in.

in

Trex: at most 16 in (406 mm) on a home deck.

More settings
in

Material lost in each cut. Leave 0 for a quick estimate.

Boards to buy26 boards× 16 ft
Add this calculator to your website

Free for any website: paste this code where the calculator should appear. It keeps itself up to date, fits its height to the content and links back to the full page with the explanations.

How to use it

  1. 01Measure the deck along the boards (length) and across them (width). If you have not decided which way the boards run, try both: the count can change a lot.
  2. 02Pick the board length you can buy. Trex sells 12, 16 and 20 ft boards; a length that covers the deck in one piece avoids joints.
  3. 03Check the board width, the gap between boards and the joist spacing. The defaults are the Trex values for a home deck.
  4. 04Read the boards to buy, the cut plan, the joists and the screws. If the last row comes out as a thin strip, see the tip below.

How it is calculated

Rows of boards are laid across the deck width, each row as long as the deck. Joists run under them across the length, one at each end plus one every joist spacing.

Rows
n = ⌈W / (b + gap)⌉
Last row
W − (n − 1) × (b + gap)
Joists
j = ⌈L / spacing⌉ + 1, each W long
Screws
2 × n × j

Each row is cut from boards of the length you chose. A row longer than one board takes whole boards plus a remainder, and remainders from different rows are cut from the same board when they fit, so the cut plan wastes as little as possible.

Trex asks for board ends to land on framing. Joints fall on joists when the board length is a multiple of the joist spacing, for example a 16 ft board on joists 16 in apart. Otherwise the calculator warns you to add blocking at the joints.

Joist size is not calculated here: it depends on the span and the load and comes from the span table in your building code.

Worked example

A 16 × 12 ft deck with 16 ft Trex boards

  1. Rows: 144 in / (5.5 + 3/16 in) = 25.3, so 26 rows. The last row is only about 1 13/16 in wide.
  2. Each row is one 16 ft board, so 26 boards and no joints.
  3. Joists 16 in apart: 192 / 16 + 1 = 13 joists, 12 ft each.
  4. Screws: 26 rows × 13 joists × 2 = 676.

Getting the order right

Avoid a sliver at the edge

In the example, 25 full rows with a gap of a little over 1/4 in (0.27 in) fill 12 ft exactly, which is within the 3/16 to 1/2 in Trex allows. A thin ripped row is hard to fasten, because screws must stay at least 1 in from board edges.

Two screws at every joist

Trex asks for two screws per board at each joist. With hidden clips the count is different: follow the clip maker’s instructions.

Diagonal boards need closer joists

Boards laid at 45° or 60° span farther between joists, so Trex reduces the allowed spacing for angled layouts.

Common mistakes

  • Choosing the board length before the direction: a 12 ft deck in 16 ft boards wastes 4 ft on every row.
  • Butting board ends between joists instead of on them.
  • Laying the boards tight: composite boards need the side gap so water and debris can drain.
  • Forgetting the extra joist at the far end of the deck.

Questions

How many deck boards do I need?

Divide the deck width by the board width plus the gap and round up: that is the number of rows. Then count how many rows each board length gives. A 12 ft wide deck with 5.5 in boards and 3/16 in gaps needs 26 rows.

How far apart should deck joists be?

Trex allows at most 16 in on centre for a home deck with boards square to the joists, and less for diagonal boards. Other products have their own limits, so check the board’s instructions.

How many screws per deck board?

Two at every joist. A 16 ft board on joists 16 in apart crosses 13 joists, so it takes 26 screws.

What gap should I leave between deck boards?

Trex asks for at least 3/16 in (5 mm) side to side and no more than 1/2 in. Wood decking has its own rules depending on how wet the boards are when laid.

Guides on this topic

  • Joist spacing for composite decking

    Joist spacing for Trex composite deck boards, gaps between boards, how many boards and screws a deck needs, with a worked 12 × 16 ft example.

Sources

  1. [1]Trex Decking Installation Guide (2026). Trex Company. Decking must span at least three joists; 16 in (406 mm) on centre for residential decks, less when boards run at an angle (p. 20, 22). Board ends always land on framing (p. 19). Side-to-side gap at least 3/16 in (5 mm) and no more than 1/2 in (p. 24).. Checked November 6, 2026
  2. [2]Trex Color-Match Composite Screw – installation instructions (DCM-0323). Trex Company. Always use two screws per joist; keep screws at least 1 in from board edges and ends.. Checked November 6, 2026
  3. [3]Trex product profiles. Trex Company. Square-edge and grooved boards 0.94 × 5.5 in (24 × 140 mm), lengths 12, 16 and 20 ft (3.65, 4.88 and 6.10 m).. Checked November 6, 2026

Formulas and sources last checked on November 6, 2026. How we calculate