How to Build a Fence on a Slope: Raked and Stepped Methods

If you’re on the fence about your hilly lawn, try these designs

​​Empty hammock hanging in backyard
Photo: The Good Brigade / DigitalVision / Getty Images
​​Empty hammock hanging in backyard
Photo: The Good Brigade / DigitalVision / Getty Images
Get quotes from up to 3 pros!
Enter a zip below and get matched to top-rated pros near you.
Geo Icon

You may have the best sledding hill in town, but can you build a fence on a sloped lawn? Fences of all kinds work just as well on a hill with the right design. On the other hand, learning how to build a fence on a slope has a bit of a learning curve—especially on a curved lawn—so it's best to look at all your options and call in a fencing pro when in doubt.

How to Measure the Slope of Your Lawn

The best way to measure the slope of your lawn is to place two stakes in the ground between two points of your intended fence. Next, tie a mason line between the two points. 

Remember the old "rise over run" equation from middle school math? Measure the distance between the string and the ground at the top stake and the bottom stake to calculate the slope. Subtract the distance at the bottom of the hill from the top and divide it by the full length of the string. Et voilà, you have your slope.

Racked and Stepped Fences, Explained

If you're ready to jump into your fencing project, you may be surprised that your yard is more sloped than you previously thought. Unless your fence sits on a fully leveled ground or patio, you will likely end up with at least a few discrepancies between the bottom of the fence and the yard.

However, small dips and divots aside, a sloped lawn requires specialized DIY fence installation to keep your yard looking nice and standing tall.

You have two main options when it comes to building a fence on a slope, depending on how steep the slope is: a raked fence (also known as a racked or contour fence) and a stepped fence.

If your hill has a slope below 15 degrees, a raked or racked fence will do just fine. A raked fence follows the slope of your lawn. While the posts and pickets remain plumb (perfectly vertical), the rails will slope and sit at an angle.

A stepped fence (or stair-step fence) works best for a hill with more than a 15-degree slope. The fence will follow the hill in pieces or steps. There will be uneven space between the ground and the bottom of the fence, but the rails will be level and the posts and pickets plumb.

How to Build a Raked Fence on a Slope

Stepped rail wood property fence
Photo: Candyspics / iStock / Getty Images Plus / Getty Images

A racked fence comes with a variety of names, including raked or contour fence. No matter its name, this type of fence moves with the rise and fall of your yard. Each post and picket will sit higher or lower than the next one, depending on the shape of the hill. However, they will all still sit fully plumb or upright.

Building a racked fence will follow the same steps as a standard fence, with a few variations.

Measure and Mark Your Fence Line

Always begin by marking out a plan for your fence. Ensure the fence stays inside your property line, and call 811 to confirm the location of any utility lines. When you’re ready, move on to these steps:

  1. Mark the two ends of your fence line with wooden stakes, and use the mason line from earlier to attach them.

  2. Measure the distance between your proposed posts and mark it on the string with tape. The measurement will often fall between 5 and 8 feet, but this may depend on whether you're using a premade fence panel.

  3. Attach a plumb bob (a string with a heavy weight at the bottom) to each part of your string above where the posts will go. Mark the spot on the ground just above the plumb bob with a utility flag or spray paint.

Install Your Posts

The posts are the vertical anchoring beams that secure your fence to the ground. Remember, all vertical parts of your racked fence will sit plumb and upright. They will not slant in the direction of the hill. 

  1. Measure a hole three times your post's diameter and as deep as at least a third of the post's height. 

  2. Drive a post-hole digger lightly into the ground to remove the earth. Work slowly until you've reached the right depth and width. Follow the length of your string and dig each post hole before continuing.

  3. With the help of a friend, place the first post in the hole and check that it’s plumb. A standard level should ensure that your post is fully upright.

  4. Fill the base of the post hole with 3 inches of soil and gravel to encourage groundwater drainage.

  5. Mix your concrete and fill the hole to just below the base of the hole. Allow the concrete to set, bracing the post in the right position with bricks if you need to leave it overnight.

Important note: Due to the slant of your lawn, you may need to check the bottom of your post hole several times to ensure it’s level. The post must be level for the fence to sit properly.

Attach Your Rails

If you want to make things a little easier on yourself, a professional fence team can help you order the correct pre-constructed panels for the slope of your lawn. For example, a pro to vinyl and metal fences is that they often come in premade panels. 

However, if you're constructing a wooden picket, privacy, or split-rail fence, you may end up attaching the rails and pickets on your own.

  1. Attach the mason line to the top of two fence posts. You'll need this angle to match the slope of the hill for each rail. Rails typically sit approximately 8 inches off the ground and 8 inches from the top of your posts.

  2. Matching the slope of the mason line, attach both rails to the posts with two 3-inch masonry screws. If you're working with a post between two rails, only attach the rail to half of the face of the post to leave room to butt the second one up against it.

Quick fencing tip: Rails and pickets typically sit away from your home, facing the street or your neighbor.

Attach Your Pickets or Panels

In this design, the height of your pickets will follow the slope of your yard but retain an even slope up or down between the posts. Your masonry line will really come in handy here. 

  1. Measure at least 2 inches from the ground to mark where the first rail sits. The 2-inch space allows water to flow under your fence.

  2. Hold the first picket flush with the post and check that it’s plumb. Measure the distance between the masonry line—you can also use the top of the top rail—and the top of your picket.

  3. Secure your first picket to your rails with brad nails and a pneumatic brad nail gun. As you move down the hill, the top of each picket should always be the same distance from the masonry line or the top of the rail. This will ensure that you maintain the same even slope created by the rail. 

How to Build a Stepped Fence on a Slope

 A new stair step wooden fence
Photo: davelogan / iStock / Getty Images Plus / Getty Images

Building a stepped fence is a bit simpler on a hill, especially for slopes steeper than 15 degrees. Remember that you will get a different look when installing a stepped fence, one with an uneven level of space between the base of the fence and the ground.

We highly recommend using preconstructed fence panels for a stepped fence. Doing so will make the process easier than checking for plumb on the hill with each picket. Here are the basic steps to follow if you're constructing a wood fence from scratch—no matter the style.

Measure and Mark Your Fence Line

Begin by sketching out your fence with measurements so you can get an idea of the shape you're going for. The rails on a stepped fence will still be fully vertical, and the pickets will sit in line with one another. Each panel of rails and pickets will move downward together in steps, hence the name.

  1. When measuring for your stepped fence, place two tall stakes in the ground between the top and bottom of one side of your fence. This time, string a mason line between the top of the two stakes and level it.

  2. Measure the space between the bottom of the string and the ground to check the drop of the slope in that part of the hill. 

Install Your Posts

Follow the instructions we used above to mark and install your posts. Ensure that your posts are level and secured in the ground with well-draining concrete footings. Allow the concrete to set and check frequently to ensure it remains level.

Once you determine the number of posts and fencing sections, divide the total drop of your fence by the number of sections to determine the drop for each section. For example, if the drop is 24 inches and you have six sections of fence, each section will drop 4 inches. 

Measure for the Rails

To ensure the fence is pleasing to look at, your posts should follow the overall slope of the ground even though your panels sit level.

  1. Break out the mason line again and tie it to your first post according to your drop measurement. In our example, this will be 4 inches down from the top.

  2. String the line to your next post and ensure the line is level. Mark the place where the line connects with this post. The line you just made is the new top of the second post. Cut off the top of the post where you made your mark.

  3. Repeat the process between your second and third posts. Measure down 4 inches from the top of the second post and string the line to the third. Cut and continue.

Attach Your Panels, Rails, or Pickets

Attaching the vertical parts of your stepped fence should now be quite straightforward. 

  1. Use your mason line one more time to mark the space between the two posts for the top rail. In most cases, this is between 7 and 8 inches down from the top, but it varies depending on your design.

  2. Secure the level rail between two posts with 3-inch masonry screws.

  3. Attach your pickets between the two posts with brad nails. Remember, they will sit side-by-side, and the tops and bottoms will line up exactly. 

Tips for Installing a Fence on Uneven Ground

Slanted street with fence
Photo: Tsvi Braverman / EyeEm / Getty Images

Installing a fence on uneven ground can be frustrating if you're not used to the fence installation process already. If you choose to go it alone, here's how to avoid some complications:

  1. Preconstructed fence panels designed for slopes are often easier to install than measuring and securing individual rails and pickets yourself.

  2. Consider filling in small ground-level changes with gravel or soil when possible for a more even slope.

  3. Bring in a friend to help you confirm that your posts are plumb. The extra set of hands can simplify the process.

  4. Always leave space under the bottom of your pickets for water to flow, particularly at the base of a hill.

  5. Paint or stain wooden fence pieces before installation to avoid an uneven look.

DIY vs. Hiring a Pro to Build a Fence on a Slope

While you can save up to 50% of the total cost to build a wood fence by doing it yourself, this is an advanced DIY. Call a professional fence company near you for an estimate if you are unsure about whether you want to go it alone.

Hiring a pro may also reveal options for building the fence you could have previously missed. Custom-made fences can specifically fit the unique flow of your yard, patio, or poolscape, so it's best to call a pro when working with tricky areas.

Due to the very wide range of types of fences, you'll pay anywhere from $1 to $45 per linear foot for the cost of professional fence installation. Building a fence on a slope will push the labor costs higher since more work is involved in measuring the slope and adjusting the posts.

Installing a fence on your own can save about 50% on labor, but prices will fluctuate depending on whether you can purchase wholesale materials as a local company would.

Frequently Asked Questions

The maximum recommended slope on which you can build a racked or stepped fence is 45 degrees. After that, construction becomes quite tricky and may require the use of retaining walls or terraces to make the fenced area flatter.

Fixing a depression in your lawn is a DIY for small dips, divots, or slight slopes. You can either remove sod and earth to lower the uneven ground or add premixed topsoil and reseed the lawn to raise it. You can also hire a yard grading company near you for professional help.

Pickets should sit at least 2 inches off the ground to encourage groundwater to flow underneath. Pickets can sit as much as 6 inches off the ground, but setting it any higher could let pets in or out of your yard unintentionally. These are not to be confused with the fence posts anchored underground with soil or concrete footing.

Need professional help with your project?
Get quotes from top-rated pros.
The homeowners guide to fencing services
From average costs to expert advice, get all the answers you need to get your job done.
Swimming Pool Fence
Dec 18, 2024
Dec 18, 2024
Pool fence costs depend on the type of fencing and the size of your pool. This guide will help you figure out the true cost of pool fence installation.
House with wrought iron fence
Jan 10, 2025
Jan 10, 2025
Wrought iron fences offer a classic look and decent security. Use this wrought iron fence cost guide to see what it would cost to install on on your property.
a light wood privacy fence surrounds a private yard with plants, bushes, a bench, and gravel
Dec 14, 2024
Dec 14, 2024
How much a privacy fence costs depends on several factors, including the size of the fence and the material used. Our cost guide breaks down these and other factors.
Child looking at a sheep poking through the fence
Feb 9, 2024
Feb 9, 2024
If you’re considering adding a wire fence to your property, you have choice. Keep reading for a breakdown of 10 types of wire fences.
A group of friends hanging out in a backyard at a picnic table surrounded by a dark wooden privacy fence
Dec 1, 2023
Dec 1, 2023
You have the right to feel safe in your backyard. If your home is easily visible from the road or a neighbor’s property, consider these privacy fence ideas.
GRAY HOUSE WITH VINYL FENCE
Nov 3, 2023
Nov 3, 2023
If you have a little experience, vinyl fence installation is a straightforward DIY. Learn how to install a vinyl fence from the first post to the last.
Share project details to get started.