How to Build a Fence Gate

In this article, we'll show you how to build a fantastic fence and how to build a gate, too!

Next Project
Time

Multiple Days

Complexity

Intermediate

Cost

$501-1000

Introduction

Learn how to build a durable, good-looking fence, from start to finish. We designed it to be strong, using sandwich construction, and yet easy to assemble. It looks good on both sides so that it'll complement your home and the neighborhood and not be an eyesore.

Tools Required

  • 4 ft. level
  • Air-powered finish nailer
  • Circular saw
  • Drill/driver - cordless
  • Hammer
  • Hearing protection
  • Jigsaw
  • One-handed bar clamps
  • Posthole digger
  • Power auger
  • Safety glasses
  • Shovel
  • Speed square
  • Stringline
  • Table saw
  • Tape measure
  • Wheelbarrow

How to Build a Fence Overview: Project scope, design and key tools

Good fences may make good neighbors, but an ugly, flimsy or poorly built one won’t make anyone happy. This fence, on the other hand, is durable, handsome and sure to please everyone. Rules in most regions require that the best sides face out (toward the neighbors), but our fence is designed to look good from both sides.

We used treated 4x4s for long-lasting posts and “sandwich” construction for the panels for strength and easier assembly. This fence isn’t cheap compared with the cost of a fence built from preassembled panels from a home center. But this fence has thicker, higher quality wood, more detail and better fasteners than any store-bought selection. And we designed it so anyone who can handle a circular saw and level can build it.

We’ll show you how to build a wooden gate, line up and set posts, build sturdy panels and construct elegant, no-sag gates that are wide enough for a lawn tractor to pass through. We’ll also share tips on achieving solid footings, secure connection and fastening methods and staining that’ll ensure trouble-free decades of service. This project doesn’t require a pickup load of expensive tools either. Aside from the standard posthole digging implements and basic carpentry tools, you’ll only need a circular saw, a screw gun and a 4-ft. level. But to really speed up assembly, get a 15-gauge trim nailer with 1-1/2-in. galvanized nails to nail on the pickets and panel boards. The nails hold everything together until you permanently screw the upper and bottom rail pieces together. A table saw also comes in handy for ripping panel boards to width where needed.

Fence Design Approval and Property Lines:

Start with city hall. Most likely you’ll need to apply for a fence permit from the local building inspections department, so begin by picking up the application along with the local fence regulations. The regulations will include setback requirements from your property lines to the fence and maximum allowable heights. These details will likely vary for front and backyard fences and can even be different for houses on corners or adjacent to busy streets, so study them carefully. You’ll probably be required to submit a fence plan with the completed application. The plan should be a dimensioned overview of your property that clearly shows your property lines along with your proposed fence outline and its heights and distances from the property lines. Any other details that are required will be covered in the regulations or permit application.

If you live in a “planned” community or subdivision, you may also have to submit the same information to a planning committee for approval. The committee’s regulations can be even more rigorous than the city’s and may govern materials choices, colors and even the final design. Ignore regulations at your own peril. Build a fence without either planning committee or city approval and you risk having to tear it down and rebuild it.

Project step-by-step (21)

Step 1

Mark Property Lines

Privacy fence figure aFamily Handyman

Start by finding your property line and marking it. One will be found at each corner and anywhere your property makes a jog. You can either find the stakes on your own or hire a surveyor. It’s not hard to find and mark them yourself by renting a metal detector and scanning the areas where you think they are. If the detector indicates one, dig down to make sure it’s a steel stake instead of some other buried metallic object. A good tip is to go to city hall and ask for a copy of the “Certificate of Survey.” It will show the exact stake locations.

While you’re waiting for the permit, call to have underground utility lines marked. (The building department will have one number for you to call to have all lines marked.) Everyone but the cable company marked their lines for us, and guess what? Shortly after starting the postholes, there was no more History Channel for a while.

Note: You can download Figure A and enlarge it in Additional Information below.

Step 2

Establish the Corners and Mark Posts

mark fence linesFamily Handyman

With permit in hand and your property lines staked, begin laying out your post locations. String your lines 1-3/4 in. away from the fence center line using “batter boards” to establish the corners and to mark the edge of the 4×4 posts. Drive stakes every 6 ft. to mark the center of each posthole. Set aside the string and dig 3-ft.deep, 8-in.wide postholes.

Step 3

Dig Post Holes

fence post holesFamily Handyman

Dig postholes 8-in. diameter and about 3 ft. deep with a clamshell digger and tamp the bottom of each hole to firm up any loose soil, and pour about 6 in. of gravel into each hole. Draw the exact edges of each 4×4 post on the string with a marker. Then reattach the string and mark the exact post locations at 6-ft. increments. Mark one side of each post rather than the center so you can line up post edges when setting them.

Strive for evenly spaced posts, and don’t forget to position posts spaced to fit each gate size. The object is to space all posts about the same distance apart, which may mean adding or subtracting a full panel and lengthening or shortening the other panels. In our case, we added short, slightly different panels on both sides of the gate to make up the difference in the side part of the yard. Our fence design will work well for any fence panels up to 8 ft. wide, but you’ll have to adjust your materials list accordingly if you choose a panel width other than 6 ft.

Step 4

Plumb and Brace the Posts

plumb and brace fence postsFamily Handyman

Plan on enlisting some help for this step, since it’s practically impossible to set, plumb and brace fence posts on your own. Rest each 10-ft. long 4×4 on the gravel base, and then screw a couple of 1×4 braces near the top of the post and drive stakes into the ground near the end of the braces. Line up the post edge with the string line mark and plumb the post in both directions while your helper screws the braces to the stakes. This takes some patience. Most likely you’ll have to unscrew the braces and make fine adjustments. Take your time: Nicely aligned posts make for a professional looking fence. When each side is complete, stand behind one of the end posts, shut one eye and look for posts that are misaligned— there are bound to be a couple of rogues! Perfection isn’t necessary, but fix any posts that are more than 1/2 in. out of alignment.

Posts that flank gates demand extra care during plumbing and bracing. It’s nearly impossible to build smooth-swinging gates between posts that are out of plumb or misaligned.

Step 5

Anchor Posts with Concrete

anchor fence posts with concreteFamily Handyman

With everything aligned, mix concrete and pour it around each post, heaping it about 1/2 in. or so above ground level. Use a trowel or wide putty knife to smooth and slope the top slightly away from the post to shed water. Wait until the next day so the concrete can set up before you move on to the next step: building the panels.

Note: Before moving on to the next step of this project, we recommend staining the wood before cutting and assembling. You’ll not only get a cleaner look with better coverage but also save hours of staining time. You can coat all the edges super fast before the boards are installed. But, make no mistake about it: Staining your fence will take nearly as long as assembling the panels!

One way to speed up the process is to use a roller with a 1/2-in.nap sleeve. Pour a couple of gallons of stain into a 5-gallon pail and hang a roller screen ($3) from the side of the pail to load the stain onto the roller. Lay out the boards on sawhorses and stack five or so boards side by side on edge to roll several edges at once, then flip them over and stain the other edge. Roll out both of the flat sides and roll out any runs. Then set the boards aside on a couple of long 2x4s to dry. Apply the second coat. To help your fence last rot-free for years, brush stain on the edges and ends of the boards after cutting. That’ll keep water out of the end grain where most rot begins.

It takes a lot of stain to cover rough-sawn cedar. Figure on about a gallon of high-quality latex stain for every 12 ft. of fence.

Step 6

Add Pairs of 1x4s to the Posts

install fence posts 1x4 coversFamily Handyman

Our panels average 6 ft. high, depending on the grade. That’s high enough for visual privacy but low enough so you can visit with neighbors through the “jail bars” near the top. You can vary the height if you wish, but you’ll have to figure out the best length of 1×6 and 1×4 panel boards to buy for cutting efficiency. Likewise, the spacing between the ground and the panels can be higher or shorter depending on your needs. In our case, we kept the bottom about 3 in. above the top of the grass. Make it less if you want to keep micro dogs in (or out) of your yard. If easy mowing is a priority, make it slightly higher than the wheels on your lawn mower.

Get started by nailing 8-ft. 1×4 cedar boards to the insides of the posts, using pairs of 2-in. siding nails spaced every 8 in. Don’t nail higher than 6 ft. Otherwise, you may hit the nails with the saw blade when cutting the posts to height. Leave at least a 1/2-in. space between the concrete and the 1×4 to keep the bottoms from rotting.

Step 7

Mark the Lower Rail Height

mark lower rail heightFamily Handyman

Hold the 2×8 against the posts 10 in. above the concrete and scribe both ends using the posts as your guide. The bottom rails follow the slope of the yard, so this establishes the exact cutoff angles. Cut the 2x8s to fit, minus 1/8 in. for clearance and use them as patterns to cut matching 1×8 bottom rails to install later.

Step 8

Install the Rails with Metal Angles

metal anchor brackets on fence postFamily Handyman

Screw 2×3 angle brackets to the center of each post (2 in. below the marks) using 1-1/4 in. joist hanger screws and a 1-3/4 in. spacer block. Then screw the 2x8s bottom rails to the brackets using the marks as a guide for the proper height.

Step 9

Cut the Top Rail Curves

cut top rail curves privacy fenceFamily Handyman

Layout a top rail, cutting a 1×8 pattern for the top rails. Bend a knot-free 1×2 on a 6-ft. 1×8 to make a smooth curve (If you have more than one-panel width, make separate patterns.)  Cut the curve with a jigsaw and use it as a template for the upper 1×8 rails.

Step 10

Level and Mark the Posts

assemble privacy fenceFamily Handyman

Next, mark the top of the fence panels on each post. There’s no magic number for height unless you have a perfectly flat yard. We strove for an average height of 6 ft., but some areas were less, some more, because of the contours of the yard. Between each pair of posts, use a 4-ft. level and straight board to mark each post. Step panels down or up to accommodate grade changes and keep the height about 6 ft. If you’re unsure, tack boards to the tops of each pair to simulate the panel heights before settling on final heights.

Center the rails between the posts even with the top layout marks and then hold them in place and scribe their length and cut both sets (front and back) to length for each panel. Cut them to length, minus 1/8 in.

Step 11

Screw on Cleats for the Rails

top rail cleat fence postFamily Handyman

Predrill and screw a 3/4 x 1-1/2 x 12-in. long cleat to each side of the posts below the top rail mark with three 3-in. deck screws. Space them 1-1/4 in. from the edge opposite the framing clips below. (See Figure A.)

Step 12

Add the Top Rails and Paneling

add top rails and paneling to fenceFamily Handyman

Screw one pair of upper and lower rails to the cleats with two 2-in.deck screws at each end. Cut a 1×6 panel board to length, center it in the panel and tack it 2 in. above the lower edge of the upper rail with a couple of 1-1/2 in. galvanized finish nails at each end. Be sure to angle the nails when driving them in or the tips may project through the other side. After you’ve driven in the first fence board, check the other side to make sure you’re angling them enough. Then cut and tack the rest of the boards into place using a carpenter’s pencil as a spacer and alternating 1x4s and 1x6s. Add other boards according to the pattern, spacing each about 1/4 in. apart. (We also alternated rough and smooth sides so the fence would look identical on both sides.) Most likely you’ll have to rip the end boards of each panel to width.

Step 13

Nail Up the 1×2 Pickets

Nail up picketsFamily Handyman

Cut 12-in.-long 1×2 pickets. Center and tack the first one, then space the others with a 1-1/2-in. block and tack them. Use 1-1/2- in.-galvanized finish nails are driven at an angle.

Step 14

Add the Second Rail Boards

Add Second Rail boards to fenceFamily Handyman

Screw the last two top rails (the other halves of the top rails) and the bottom 1×8 rail into place with two 2-in. deck screws into the 1×2 cleats at the end and then into the rails on the other side spaced about every 6 in. These screws clamp all sections together.

Step 15

Cut the Posts Tops

trim fence topsFamily Handyman

Mark the posts 4 in. above the top rail. Then set a circular saw to cut about 1-1/2 in. deep and cut from both sides. Finish the cut with a handsaw.

Step 16

Install Post Trim and Caps

fenceFamily Handyman

Cut 1x6s to post length and nail them over the exposed faces of the 4×4 posts. Use pairs of 2-in. siding nails driven every 8 in. Cut 1×4 top caps to length and nail them on with 2-in. siding nails. Then cut and bevel the post caps and fasten them with two 16d galvanized casing nails driven at opposite corners.

Step 17

Cut and Assemble the Wooden Gate Frame

fence gate frameFamily Handyman

We give the dimensions for our 6-ft.wide double gate in Figure B (in Additional Information below). But in reality, it’s unlikely your gate will be the same dimensions. When you build your wooden gate(s), be sure you make your double gates about 1 in. narrower (both gates together) than the opening (or a single gate about 3/4 in. smaller) to allow for opening clearances.

The key to our no-sag gate is using panel boards that are angled at 45 degrees. Each functions as a brace to keep the panel from sagging over time. The outer frame on each side also overlaps in opposite ways at each corner to make the gate even more solid. Cut and assemble the gate frames on a flat surface using Figure B as a guide. If your gate is the same size as your fence panels, you can use the top rail pattern, minus 1 in, to mark and cut the curved top. Otherwise, you’ll have to make a new pattern. Push both sides together and square them as a unit by shifting them until the diagonal measurements are equal. The frames are fairly pliable, and it’s easy to do if you have a partner to anchor the corner opposite the one you’re pushing against.

Step 18

Add the Panel Boards

fence gate panel boardsFamily Handyman

To panel each gate, begin with two 1×6 boards cut with a 45-degree angle at one end and lay the points in the lower corners of the frames. Once you scribe and nail the boards, the frames will be rigid and you can simply fill the panels by scribing and cutting the rest of the boards spacing them about 1/4 in. Use the assemblies to measure and cut the frame for the other side of the gate, remembering to overlap the ends in the opposite direction.

Step 19

Screw on the Trim

fence gate trimFamily Handyman

Cover the board edges with a second frame. Fasten it with a 2-in. screw into each panel board and two at each end and remember to predrill when driving screws near board ends. Flip it over and screw the other side the same way.

Step 20

Space and Hinge the Gates

hang privacy fence gateFamily Handyman

Here’s the secret to hanging gates successfully. With the gates spaced 1/2 in. apart on the ground, screw two 2×4 or 2×6 “holding” boards to the gates, overhanging the ends several inches. Then carry the assembly over to the opening and rest it on blocks at each end. Be sure to block the gates high enough to clear the ground when they swing open. Once you center the assembly in the opening, it’s simple to mount the hinges to the posts and gates. Attach a 1×4 gate stop to the fixed gate, leaving a 1-in. overhang.

Finish by installing the rest of the hardware. If you choose double gates, it’s best to “fix” one side and leave a “people” side that opens for everyday pedestrian traffic. Plan on using a foot latch to anchor the fixed gate when it’s not needed.

Step 21

Foot Latch Pipe

pvc pipe latch fence gateFamily Handyman

Screw the foot latch to the bottom edge of the fixed side and then, with the gates closed, drop the “foot” and mark the ground. Drive a 12-in. long, 1-in. thick chunk of PVC piping into the ground with a maul. The pipe will fill up with soil, so it’s best to pull it out every few inches of driving and remove the dirt before driving it farther. Our latch operates similarly to a front door lockset. It can be locked from the inside or left unlocked.

Additional Information: