Deck gate calculator
A gate is a rectangle that wants to become a parallelogram. The diagonal brace is what stops it, which is why the brace length is the number worth calculating before you cut anything.
Gate opening
How this is calculated
- Leaf width = opening − clearance. For a double gate, halve it and subtract a centre gap.
- Inner opening = leaf width − 2 × frame width.
- Brace = √(inner width² + inner height²), measured between the inside corners. Mount it in compression: low on the hinge side, high on the latch side.
- Boards = ⌈inner width ÷ (board width + gap)⌉, then add the gap back into the layout rather than leaving it at one end.
- Hinges = 3 for a gate under 48″ tall, 4 above that, at roughly 1/4, 1/2, 3/4 of the height.
Worked example
A 36″ opening, 3/8″ clearance, 36″ high gate, 2×4 frame:
- Leaf = 36 − 0.375 = 35.6″
- Inner = 35.6 − 7 = 28.6″ wide, 36 − 7 = 29″ high
- Brace = √(28.6² + 29²) = √(818 + 841) = 40.7″
- Boards at 5.5″ + 1/8″ = ⌈28.6 ÷ 5.625⌉ = 6 boards
Six boards at 5.5″ is 33″ of material in a 28.6″ opening, so five boards plus five gaps of 0.72″ is the alternative. The choice is aesthetic — but the brace length does not change either way.
Why gates sag, and what actually prevents it
Wood gates sag for three reasons, and only one of them is solved by a brace:
- Racking. The rectangle turns into a parallelogram under its own weight. A diagonal brace in compression solves this.
- Hinge movement. Screws working in soft wood. Through-bolts or hinge plates solve this, not a brace.
- Post deflection. The gate post itself leans. A brace on the gate makes this worse, because it transfers the load into a post that is already moving.
The practical width limit is about 48″ for a single wood leaf. Beyond that the gate needs a metal frame, a wheel, or two leaves. A 60″ wood gate with a perfect brace will still drag within a year.
Where gates stop behaving like fences
- It does not design the hinge or latch hardware. Those come with their own spacing and load ratings.
- It does not check the gate post. A gate needs a deeper, better-anchored post than a railing post, and that is a separate decision.
- It assumes a rectangular leaf. Arched or raked tops change the brace geometry.
- It does not account for the code requirement that a gate guarding a stair or a drop close and latch automatically — that is a hardware question, not arithmetic.
Questions people actually ask
How wide can a wood deck gate be?
About 48 inches for a single leaf. Beyond that the gate twists under its own weight even with a diagonal brace, and a metal frame or a double gate becomes the practical answer.
Where does the diagonal brace go on a gate?
Low on the hinge side, high on the latch side, so the brace is in compression when the gate hangs. Reversing it puts the brace in tension and the fasteners take the load instead.
How many hinges does a deck gate need?
Three for a gate up to about 48 inches tall, four above that. Space them at roughly a quarter, half and three-quarters of the height rather than evenly at the ends.
Why does my deck gate drag after a year?
Almost always the post, not the gate. A gate post takes lateral and cyclic load that a railing post does not, and a post that was fine for railing will lean once a gate swings on it.