The Hidden Math Behind Decking and Fencing: Calculating Board Gaps
Building a wooden deck looks like a simple woodworking project until the summer sun hits it. If you calculate your lumber needs by simply dividing the width of your deck by the width of a deck board, you will fail. Wood is a living, breathing material that absorbs humidity like a sponge. If you do not calculate the exact mathematical gap required between every single board, the deck will swell after a rainstorm, buckle violently, and rip the screws right out of the joists.
My Hands-On Experience with Warped Decks
In July of 2024, a client asked me to inspect a backyard deck they had built themselves using pressure-treated pine. They had jammed the wet boards tightly against each other, assuming they would shrink as they dried. Instead, we had a week of heavy rain followed by 100-degree heat. The boards expanded sideways, crushed against each other, and literally popped off the joists in the middle of the deck, creating a dangerous tripping hazard. I had to unscrew the entire 400-square-foot surface, re-cut the ends, and reinstall every single board using a 1/8-inch spacer tool. The client wasted three days of labor because they ignored the math.

Calculating the Expansion Gap
A standard pressure-treated deck board is usually nominally a 5/4x6 (which actually measures 1 inch thick by 5.5 inches wide). When calculating how many boards you need to cover a 12-foot deep patio, you cannot just divide by 5.5 inches. You must factor in the gap.
The American Wood Council (AWC) recommends leaving a minimum 1/8-inch gap between standard decking boards. This allows water to drain through and gives the wood room to swell. Therefore, each board actually consumes 5.625 inches of linear space. Over a large deck, that 1/8-inch gap adds up quickly. If you have 40 boards, the gaps account for a full 5 inches of space. If you do not factor this into your initial calculation, your final board will overhang the edge of the deck.
The Composite Variable
If you are upgrading from wood to composite decking (like Trex), the math changes entirely. Composite decking expands longitudinally (lengthwise) when it gets hot, not just widthwise. If you are building a massive 30-foot-long deck and you butt two composite boards end-to-end, you must leave a specific gap between the ends based on the ambient temperature on the day you install them.
This requires the same level of precise environmental planning as pouring a concrete patio. You cannot cut composite boards tight to the house siding. You must leave at least a 1/4-inch gap at fixed walls, or the expanding plastic will push against the house and snap the board in half.
Need to calculate measurements for your space?
Use our free, interactive Decking Material Tool to calculate dimensions, box requirements, or guidelines automatically.
Calculate Your Lumber→