• Home
  • |
  • Blog
  • |
  • The Ultimate Guide for Building A Fence

​As an Amazon Associate we earn from qualifying purchases. Learn More.

A step-by-step guide on how to build your own privacy fence.


Erecting a wooden fence around your property line creates privacy and a natural backdrop for your backyard. While it can seem like a massive undertaking, building a fence is definitely a manageable DIY project. 

The cost of this project depends on what tools you already own or have access to, the cost of materials in your area, and the size of the fence. 

When pricing your project remember to consider the cost of not only the posts and pickets, but also the cost of cement, hardware, and tools.

Remember that you can save money by renting tools you don’t own from your local hardware store. 

All in all, building a new fence can cost you around $1000 for just the supplies. Installation would cost you a further grand but we’re going to show you how to do it yourself! 

Remember, there are other fence designs out there. This guide will talk you through the process of creating a shadow box fence.

This fence has alternating pickets on each side of the fence. This allows you to peep through from an oblique angle, but it prevents people seeing directly into the back yard. 


  • Pneumatic nail gun
  • Portable air compressor and hose
  • Drill and bits
  • Circular saw
  • Hammer
  • Post hole digger
  • Shovel
  • Tape measure
  • Level
  • Post level
  • Wheelbarrow
  • Ladder
  • Work gloves
  • Eye protection
  • Hearing protection
  • Auger powerhead and bit (optional)


  • 4 x 4 treated posts
  • 2 x 4 treated lumber
  • 1 x 4 furring strips 
  • Concrete mix
  • Exterior screws
  • Mason line
  • Weather resistant fence pickets 
  • Nails, screws, or staples


2.The Planning & Preparations To Build A Fence

Permits and Permissions

1.Check Local Codes And Homeowners Association Guidelines

Before you start making holes and banging nails into posts, you need to make sure that you are allowed to build a fence on your property. 

I know we like to think of our homes as our castles and our land as our kingdoms, but the truth is, you can’t just build whatever you like. 

There are planning codes and building regulations in place in most residential areas. These may be created by the housing association or by the local government. 

So, before you buy materials and tools, check to see if there are any codes or regulations in place about building fences.

These codes might tell you how high your fence can be, how far apart the posts need to be, or even what style you can build. 

You’ll also need to check to see whether or not you need a building permit. If necessary, make sure you apply for one. Usually permits are issued by the local government. 

Permits are normally only required if your fence is going to be over a particular height or made from particular materials. We can’t get more specific because it varies from place to place. 

If you start your build without a permit, you could be fined and made to tear the fence down. 

Property Lines

2.Know Your Property Lines ( basically create an image of the land that the house is on and draw a line around it)

You also need to check where your property lines are. You don’t want to build a fence to find out that it’s actually on your neighbor’s property.

Property line disputes are frequently heard in courts across the country.

They are expensive, financially draining disputes in which pretty much nobody wins. 

Do your research and make sure you find out where your property ends. It’s also good manners to discuss your plans with your neighbor’s. They are going to have to look at the fence too and it’s only polite to let them know. 

Planning Your Fence

3.Draw your Plan For Your Fence.

Make accurate measurements of what will soon be your fence line. Remember the adage measure twice, cut once. 

Draw out your layout on some grid paper. On the paper, plan out where your fence posts are going to sit.

Again, you may have to follow codes and rules when it comes to the fence post spacing. 

Generally, you want your posts to be about 6-8 feet apart. You measure the distance between posts from the center of each post, not the edges. 

The other thing you need to think about is the length of each side of the fence. Ideally, you want the fence to be long enough that you can fit a full picket at the corners. This will be very helpful when it comes to turning corners later. 

With your paper layout, you’re ready to move into the real world! 

Mark It Out

7.Mark The Layout (Use string and batter boards to lay out the fence)

We’re still not ready to start digging yet.

Don’t get ahead of yourself!

The next step is to physically mark out the fence.

You’re going to use batter boards, mason lines, and stakes to work out where the fence will lay and where the post will sit. 

This step is really important, and you need to take the time to do it properly. This will let you see where exactly the fence will stand on your land. 

Batter Boards

Batter boards are ‘L’ shaped bits of wood that sit a few inches outside of your desired fence posts. You tie string to your batter boards to create a line outline of your fence.

You can follow this guide from Lowes to help you create and use your batter boards. With your batter boards in place, attach your mason string. Using these strings, you can mark out each side of the fence. 

You need to keep the string 6 inches away from your property boundary. This is because the string represents the face of your post. You’re going to have pickets and rails on the face of the pots, so you need some extra room. 

With your mason strings in place, you can start marking out your post positions. You can use stakes or spray paint to mark out the post locations. They should be between 6-8 feet apart on center. 

Remember to make sure that your tape measure is level when measuring between posts. If they slant up or down, you’ll get an inaccurate reading. 

Once you’ve measured the distance, you need to mark with a stake or paint. Do not mark directly underneath the line. This is because the line represents the face of the post. You need to mark the center point of the post. 

Make your mark, half the width of the post back from the line. This will be the point where you dig post holes. 

Once you’ve marked your posts, you’re going to remove the line and batter boards. Before you do this, mark where the lines sit on the batter boards. You are going to use these again later. 

Setting the Posts

9.Dig Post Holes and Set Fence Posts

We’re finally getting tools in action. The first thing you need to do is get those posts in place.

Before we can do that, we need to make holes for the posts. 

There are a couple of tools you can use to dig the post holes.

We’ll take a quick look at them before we continue. 

  1. Shovel – This is the good old-fashioned method. It’s a slow and intensive method but seeing as most people own a shovel, it’s usually quite inexpensive.
  2. Post hole digger – These are basically two shovels attached like scissor blades. You dig the two ‘blades’ into the ground, squeeze them closed and they drag out a clump of dirt. 

These are more efficient than shovels but still rely on brute strength.

  1. Auger – Augers look like drill bits except they are big enough to make holes for fence posts. Augers can be manual or powered. 

Naturally, powered augers are quicker and less labor intensive, however they are expensive to buy or rent. 

At the marked points, you need to use your chosen tool to dig the holes. Be aware that some codes insist that you dig below the frost line. This prevents the post from rising out of the ground in the water. 

When working out how wide the hole should be, work on the premise that the hole diameter should be 3 times the width of the post. 

I know what you’re thinking, ‘how is the post supposed to stay upright?’ Well, that’s what the cement is for. 

If you’re digging post holes near the house, you should avoid using a powered auger. These can cause damage to the foundations. 

You should also call 811 to check if there are any power, water, or Wi-Fi lines under your intended dig sites. 

Unless a code specifies the depth, your post holes should be a third of the length of your posts. So, if you’re using 6-foot posts you need to dig 2-foot holes. 

Lay Lines

11.Reset The Layout Lines

Once you’ve dug your post holes, you can relay your guidelines.

Remember to use the marks you made on the batter boards when positioning your mason lines. 

The reason you removed these lines during the dig is so that you don’t damage the line or get it caught on your equipment. 

Set the Post

12.Set The Posts

The hole you’ve dug now needs filling.

Pour about 6 inches of cement or gravel into the hole. This will form the base for your post. 

Place one of your 4 x 4 posts into the hole.

Use a multiplane level to check that your post is straight and level. 

You need to keep the post flush to the line. Make sure you’re not pushing the line outward at all. If you’re really struggling to tell, get a laser level and shine it down the line. If the laser line breaks, the post is too far. 

Do this for the rest of the holes you’ve dug. 

Brace the Posts

Unless you want to stand there and hold the post in position, you’ll need to brace the posts. 

The simplest way is to use diagonal planks. These should attach to a stake at one end via screws. The stake should be driven into the ground. The other end of the plank should be attached to the post. 

You’ll need one plank on the side of the post and one plank on the back of the post.  These will hold the post upright so long as they are wedged between the ground and the post. 

Another way to brace the post is to screw 2 x 4s to the base of the post just above the top of the hole. These supports should lie parallel to the ground and prevent the post from tilting or twisting. 

Fill the Hole

13.Fill In The Holes

You’re going to use concrete to fill the post hole. You can use regular-set concrete or fast-set concrete. 

Prepare the concrete according to the manufacturer’s instructions. Usually this means adding some water to the mix. 

If you’re using the regular-set concrete, you’re looking for cake batter consistency.

You should be able to pour the cement, but it shouldn’t rush out of the bucket. 

Pour the concrete up to a few inches below the ground level. You want to leave space for soil to help the posts blend into the rest of your backyard. 

If you’re using fast-set concrete, pour the dry mix around the post up to about 3 inches below the ground level. Then pour water according to the manufacturer’s guidelines.

The water will sit on top of the dry mix initially before seeping down. If the water doesn’t mix, you can use a stake to encourage mixing but don’t go nuts. You don’t want to disturb your posts. 

You’ll need to leave the concrete to set according to the manufacturer’s guidelines. This is usually about 24-48 hours depending on the kind of cement you use. 

Once the cement is dry, you can finish the last few inches of your hole off with some of the soil you excavated. Don’t forget to remove the rest of the soil from around the hole. If you leave it in place, it will kill off your lawn. 

When the posts are set in place, you can remove the braces that you installed. 

Fence Rails

4.Install The Fence Rails

The next step is to install the fence rails. These rails run near the top and bottom of your posts. They are going to be the point of contact with your pickets. 

To establish where the rails will land against your post, mark about 6 inches down from the top and bottom of your posts. 

The top mark will show you where the top edge of the top rail will land. The bottom mark will show you where the bottom edge of the bottom rail will rest. 

Depending on the height of your posts, you may need a middle rail. Measure between both marks and find the midpoint. That mark will indicate the middle of the middle rail. 

If the ground is level, you can use string to quickly mark the rail positionings. Tie it off at the right height and pull it along the other posts. If the ground is uneven or sloped, you’ll want to mark each post individually. 

Attaching the Rails

16.Attach The Remaining Rails

The first thing to consider is whether you have any short parts of the fence.

These could be small portions that come off the house or go around a garage. 

For these small portions you’ll need to measure the distance and cut a rail to size.

If you’re attaching a rail near the house, make sure you push the rail flush to the house.

This will allow you to fix pickets right up against the home. 

When installing rails on longer runs, try to stagger the join points.  For instance, if you’re using 18-foot boards as rails and your posts are 6 foot apart, don’t attach all rails from the first post.

This would mean that they all finish on the third post and that area would be weaker than the rest. 

Instead, start some on the second and third posts. This does mean that you’ll need to cut some rails down to size but the fence will be stronger overall. 

When it comes to joining two rails, make sure they meet in the middle of a post. This will prevent pressure from making the posts twist. 

At the corners, you want the rails to be flush to the end of the post. This might mean that you need to use a saw to cut them to size. 

The rail running perpendicular to the one you’ve just cut, should be flush to the edge of the last rail. You don’t want any gaps, crevices, or dips. 

When attaching rails, you can use screws or nails. Screws are generally stronger, but you’ll need to drill pilot holes to prevent the plank from splitting.

The easiest way to do this is to get a few friends to hold the rail in place while you screw. 

Gate Posts

If you’re including a gate in your fence design, you’ll need to do a little bit of extra work around the gate posts. 

Your gate posts will be the two posts designed to hold a gate in between them. To support the gate, you’ll need to add boards to the post between the rails.

These 2 x 4 boards will be where you screw hinges and locking mechanisms into. 

Trim the Top

To finish off your posts and rails, cut the top of the posts down so that they are flush and level with your rails. This will prevent the posts from peeking over the top of your pickets. 

Install the Pickets

5.Install The Fence Pickets

The important thing to remember at this step is that the top of your pickets should be level. If you have uneven pickets, your fence will look like something out of a cartoon. 

Luckily, there are a couple of tricks you can use to get level pickets. 

  1. Top string – for this method, you need to install two corner pickets at the desired height. Then, tap a nail into the top of each picket. Run a string between the two nails resting on the top of the pickets. 

When you place further pickets, make sure the string rests on top without pushing up. Again, you can use a laser level instead to make sure you don’t push the string. 

Alternatively, you can create the line for the bottom of the picket. Remember that the picket shouldn’t be flush to the floor. You want to leave about an inch and a half between the floor and the bottom of your picket. 

This method is best for flat areas without much of a slope.

  1. 2 x 4 guide – set a 2 x 4 face down on the ground. When face down, these boards have a width of closer to 1.5 inches than 2 inches. This is the perfect width for your fence gap. 

When positioning your picket boards, place the bottom of the board flat on the 2 x 4. This will ensure that they are all the same height off the floor and therefore the same height at the top. 

This method is ideal for jobs where the floor is not even. As long as the 2 x 4 is flat on the ground below the picket, it doesn’t matter if there is a slope or dip in the earth. The pickets will always be the same distance from the ground. 

Fitting the Outer Pickets

22.Align The Outside Pickets

Remember, this fence design calls for pickets to be installed both sides of the rails in an alternating pattern. 

To make life easier for yourself pick one side to work on first. That way you don’t need to hop back and forth over the fence. 

We’re going to start on the outer side of your fence and at one of the corners.

Align the first picket so it is flush to the rail end and level with your string or 2 x 4 guide. Check the picket is plumb with a spirit level. 

Using a pneumatic nail gun or stapler, put two nails in the picket where it rests against the rails. You can do this by hand with a claw hammer, but it will take you a lot longer. 

Creating a Spacer

23.Assemble A Spacer

To make sure that your pickets are appropriately spaced, you need a spacer.

This will save you making measurements each time and it helps keep your pickets plumb. 

Creating a spacer is really simple. Take a 2 x 4 a couple of feet in length and attach a small bit of 2 x 4 timber to the top.

Make sure the two edges are level. The smaller 2 x 4 should only be about 4 – 6 inches in length.

To use the spacer, hang the longer 2 x 4 from the top rail by placing the smaller 2 x 4 on the rail. Slide the spacer up to the corner picket and make sure its flush to the whole length of the picket. 

Continue to Install Pickets

24.Install The Remaining Pickets

Take the next picket and place it flush to the other side of the spacer.

Keeping it flush will ensure that the picket is plumb. 

As with the corner picket, use your pneumatic nail gun to nail the picket to the rails. 

Continue along the outside of the fence.

Use your spacer to keep the distance correct and your 2 x 4 guide or top string to keep the pickets level. 

Getting near the corner can make the process a little bit more intricate. You want to end with enough space to fit a full picket flush to the rail. You want to avoid overhanging pickets or pickets that don’t reach the end. 

To make this fit, you may need to adjust the spacing of your pickets as you get closer to the edge. Don’t make the gaps too big or too close. It’s better to adjust a few pickets by a smaller amount than one picket by a lot. 

If you get to the end and there’s just no way, you’re going to be able to fit a full picket on the corner, you’ll need to rip one. 

When it comes to wood, ripping doesn’t mean using your hands to shred the wood. Instead, it refers to a cut made along the vertical line of the wood. 

The safest and most accurate way to rip a picket is to use a table saw. If you don’t have a table saw, you can use a circular saw and some bench rests. 


25.Overlap Corner Pickets

When you come to the corner, you need to fit your last picket flush to the rail. 

The first picket on the perpendicular side should have its face flush to the edge of the corner picket.

Again, overhangs are not your friends.

You want a clean 90° corner. 

Fitting the Interior Pickets

26.Install The Interior Pickets

With the outer side of your fence fitted, you can step inside and take care of the interior. 

The aim of a shadowbox fence is to create privacy by overlapping the pickets on either side of the fence.

So, when it comes to installing the interior pickets you need to pay close attention to positioning. 

Your interior pickets need to overlap the outer picket by an inch either side. This will prevent people looking in or out unless they are right up against the fence. 

Align the first interior picket between two exterior pickets with a 1-inch overlap each side. Use your top string or 2 x 4 guide to keep the top level. 

Check the picket is plumb using your spirit level and then nail in place. Remember to put two nails in each connection point. 

With the first picket installed level and plumb, you can continue installing using your spacer. It’s a good idea to double check the plumb every few pickets just to be sure. 

Dealing with Posts

29.Measure The Space Between Posts

When installing the interior pickets, you’re going to have to compensate for posts.

This is because they are attached to the back of the rails where you are currently installing. 

If a post is in the way of a picket placement, you have two choices. 

  1. You can use a jigsaw to cut a notch so that the picket fits around the post. This is fiddly but will give you a more uniform top line as the pickets are taller than the posts. 
  1. Rip a picket so it fits in beside the post. This is a simpler fix, but it can leave your fence looking slightly uneven along the top.

General Tips

Before we look at how to build and install a gate in your fence, we want to offer you a few general tips that can help with installing your pickets, posts, and rails. 

  • Get help – You are going to need extra hands to create your fence. Ask a few buddies to help you in return for a few cold ones. Trust me, they will save you hours of frustration. 
  • Dealing with slopes – Slopes can be tricky to navigate and can really throw your beautifully level fence off kilter. 

The best way to deal with slopes when installing pickets, is to use the 2 x 4 guide. By placing a guide under the picket, you know that each picket is the right height off the ground. 

Of course, this is going to mean that your top line will not be ruler level. Naturally, it is going to follow the contour of the ground. This is good, this is what you want. 

  • Dealing with bumps – If you come across a small bump or contour in the ground that makes one fence picket higher than the others, you’ll need to cut it down. 

To work out how much to cut, flip the picket and place it according to your leveling guide. Mark where the board sticks up above the rest. 

You can now take the picket over to your jigsaw and cut the excess off the bottom. 

Flip the board right way up and install it according to the level guide. It should now match the others in height. 

  • Ripping boards – Ripping boards is a hassle for sure. That’s why it’s important to do the planning stage right. When you know the width of your pickets and the gap you’re going to leave, you can plan for full pickets at corners. 

If you do need to rip pickets, use a table saw where possible. They have rip fences which make sure that the picket rips straight. 

If you don’t own a table saw, your local timber yard or DIY store should be able to do it for you. You can use a circular saw to rip pickets, but you need to be very careful not to injure yourself. 

You also need to pay awfully close attention to the cut. Without a rip fence it’s up to you to keep the cut straight. 

Don’t forget, if your picket has dog ear corners, you’ll need to replace one when you rip boards. Use a miter cut to lop off a corner and recreate the dog ear. 

Fence Gates

6.Build and Install the Fence Gate

If you want to be able to get in and out of your shiny new fence, you’ll need a gate. 

To build your gate, you’ll need some more timber and some gate hardware. Hardware can be bought as a kit or as individual items. 

Usually, the kits contain hinges and a latching mechanism. You’ll need to look for a kit that also includes supports. These fit inside the frame of your gate and prevent sagging or bending over time.

Building the Gate

31.Assemble The Frame

The first thing you need to do is measure the distance between your gate posts.

Make sure your measuring tape is level while you measure. 

You need to subtract the thickness of the hinges and latch from the distance.

This is important.

If you forget to do this, your gate will not fit in the gap. Use that figure to cut two horizontal gate rails. 

Next, measure the distance between the top and bottom fence rails. From this figure you need to subtract the thickness of the horizontal rails that are going to rest on the top and bottom of your gate frame. 

With that new figure, go ahead and cut two vertical gate rails. 

Lay the frame out with the horizontal rails on top of the vertical rails. It is crucial you get this right. If you put the horizontal rails inside the vertical rails, your gate will be too wide. 

Screw the frame together using the hardware. For our gate, we’ve used corner supports that are screwed into the corners of the frame. Other hardware might have different installation instructions. 

Finally, add a middle rail to the fence. You’ll need to measure the distance between the top and bottom rails and then cut a piece of timber to size. 

Put the middle rail in place and check that it’s plumb before screwing it in place. 

Hanging the Gate

33.Hang The Frame

Get someone to hold the gate in place for you.

Check that it’s level and at an appropriate height.

The top and bottom rails should match the top and bottom rails of your fence. 

When you’ve found the right position, test the hinge placement.

You’ll need to make marks for the screw placement in both the gate and that support board we installed earlier. 

You can pop the gate frame down for a few minutes while you drill pilot holes for the screws. We recommend you screw the hinges to the gate post before lifting the frame back into position.

You can then screw the hinges to the gate. Next up is the latch. Screw the post portion of the latch in place at the height of your choosing. Remember to drill pilot holes for any screws. 

You need to install the latch on the support board attached to the post. Do not attach the latch to the face of the post. This will get in the way of the gate. 

Once the post part is in place, close the gate and line up the gate part of the latch. Make marks, drill pilot holes, and finally screw it in place. 

Add Pickets

35.Attach The Pickets To The Frame

The final step is to attach pickets to your gate frame. 

To make sure the pickets are the same height as your fence, create a top rail with some nails and string.  

Start with the outer pickets, using a spacer and nail gun as before. Once the outer side is complete you can move on to the interior pickets.

Don’t forget to place them so they overlap the outer picket by an inch each side. 

Finishing Touches and Maintenance 

7.Finishing And Maintaining Your Fence

If you’ve used pressure treated lumber for your fence, it will be protected from decay and insect damage. It is an extremely hardy wood which is why it’s ideal for use in your fence. 

Before you even think about treating or painting your fence, it must be left to weather naturally. This allows any residue left over from treatment to dissipate. 

You’ll be able to identify boards that still have residue because they have a greenish tint to them. When weathered, the boards look grayer. 

You have to let this residue disappear because it stops any paints or sealants from adhering to the wood. This can take up to 3-4 months. 

Now, your pressure treated wood doesn’t need to be sealed or treated. Not for about 10 years at least. The treatment it received pre-purchase is long lasting. 

You can, if you want to, paint or stain your fence for cosmetic reasons. Before you do so, make sure your fence is fully dry. Ideally, don’t try it if you’ve had any rain recently. The timber might be harboring water. 

If you paint a wet fence, the moisture gets trapped inside the wood and can cause rot and decay. Even pressure treated timber can’t withstand that damage. 

Before applying any products, please make sure they are suitable for pressure treated wood. 



If you’ve used the right materials and put your best effort into the task, your fence should last a good few years. 

Be sure to admire your handiwork every time you step outside. Building a fence is no mean feat and you should be pleased with yourself! 

Related Posts