The first fence I ever built was a long cedar privacy run that looked simple on paper. Then I pulled a string line and realized the backyard was not flat. Not even close. I had a high side, a low side, and a whole lot of choices to make about how the fence would “follow” the slope.
If you are staring at uneven ground and wondering whether to step your panels like stairs or rack them to hug the grade, you are in the right place. I am going to break down what each style really means, when it works best, and how to install it without ending up with weird gaps or wavy lines.

Before you dig
Two quick things I never skip now, because they are a lot harder to fix later.
- Confirm your line. Know where the property line actually is, and check HOA or permit requirements if they apply in your area.
- Locate utilities before you dig. Post holes and gates have a way of landing right where you do not want them to.
Stepped vs. racked basics
Stepped fencing
A stepped fence keeps each panel level, then drops down (or rises up) to the next panel like a set of stairs. You get a crisp, level top line panel by panel, but you also get triangular gaps under the panels unless you address them.
Racked fencing (also called raked)
A racked fence angles the rails so the section follows the slope. Instead of stepping down, the whole bay tilts. On a steady slope, this usually looks more continuous and keeps the bottom closer to the ground. If the grade rolls or changes mid bay, racking can still leave gaps because the fence line is straight and the ground is not.
Quick reality check: a lot of prebuilt privacy panels are not rackable. Many are framed square and meant to stay square. A true rackable setup is usually about the rail connections and layout, like swivel or slotted brackets, or building rails and pickets on site so you can set the rail angle without fighting a rigid frame.
Which one works best
For privacy, I start with one question: where will the gaps show from the neighbor’s side or from the street?
- Choose stepped if you care most about a straight, level look across the top, your slope changes abruptly, or you are using rigid prebuilt panels.
- Choose racked if your slope is steady and moderate, you want the bottom to stay closer to the ground, and you are building the sections in a way that can accommodate an angle.
My rule of thumb on steepness
If the grade change across one panel width is small, racking is usually cleaner. If the grade change across one panel width is large, stepping is usually easier and more controlled.
As a ballpark, if you are seeing something like 1 to 3 inches of rise over an 8 foot bay, racking tends to look natural. If you are seeing 6 inches or more over 8 feet, stepping is often the calmer choice for a privacy fence, especially with prebuilt panels. The middle zone can go either way and comes down to the look you want and whether your materials are actually rackable.
Instead of guessing, measure it. In the next section I will show you two simple ways.
Measure slope first
You do not need fancy surveying gear. You need a straight 2x4 or a long level, a tape measure, stakes, and string.
Method A: string line and drops
- Set two stakes where a fence run will start and end (or at least 16 feet apart).
- Run a tight string line between them at a consistent height off the ground (pick a height you can keep, like 12 inches above the higher end).
- Measure down to the ground at several points (every 2 to 4 feet is great).
- Calculate grade change per bay: look at the drop from one post location to the next. If you plan 8 foot bays, compare those points.
Method B: 8 foot run with a level
- Lay an 8 foot 2x4 along the ground in the direction the fence will run.
- Set a level on top and raise the downhill end until the board is level.
- Measure the vertical distance from the downhill end to the ground. That is your rise over 8 feet.
Use the straightest board you have. If the ground is bumpy, support the board at the ends (or at consistent points) so a random hump does not throw off your measurement.
Once you know the typical rise per 8 feet, you can decide whether stepping or racking makes more sense and how much you will need to adjust post heights.

Stepped fences and gaps
Stepped fences create a clean, intentional terrace effect. The tradeoff is that the bottom of a level panel will not match the ground line.
Common privacy problems
- Triangular gaps under the low end of each panel, especially on steeper slopes.
- Pet escape routes if you have a small dog that can nose under the low corner.
- Weed trimmer damage if you try to set panels too low to hide gaps and they end up contacting soil.
Ways to deal with gaps
- Set a consistent bottom clearance (often 2 to 4 inches) and accept smaller gaps as normal, then landscape under the fence line with a shallow swale or plantings.
- Add a rot board (pressure treated) along the bottom, stepped to match the panels. This reduces visible gaps and helps keep pickets out of ground contact.
- Regrade locally with soil to soften sharp dips, but do not bury wood where it will stay wet.
If you want more general privacy planning, I keep a running guide in the Privacy section.
How to build stepped
This is the most forgiving method when you are using prebuilt panels or you want each section dead level.
Tools and materials
- Posts (commonly 4x4 or 6x6 depending on height and wind exposure)
- Concrete and gravel for drainage (or your preferred footing method per local practice and code)
- String line, tape, line level or laser level
- Post level
- Panels or rails and pickets
- Exterior fasteners rated for treated lumber where needed
Step 1: Layout and spacing
Mark corners and run a string line. Decide your bay width based on panel size, usually 8 feet on center for standard panels. If you are building from rails and pickets, you still want consistent spacing for strength and looks.
Step 2: Set corners first
Get corners plumb and set them to a height that makes sense for your top line. Corners control everything, so I slow down here.
Step 3: Pick a step height
This is the vertical drop from one panel to the next. It is dictated by the slope and your panel length. If the drop looks awkward at 8 feet, you can often reduce it by shortening bays. More posts, smoother steps.
Step 4: Set line posts with a story pole
A story pole is just a scrap 1x2 or 2x2 with your key heights marked on it, like top of fence, top rail, bottom rail, and panel height. It keeps you from measuring the same thing 40 times and drifting off.
Step 5: Hang panels level
Start at the high end. Keep each panel level. When you reach the next post, drop the next panel the amount your slope requires. Repeat.
Step 6: Make the bottom edge look intentional
Do not ignore the gaps until the end. Walk the whole line and decide whether you will leave the clearance, add a rot board, or do a little regrading. The finished look on sloped ground is mostly about the bottom edge reading as a choice, not an accident.
If you are new to setting posts and keeping things square, you might also like my general DIY Installation & Maintenance hub.
How to build racked
Racked fencing is usually easiest when you are building rails and pickets on site instead of trying to force a rigid panel to tilt.
Fence styles that rack well
- Standard picket privacy with horizontal rails (flat top or dog ear both work)
- Board on board where you can float boards to follow grade
- Some horizontal slat designs if you keep spacing consistent and plan the layout carefully
Step 1: Set posts plumb and choose your reference line
With racking, you usually pick one visual line to read cleanly. That is often the top, but you can also prioritize the bottom. On a privacy fence, I tend to keep the top consistent and let the bottom float to match the slope as closely as practical.
Step 2: Install rails to match the slope
Instead of installing rails perfectly level, install them so they run parallel to the ground slope. The easiest way is to mark rail heights on each post based on measurements from the ground at that post.
Step 3: Keep pickets plumb
Even though the rails angle, your pickets stay vertical. That lets the bottom ends form a smooth line that mirrors the grade.
Step 4: Trim for a straight top if needed
If you want the top of the fence dead straight across a racked run, install pickets slightly proud, snap a chalk line, and trim. That is how you get the clean, custom look.

Rolling grades and transitions
Some yards do not have one clean slope. They roll. When that happens, I plan transition points on purpose.
- Shorten bays where the grade changes quickly. More posts gives you more control and a smoother look.
- Mix methods if you need to. I have racked a long steady stretch, then used one stepped section to get past a sudden dip or hump.
- Do not force a rack through a compound slope. If the ground is changing direction inside a single bay, stepping or shorter bays usually looks cleaner than a panel that is fighting the terrain.
Stepped vs. racked comparison
| Feature | Stepped | Racked |
|---|---|---|
| Best for | Steeper or changing slopes, prebuilt panels | Steady moderate slopes, build on site fences |
| Top line look | Level per panel with visible steps | Follows slope, or can be trimmed for straight top |
| Bottom gaps | More likely | Usually smaller on steady slopes |
| DIY difficulty | Simple layout, but gap control takes thought | More layout work, often a cleaner finish |
| Material waste | Lower if using standard panels | Can be higher if trimming tops or custom fitting |
Gates on slopes
Slopes complicate gates more than fence runs. If your gate swings downhill, it can scrape. If it swings uphill, it can stall out early.
Tips that save headaches
- Build gate posts stronger than line posts and set them deeper per local code and frost depth. Gate loads are real loads.
- Mock the swing before you set posts. I like using a straight board or a tape stretched to the gate width to trace the swing arc and find scrape points.
- Keep the gate area predictable if you can. Sometimes I step the fence but do a little regrade right at the gate so the swing clearance is consistent.
- Use quality hinges and latch hardware that can handle a little seasonal movement.
I keep hardware specifics and hinge discussions over in Gates & Hardware.
Materials that matter on uneven ground
When your fence is stepping or racking, you end up with more exposed end grain, more trim cuts, and often more spots where water can sit. Material choice and sealing habits matter.
- Cedar handles outdoor exposure well and is forgiving for DIY builds. If you are weighing options, see Cedar vs. Pressure-Treated Pine for Fences.
- Pressure-treated lumber is great for posts and rot boards, especially close to grade, but pay attention to compatible fasteners.
- Composite fencing can look sharp on a slope, but it is usually a system build with strict rules on racking. Read up at Composite Fencing Pros, Cons, and Costs.
- Vinyl often has limited rackability depending on the manufacturer, and extreme slopes can look awkward with tall gaps. More context here: Wood vs. Vinyl Fencing for Backyard Privacy.
Mistakes I see often
- Random post heights and trying to fix it with panels. Decide your top and bottom rules first, then set post heights intentionally.
- Ignoring the bottom edge until everything is built. Walk the line and make a plan for gaps early.
- Putting wood in constant soil contact to hide gaps. That is how you rot pickets and rails fast.
- Skipping the string line and letting the fence snake. Straight fences start with straight layout.
- Underbuilding gate posts on a slope. A sagging gate is annoying on flat ground and miserable on a hill.
FAQ
Can you rack standard prebuilt privacy panels?
Sometimes, but many standard framed panels are built square and do not rack well without stressing the frame. If the manufacturer does not call the panel rackable, assume it is not. For racking, a build on site rail and picket approach is usually safer.
Is stepping wrong or outdated?
Not at all. A stepped fence can look crisp and intentional, especially with a clean trim detail and consistent step heights. It is also a practical choice on steep or uneven grades where racking would look forced.
How much clearance should I leave under a privacy fence?
I typically aim for 2 to 4 inches at the tightest points to keep wood off soil and allow trimming. In wet areas, heavy snow zones, or spots where mulch builds up, a little more clearance can save you rot and headaches. On the low corners of stepped sections, the gap can be larger. That is where a rot board, light regrading, or landscaping helps the fence look finished.
What if I need privacy and cannot tolerate gaps?
Consider a stepped fence with a stepped rot board, or build on site and rack the rails while keeping pickets close to the ground within reason. You can also use plantings or hardscape along the low side to visually close the line without burying wood.
My recommendation
If your yard has a steady slope and you are building rails and pickets, I lean toward racked for a smoother bottom line and a more custom look. If your grade changes a lot, or you are using prebuilt panels, stepped is usually the cleaner and less stressful path.
Either way, the secret is the same: decide what line you want to look intentional, then build everything to support that decision. That is how sloped fences go from “we made it work” to “this was the plan all along.”