SwiftTools

Fence Gate Calculator

A 48 by 48 inch gate needs 24 ft of frame lumber with its Z-brace and 10% waste — 16 ft for the perimeter alone — plus 9 boards, 2 hinges and 1 latch. Enter your gate below for your exact list.

Your gate
frame lumber = perimeter (2 x width + 2 x height) + diagonal Z-brace · boards = ceil(leaf width / 5.5 in) privacy, ceil(leaf width / 7 in) picket · frame opening = leaf width + 3.75 in

Swing gates only — single or double leaf, wood frame with boards. Motorised, automated and slide gates are a different product with their own track hardware and openers. Gate posts are 6x6 and set deeper than line posts because they carry the whole leaf weight. Always check local fencing and pool-safety rules before you build — a pool gate needs at least 48 in of finished height and self-closing hardware.

How the fence gate calculator works

A fence gate is a frame first and boards second. The frame lumber is the perimeter of the leaf plus the diagonal Z-brace that stops it sagging: frame = (2 x width + 2 x height) / 12 feet, plus the diagonal, which is the hypotenuse of the leaf — sqrt(width^2 + height^2) / 12 feet. A 48 by 48 inch gate has a 16 ft perimeter and a 5.7 ft diagonal, so 21.7 ft of frame lumber before waste, or 24 ft to buy with 10% waste. Boards are counted by the leaf width: privacy boards sit tight at 5.5 in each, so boards = ceil(leaf width / 5.5) — 9 boards for a 48 in leaf. Picket boards with 1.5 in gaps use 7 in per board, so the same leaf needs 7.

Worked example: a 4 by 6 foot wood gate has a 20 ft perimeter and a 7.2 ft diagonal, so 27.2 ft of frame lumber, or 30 ft to buy with 10% waste. TryBuildCalc lists 26.4 ft of frame material with 10% waste for the same gate — the difference is the Z-brace, which it lists separately as 7.9 ft of reinforcement. Hardware follows the leaf: 2 hinges per leaf up to 4 ft wide, 3 past 4 ft, and 1 latch per leaf. The frame opening is built wider than the leaf for hinge and latch clearance — leaf width + 3.75 in, so a 48 in leaf wants a 51.75 in opening (4 ft 3.75 in).

Common mistakes: building the frame without the diagonal brace — that is the single biggest cause of a sagging gate; cutting the frame opening to the leaf width exactly, leaving no room for hinges and swing clearance; and using 4x4 line posts for the gate, which will lean under the leaf weight — gate posts are 6x6, set deeper (36 in) and in concrete. Buy frame lumber a little long and cut to fit, because a gate that is square on paper still needs trimming on site. For the fence run itself, use the Wood Fence Material Calculator; for post spacing, the Fence Post Spacing Calculator.

frame lumber = perimeter (2 x width + 2 x height) + diagonal Z-brace · boards = ceil(leaf width / 5.5 in) privacy, ceil(leaf width / 7 in) picket · hinges: 2 per leaf (3 past 4 ft) · frame opening = leaf width + 3.75 in

Related tools

Also try the Wood Fence Material Calculator for the fence run, the Fence Picket Calculator for picket counts, and the Fence Post Spacing Calculator for post layout.

Fence gate calculator FAQ

How wide should a fence gate be?

48 in (4 ft) is the standard walk gate — wide enough for a person, a wheelbarrow or garden equipment. 36 in is the minimum for a person; a vehicle gate is 10 to 12 ft and built as a double leaf.

How much lumber do I need for a fence gate?

Perimeter plus the diagonal Z-brace, plus 10% waste. A 48 by 48 in gate is 16 ft of perimeter and 5.7 ft of brace — 21.7 ft before waste, 24 ft to buy.

How many pickets do I need for a gate?

Divide the leaf width by 5.5 in and round up for privacy boards — 9 boards for a 48 in leaf. Picket style with 1.5 in gaps uses 7 in per board, so the same leaf needs 7.

How many hinges does a fence gate need?

Two per leaf up to 4 ft wide, three past 4 ft. Heavy gates want strap hinges rated for the leaf weight, and the top hinge carries most of it.

How big should the gate opening be?

Build the post-to-post frame opening at the leaf width plus 3.75 in for hinge and latch clearance. A 48 in leaf needs a 51.75 in opening.

What size posts do I need for a fence gate?

6x6 posts, set deeper than line posts (36 in) and in concrete. Gate posts carry the whole leaf weight — 4x4 posts will lean over time.

How do I stop a fence gate from sagging?

Fit a Z-brace with the diagonal running from the bottom hinge side up to the top latch side, keep the frame square, and add a third hinge on leaves wider than 4 ft. Never skip the diagonal.