Published August 15, 2026 · Updated August 23, 2026 · By Tupep
The gate is a separate build
Every fence calculator treats a gate as a hole in the fence. Subtract the opening, move on. That is fine for picket counts and wrong for everything else, because a gate is a small freestanding structure with its own frame, brace, fasteners and posts. It also has to be smaller than the hole it fills, by an amount you decide before cutting anything. We price a gate as its own line item for that reason.
Leaf width, the formula that matters
Measure the opening post face to post face, not center to center, after the posts are set and the concrete has cured. Then:
- Single gate leaf = opening minus hinge gap minus latch gap
- Double gate leaf = (opening minus two hinge gaps minus center gap) divided by 2
We use a 1/2 in hinge gap and a 3/4 in latch gap as defaults on a wood gate. The hinge gap is small because the barrel needs clearance and nothing more. The latch gap is larger because that edge has to swing clear after the gate sags a little and the post moves a little.
Worked example, 4 ft walk gate
Opening measures 48 in face to face. Leaf = 48 minus 0.5 minus 0.75 = 46.75 in. Now check whether pickets land cleanly on 46.75 in. With n pickets at 5.5 in of face and n minus 1 gaps, total width = 5.5n + gap(n-1). At a 1/4 in gap, 8 pickets give 44 + 1.75 = 45.75 in, an inch narrow. Nine pickets give 49.5 + 2 = 51.5 in, far too wide.
Solve for the gap instead: gap = (leaf width minus n times 5.5) divided by (n minus 1). With 8 pickets, gap = (46.75 minus 44) / 7 = 0.393 in, a hair over 3/8. That works, but it does not match the 1/4 in gap in the fence beside it, and the eye catches that instantly.
Better to size the opening to the picket module before the posts go in. Work backwards: opening = 5.75n minus 0.25 plus both gaps. For 8 pickets at a 1/4 in gap that is 45.75 + 0.5 + 0.75 = 47 in. Set the gate posts 47 in apart and the gate disappears into the fence.
Double drive gate, 10 ft opening
120 in opening, two 1/2 in hinge gaps and a 3/4 in center gap. Leaf = (120 minus 1 minus 0.75) / 2 = 59.125 in each. Cane bolt in the ground for the inactive leaf, latch on the active one.
Frame lumber and the diagonal
A wood gate frame is a 2×4 perimeter, usually a mid rail, and one diagonal brace. The diagonal is the only part stopping the gate from turning into a parallelogram, and its length is real trigonometry.
For the 46.75 in leaf at 72 in tall, the frame inside is 46.75 minus two 3.5 in stiles = 39.75 in wide, and 72 minus two 3.5 in rails = 65 in tall. Diagonal = square root of (1580 plus 4225) = square root of 5805 = 76.2 in. An 8 ft 2×4 covers it with room for both angle cuts.
| Part | 4 ft walk gate | 10 ft double gate |
|---|---|---|
| Leaf width | 46-3/4 in | 59-1/8 in each |
| 2×4 stiles | 2 at 72 in | 4 at 72 in |
| 2×4 rails | 3 at 39-3/4 in | 6 at 52-1/8 in |
| 2×4 diagonal brace | 1 at about 76 in | 2 at about 84 in |
| Pickets | 8 | 10 per leaf |
| Gate posts | 2 at 6×6 | 2 at 6×6 |
Brace direction, and why people get it backwards
A wood diagonal brace only works in compression. The low end goes at the hinge side and the high end at the latch side. The weight of the latch corner tries to fall and pushes down the length of the brace into the bottom hinge, where the post can carry it. Run the brace the other way and the wood is in tension across end grain and screws, which it is bad at, and the gate sags.
A steel cable and turnbuckle is the opposite. Cable only works in tension, so it runs from the top hinge corner down to the bottom latch corner. A gate with both a wood brace and a cable running the same direction has one of them doing nothing.
Posts and hardware
Gate posts are not line posts. Use 6×6 rather than 4×4, buy them longer, and set them deeper and in a wider hole than the rest of the fence. The hinge post carries the whole weight of the leaf on a lever arm equal to the gate width, and it never stops. A 10 ft double gate on 4×4 posts will lean within a season.
Post embedment and frost depth are jurisdiction dependent, so confirm both with your local building department. If the fence encloses a swimming pool, gate hardware is a code item in most places, with requirements for self closing hinges, self latching hardware and latch height. Verify those locally before buying anything.
| Hardware | Walk gate | Double gate |
|---|---|---|
| Strap or T hinges | 2 or 3 | 4 or 6 |
| Latch | 1 | 1 on active leaf |
| Cane bolt / drop rod | 0 | 1 for inactive leaf |
| Gate stop | optional | 1 at center |
| Structural screws | about 40 | about 90 |
Two field details
Leave at least 2 in of ground clearance under the leaf, more if you get snow or the gate swings over a lawn. A gate that scrapes gets forced, and a gate that gets forced sags.
Build the frame square before pickets go on. Assemble it on a flat surface, check the two diagonals against each other with a tape until they match, brace it, and only then add pickets. Once pickets go on a racked frame the gate is permanently out of square and no turnbuckle truly fixes it.
Related guides
- Post Spacing: 6 ft vs 8 ft
- Fence Materials for a Quarter-Acre Backyard
- How Many Posts and Pickets for a 100 ft Privacy Fence
- How Many Deck Boards for a 12×16 Deck
Sources and Further Reading
Run your own numbers with the Fence Calculator, or browse every tool on the calculators index. Coverage figures and material constants are cross-checked against manufacturer technical data sheets before publication. See our Methodology page for how figures are selected and verified.
Planning estimate only. Results assume standard conditions and are intended for material planning. Verify against your product’s technical data sheet and your local building code before purchasing. Structural, electrical, and gas work should be specified by a licensed professional.
Last updated: August 23, 2026

Leave a Reply