How to Lay Out a Fence Safely and Efficiently

Fence installer using a tape measure to lay out a fence

Fences have many uses, from privacy to security, and they can be found in many different materials and styles. Whatever your fence purpose, material, or style, every good installation begins with a layout.

Planning a fence for privacy, aesthetics, or marking a boundary is straightforward if you lay out the fence correctly. We’ll guide you through the process from start to finish to ensure your fence layout and finished product are a success.

Before you start your project

Get free estimates from fence pros in your area to compare prices

Get Free Estimates

phone showing emails

Before You Begin Laying out the Fence

Before the layout can begin, there is some preparation that goes into every fence installation.

Check for Utilities

It’s essential to make sure you know the position of all underground utilities before you start digging holes for fence posts. Examples of what may be buried in your yard include gas lines, sewer lines, septic tanks, well pumps, water lines, or buried electrical cable.

warning flag indicating a gas line is buried beneath the ground

It is federally mandated and compulsory in most states, if not all, to have any underground utilities marked prior to starting any project that involves digging. Because fences require you to dig down anywhere from one to three feet to sink the posts, this will require you to have the utilities marked.

Doing so helps ensure you’ll protect yourself from personal injury or service interruptions.

The standard approach in urban and suburban areas is to call “Miss Utility” (a free service) by dialing 811. When you call 811, they open a “dig ticket” that alerts all utility companies servicing the property of your intention to dig.

You’ll need to call 811 a few days before you intend to start work so utility companies have time to come out and mark the position of underground utilities.

Check Your Property Lines

Make sure you locate your property lines relative to your proposed fence layout. Installing a fence on the wrong side of a property line could be a costly mistake.

An inspection may even be required to validate that a fence is installed correctly within the property lines in some localities. Learn more about how to find your property lines. Keep in mind that if there have been significant changes to your property or the neighborhood, it may be a good idea to have your land surveyed again before beginning a fence installation.

Take Measurements of the Area

In order to accurately lay out a fence, you need to know how many posts and how far apart they will need to be. Most fence posts are spaced 8 feet apart, but some vinyl fences may have posts that are 4 feet or 6 feet apart, and some wire fences may have posts up to 25 feet apart.

Take careful measurements of each length of fence, and find out what the recommended post width is for the type of fence you are installing.

Create a Paper Plan

Sketch your intended fence out on paper before you start digging for fence posts. This will give you a visual guide and help in the event you need to change your plan due to an unforeseen problem.

The easiest way to do this is to use graph paper. Make each square on the paper represent a set value of distance. For example, if you have a large yard, you may want to designate one square to be 1 foot of distance.

Sketch out the layout, and mark where the fence posts will be placed, as well as where any gates or openings in the fence will be.

Working Around Utilities when Digging for Fence Posts

Even if you “know” where all utilities are when you start digging for fence posts, always be cautious. For example, there may be a gas line buried on or near your property line, which is fairly common.

That said, the exact placement may be inaccurate to the tune of a few feet either way. In this situation, it’s a good idea to carefully hand dig to ascertain the exact path the gas line takes and how it impacts your fence layout.

Typically, gas companies advise avoiding a gas line by at least two feet, but check with your gas company to make sure. If possible, find out how deep any utilities may be buried as well, so you know when to start slowing down and checking.

Start your Fence Layout with a Corner

Once you’ve worked out the safe placement of your fence, it’s time to start marking the layout.

The first thing to do is drive a metal or wooden peg in the ground at the location of your first corner; this will be the starting point for your fence.

Take a string line from your corner peg and lay out the first side of fencing, fixing the line with a peg at the end.

The next step is to get a perfectly square (right angle) string for the adjoining run of fencing. Use a protractor or carpenter’s square to measure the angle, and make sure each run is straight.

Keep in mind that not all yards are perfect squares or rectangles, and that some may have angles that are not 90 degrees in each corner. This is where following your property lines may be helpful, as you should follow the boundary evenly whenever possible, even if that means that your fence corner may not be perfectly square.

Here’s how.

Fence installer pounding a layout stake into the ground
String attached to fence layout stake to  locate the fence line

Squaring a Fence Layout Using Basic Math

To make sure you have a 90-degree angle at corners and your fence layout is square, you’ll need to do a little math. Using the Pythagorean theorem, which is also known as a 3-4-5 triangle, it’s possible to work out a perfect right angle.

In the diagram above, the triangle’s bottom right represents the corner starting peg, and side a represents the string you fixed for your first line of fencing.

We know that in a 3-4-5 triangle, side a would be 3 units, side b would be 4 units, and side c would be 5 units. For instance, 32 = 9, 42 = 16 and 9 + 16 = 25, or c2. For a line of fence that is longer, you simply use multiples of 3, 4, & 5, such as 6, 8, & 10 or 9, 12, & 15.

Assuming you’re using 6, 8, & 10 – measure out 6 feet on your fixed string a and drive in a second peg.

Next, you’ll need two tape measures. Set the first tape measure to 8 feet and hook it to your corner starting peg. This represents side b in our diagram above. Set the second tape measure to 10 feet (side c) and hook it to the peg you drove in at 6 feet on your fixed line a.

illustration showing the formula for the Pythagorean theorem and its relation to a right triangle

Swivel the tape measures till the 8-foot mark on your side b measure and the 10-foot mark on your side c measure line up. Drive in a third peg to mark the spot. You’ve now created a perfectly square corner.

Fence corner laid out and measured using the Pythagorean Theorem to ensure it's square

Continue till you’ve completed your fence layout.

Tip: Remember, standard fence panels come in 6 or 8 feet lengths. Take this into consideration when laying out your fence if you plan to use standard panels. Please refer to our fence calculator or vinyl fence calculator for more help with this.

Add a Second Parallel Set of Strings

Once you’ve marked out the fence line, you’ll need to set out a second set of strings parallel but 3 feet out from the first set. This is because the first set will be in the way when you begin to dig holes for the fence posts.

Once you’ve marked out the fence posts’ locations on the inside strings, you’ll remove them and use the strings set at 3 feet for reference and measuring.

Alternatively, you can use paint to mark the location of each post directly on the ground.

Finding Post Centers for Custom-Made Wooden Fences

If your wooden fence is to be custom-made to fit a specific run length, you’ll have to work out your fence post centers. Bear in mind that standard panels are normally 8 feet (96 inches) in length, so your posts will need to be placed on the center of each measured length.

Most fence panels are nominally sized, meaning that your posts will be 8 feet apart, and the panels will be slightly smaller than 8 feet to fit between them.

Let’s say you have a run of 100 feet, or 1,200 inches. 1,200 ÷ 96 = 12.5. Round up to the nearest whole number, or 13. The number of fence posts you need will be 13 + 1 extra for the end of the run = 14.

drawing showing the distance between fence posts

Fence posts are generally installed on center. Meaning that you will install the first post at the beginning of your run, then measure out 8 feet from the center of that post.

The second post’s center will be exactly 8 feet out from the center of the first post.

Keep in mind that even if your run will end with a shorter panel, your last post or corner post if the run is changing directions will still be measured on center from the last.

Different fence styles may require a slightly different post layout, so always consider the style of fence you’re installing when locating your posts and be sure that the layout will work with your chosen style.

Our fence calculator can lay out your post centers as well.

Marking Out Fence Posts

In the example above, using a spray can, mark out a large “X” on the inner string line. Make sure the “X” extends beyond the hole you need to dig so you can use it for reference. Next, mark out the position of the other holes in the same way.

Fence post location marked with paint

When marking out is complete, you can remove the inner string lines and use the outer string as a guide.

Making Sure Your Fence is Perfectly Straight

To make sure your fence is perfectly straight, dig the two end holes of one side of the fence first, drop in fence posts, and make sure they’re plumb before setting them in place.

Drive screws in the posts, roughly 6 inches off the ground, and leave the heads protruding half an inch. Tie a string tightly between them. Use the string as a guide when you backfill and set subsequent poles.

Keep in mind that not every fence will be perfectly level. If your landscaping moves up or down, your fence may as well. This is normal, and minor adjustments can be made to the panels once the posts are in place if needed.

Next Step – After the layout is complete, it’s time to start the installation. Learn how to install a wood privacy fence, including setting the posts and attaching the rails and pickets.