Deck Calculator
Enter the deck size, the direction the boards run, and the board width, gap and stock length to count rows, boards to buy and joists in the layout. It counts material; it does not design the deck.
Quick answer: A 16 ft × 12 ft deck with 5.5 in boards, a 1/4 in gap and 16 ft stock has 26 rows, which is 29 boards with 10% waste.
Rows = deck width across the boards ÷ (board width + gap), rounded up. Boards = rows × deck length × (1 + waste) ÷ board length, rounded up. Joists = deck length ÷ spacing, rounded down, + 1.
Example: a 16 ft × 12 ft deck with 5.5 in boards, a 1/4 in gap and 16 ft boards has 26 rows, 416 linear feet and, with 10% waste, 29 boards. Joists at 16 in on center: 13.
Method
How this calculator works
The counting is plain arithmetic. Board widths come from the lumber standard, and the gap and waste are conventions you set from the board maker’s guide.
Rows across the deck
Each row takes one board plus one gap. Divide the dimension that the boards fill, in inches, by that pitch and round up. Use the actual board width: 5/4×6 and 2×6 deck boards are both 5.5 in.
Rows = round up (Deck width (in) ÷ (Board width + Gap))Gap between boards
The gap starts at 1/4 in. Composite makers often call for about 1/4 in, and dry wood about 1/8 in. Treated lumber installed wet can be closer, because it shrinks. Always follow your board maker’s gapping guide, and type that number in.
Row pitch = Board width + GapBoards to buy
Total board length is rows times the length the boards run. Add waste for cuts, end trimming and defects, then divide by your stock length (8, 10, 12, 16 or 20 ft). The default is 10%. Diagonal and picture-frame layouts need more, about 15%.
Total length = Rows × Run (ft)Boards = round up (Total length × (1 + Waste ÷ 100) ÷ Stock length)Joists in the layout
Joists are spaced 12, 16 or 24 in on center depending on the board, and the Trex planning guide says 24 in applies only to certain boards and loads. The calculator counts members at the spacing you pick. It does not size joists or check spans.
Joists = floor (Run (in) ÷ Spacing (in)) + 1Worked example: 16 ft × 12 ft deck, boards run along the 16 ft side
Arithmetic checked5.5 in boards, 1/4 in gap, 16 ft stock boards, 10% waste, joists at 16 in on center.
| Step | Math | Result |
|---|---|---|
| Width covered by boards | 12 ft × 12 | 144 in |
| Row pitch | 5.5 + 0.25 | 5.75 in |
| Rows | 144 ÷ 5.75 = 25.04, round up | 26 rows |
| Total board length | 26 × 16 | 416 ft |
| Add 10% waste | 416 × 1.10 | 457.6 ft |
| Boards of 16 ft | 457.6 ÷ 16 = 28.6, round up | 29 boards |
| Joists at 16 in on center | floor (192 ÷ 16) + 1 | 13 joists |
| Length of each joist | the 12 ft width | 12 ft |
| You would buy | 29 boards (16 ft), with 13 joists in the layout | |
The 26th row is only 0.25 in wide (144 − 25 × 5.75), so that board would be ripped to a sliver. A gap of about 0.26 in gives exactly 25 rows (144 ÷ 25 = 5.76 in per row), if your board maker allows it.
Disclaimer
Results are planning estimates based on the dimensions and assumptions you enter. They are not engineering, structural or building-code advice. Product yields, densities and coverage vary by manufacturer, batch and site conditions. Check product labels, your supplier and your local building department before you order materials or start work. Read the full calculation disclaimer.
Accuracy
What affects your estimate
Board count is arithmetic. The choices you make about layout change the number more than the formula does.
The last row
When the width does not divide evenly, the last row is narrow. The calculator flags a sliver. Change the gap within the maker’s limits or trim the first row so the last one is a usable width.
Stock length and offcuts
Boards are counted as total length divided by stock length, so it assumes you can reuse offcuts. If the deck length does not match a stock length, joints and waste go up.
Layout pattern
Diagonal, herringbone and picture-frame layouts cut more boards. The calculator is for straight runs; raise the waste to about 15% for diagonal.
What is not counted
Fasteners, rim joists, blocking, stairs, fascia and railing are not in the totals. Follow the board maker’s fastener guide for screws or clips.
Deck framing, footings, ledger attachment and railing are structural and regulated by code (IRC R507). This tool only counts boards and joists at the spacing you choose. Get a permit and follow your local code, or consult an engineer.
Common mistakes
Using the nominal 6 in board width
A 5/4×6 or 2×6 deck board is 5.5 in wide. Using 6 in leaves you with fewer rows than the deck needs.
Leaving out the gap
Each row takes a gap as well as a board. On a 12 ft wide deck, 144 ÷ 5.5 gives 27 rows with no gap but 26 with a 1/4 in gap, so the layout on site will not match a count that ignored it.
Treating the joist count as a design
The joist number shows how many members sit at a spacing. It does not tell you the size, span or footing a deck needs. Those come from your code or an engineer.
Questions people ask
How many deck boards do I need?
Divide the width the boards cover by the board width plus the gap, round up, and multiply by the board run to get total length. Add 10% and divide by the stock length. A 16 ft × 12 ft deck needs 29 boards of 16 ft. The guide on how many deck boards you need has more worked examples and a quick table. If a supplier sells the boards by the board foot, the board foot calculator totals them from thickness, width and length. To change a total length into pieces of another stock length, or square feet into linear feet, use the linear feet calculator.
How many deck boards for a 12×12 deck?
With boards 5.5 in wide, a 1/4 in gap and boards running 12 ft: 144 ÷ 5.75 = 25.04, so 26 rows, 312 ft, and 343.2 ft with 10% waste. That is 29 boards of 12 ft or 22 boards of 16 ft.
How many joists do I need?
The layout count is the deck length divided by the spacing, rounded down, plus one. For a 16 ft run it is 17 at 12 in, 13 at 16 in and 9 at 24 in on center. Size and span come from your code.
What gap should I leave between deck boards?
Follow the board maker’s guide. About 1/4 in is common for composite and 1/8 in for dry wood. Treated wood installed wet can go closer, because it shrinks as it dries.
Can I use 24 inch joist spacing?
Only when the board maker allows it. Trex says 24 in on center applies only to certain boards and loads, so the board’s instructions decide the spacing.
Related calculators and guides
Sources
Where the numbers come from
- Trex six tips for planning a deck (joist spacing, gapping), accessed October 16, 2026.
- ArchToolbox (secondary source) nominal and actual lumber dimensions (5.5 in boards), accessed October 16, 2026.