Home›Fence Gate Calculator
Fence Gate Calculator
A gate is a rectangle that wants to become a parallelogram — and the diagonal brace is the only thing stopping it. Enter the opening and the height to get the frame lumber, the brace length and angle, the pickets and the hardware, so the gate still swings square in five years.
Calculate a fence gate
Your results
How the fence gate formula works
Frame width = opening − 1.5 in · Frame lumber = 2 × height + 2 × frame width + diagonal brace · Brace = √(frame width² + height²) · Pickets = frame width ÷ (picket width + gap), rounded up
The gate is built 1.5 in narrower than the opening so it swings freely even when the posts shift or the wood swells in humid weather (brightcalculator.com). The frame is two vertical stiles, a top and a bottom rail, and one diagonal brace — the brace is the whole reason the gate stays square: it runs from the bottom hinge-side corner up to the top latch-side corner, which puts it in compression, so the weight of the gate pushes back into the hinge post instead of pulling the latch side down. A cable anti-sag kit runs the opposite way, because a cable works in tension. The brace length is the Pythagorean diagonal of the frame, and the pickets are the frame width divided by the picket width plus the gap — standard pickets are 5.5 in wide (a 1×6 board) with a 1/8 in gap. One hardware set is 2 hinges and 1 latch per leaf; a double gate is two leaves, each with its own frame, brace and hardware.
Worked example
Worked example: 36 in opening, 48 in high, single gate
A 36 in opening, 48 in high, single walk gate, 5.5 in pickets with a 1/8 in gap, 2×4 frame lumber at $2.50/lin ft, pickets at $4, hardware set at $35:
- Frame width: 36 − 1.5 = 34.5 in
- Diagonal brace: √(34.5² + 48²) = √3,494.25 = 59.1 in at 54.3°
- Frame lumber: (2 × 48 + 2 × 34.5 + 59.1) ÷ 12 = 224.1 ÷ 12 = 18.7 lin ft
- Pickets: 34.5 ÷ (5.5 + 0.125) = 6.13, so 7 pickets
- Hardware: 1 set (2 hinges + 1 latch)
- Cost: lumber 18.7 × $2.50 = $47 + pickets 7 × $4 = $28 + hardware $35, total $110
Cross-check: brightcalculator.com sizes the same 36 × 48 in gate at roughly 17-19 lin ft of frame lumber with the same 1.5 in clearance and the same diagonal rule. A second check on the brace: trybuildcalc.com gives a 7.93 ft brace (with 10% waste) for a 4 × 6 ft gate — this calculator gives 85.7 in (7.14 ft) for the same gate, 7.86 ft with 10% waste; the small gap is their full-width brace against this calculator's 1.5 in clearance deduction. A double-gate check: a 96 in opening, 72 in high, is two 47.25 in leaves, each with an 86.1 in brace — 54.1 lin ft of frame lumber, 18 pickets, 2 hardware sets, $277.
Buy two 10 ft 2×4s for the single gate: 18.7 ft of frame needs 20 ft of stock, and the brace cuts come out of the offcuts.
How much does a fence gate cost? (US, 2026)
Typical 2026 US material prices. A pro-built and hung wood gate runs $300-$800 installed.
| Item | Typical cost (US, 2026) |
|---|---|
| Pressure-treated 2×4, per lin ft | $2-$4 |
| Cedar 2×4, per lin ft | $3-$6 |
| Picket (1×6), each | $3-$5 |
| Hinges, per pair | $10-$25 |
| Latch, each | $15-$40 |
| 36 × 48 in single gate, DIY | ~$110 |
| US 2026 prices, checked November 2026. Sources: brightcalculator.com fence gate calculator, trybuildcalc.com fence gate calculator, aibuildcalc.com gate calculator, US retail listings. | |
Waste allowance
There is no separate waste allowance on a gate — the frame lumber is already counted in whole pieces, and the brace comes out of the offcuts. If your lumber is bowed or you are cutting your first gate, buy one extra 8 ft 2×4: a miscut rail costs a board, and a gate built from a bowed board never hangs straight.
Frequently asked questions
How wide can a single fence gate be?
Up to about 5 ft for a walk gate. Wider than that, a single leaf gets heavy and awkward to hinge — plan on double gates, two leaves meeting in the middle, or a wheeled drive gate with a heavier hinge system.
Which way does the diagonal brace go?
From the bottom hinge-side corner up to the top latch-side corner. That puts the brace in compression, so the gate weight pushes back into the hinge post. The reverse — top hinge to bottom latch — pulls the latch side down and the gate sags. A cable anti-sag kit runs the opposite way, because a cable works in tension.
How much clearance does a gate need?
About 1-1.5 in narrower than the opening — 3/4 in on each side. Less than that and the gate binds when the wood swells or the posts shift; more than that and it looks gappy and the latch barely catches.
How many hinges does a gate need?
Two for a standard walk gate up to 4 ft high; three for a tall or heavy gate (over 5 ft, or a double gate leaf). Heavy gates also want a drop rod or a wheel at the outer edge to take the weight off the hinges.
Why do fence gates sag?
Because the frame is a rectangle with no triangulation — gravity pulls the latch side down and the rectangle racks into a parallelogram. The diagonal brace triangulates the frame, and the hinges carry the rest. A gate without a brace, or with the brace the wrong way round, will sag within a season.