How to Build a Fence on a Slope

Fence built on sloping ground with planters.
Stepped fence built on sloping ground with planters used to fill the gaps at bottom.

Building a fence on a slope can be challenging, since the posts and pickets remain plumb regardless of the slope of the ground below it. How you solve the problem depends on whether you’re building a fence from scratch or using preassembled fence panels.

Building a Fence with Individual Pickets

When constructing a fence from individual pickets, each picket can be staggered or “racked” to follow the contour of the land. This strategy only works when you’re building a fence from scratch and are attaching each picket separately – it won’t work with preassembled fence panels.

Racked fence with individual pickets following the slope.
Racked fence with individual pickets following the slope.

One advantage of a racked fence is that the length of the posts and pickets remains the same throughout, regardless of the slope. Since you’re building the fence from scratch, it can hug the ground in a close curve without gaps under it.

Start by setting the posts plumb and at the same height from the ground. The horizontal rails are then attached between the posts parallel to the ground, rather than level. Finally, the pickets are individually secured to the rails so each one follows the contour of the slope.

Building a Fence with Preassembled Panels

When building a fence on a slope using preassembled panels, the entire panel is stepped up or down so it remains level. The posts are installed plumb, and each panel steps lower or higher as the grade changes. This allows the overall line of the fence to follow the slope in a stair-step fashion.

Stepped fence built using preassembled panels.
Stepped fence built using preassembled panels.

When building a stepped fence, the posts on the slope need to be longer to accommodate the extra height of the fence panel. Each post is installed and cut to length individually, depending on the slope at that particular spot.

Filling Gaps in a Stepped Fence

Since the panels on a stepped fence are level, there are gaps at the lower end of each panel. If you have children or pets that need to be contained in the yard, these gaps will need to be filled.

One way to fill the gaps at the bottom of a stepped fence is by constructing raised planters next to the fence. This allows the fence to double as valuable gardening space.

Raised bed planters used to fill the gaps at the bottom of the fence above.
Raised bed planters used to fill the gaps at the bottom of the fence above.

If your yard has a short rise or dip, it may be possible to scribe the bottom of each preassembled panel and cut it to follow the contour of the ground.

Further Information


  1. This info saved me hundreds of $$. We just cancelled an estimate inspection to have a fence professionally installed. I have done this before at my home. I had no idea what do with this slope if I use the lattice top piece. Use a planter to fill the gap! Great!

  2. You also have to be mindful of drainage. Sometimes fences on slopes or hills can cause drainage issues and you can have problems with soil erosion which can wash away the soil under your fence. Putting trees close to the fence can prevent those issues.

    Good post, the planter boxes are a nice touch.

  3. Hi I want to install 11 × 6 f panels,and concrete posts .The first 2 will be level then the path has a slight slope running the rest of the garden Will I have a problem with the remaining posts.

  4. Some things I learned about fences after buying a a house with a beautiful, but rotting, fence:

    If a slope is fairly small, it may be beneficial to level it instead of modifying the fence. Just make sure to consider drainage and soil movement.

    Avoid soil when installing the pickets, and don’t allow it to build up against the fence over time. The bottom of the fence will rot away and you’ll be faced with either replacing the fence or closing the gaps. Additionally, the weight of the soil can cause your fence to start leaning.

  5. Good advice for the homeowner doing a fence themselves. It can benefit anyone in need of some sound advice esp. with a sloped yard.

    • Hi, Dennis,

      We are so happy to hear that you enjoy “Today’s Homeowner!”
      If you haven’t already, please…

      *Follow us on Facebook:
      *Like us on Twitter: https://.com/DannyLipford
      *And check out Instagram and Pinterest pages! ( and

      And we always appreciate when our fans tell their friends about the practical home improvement advice they receive from “Today’s Homeowner.”

      Thanks so much for watching — take care!