Stepped or racked: how to fence a slope

Step a fence when its panels must stay level or can’t be racked, like preassembled wood panels; rack it when the gap underneath has to stay even, as at a pool barrier. Each step is the drop across one section: 24 in over four 8 ft sections is 6 in.

On sloping ground a fence can step down in level panels, or rack so each panel follows the ground. Which one works depends on how steep the slope is, what the panels are made of, and how big a gap under the fence you can accept. Measure the slope first; the rest follows from it.

Figures checked by Matt Tay (Tay Tzu Haw)

Stepped and racked, side by side

A stepped fence is built from level panels. Each panel sits lower than the one above it, so the top of the fence drops in steps and the posts stand at different heights. A racked fence, which Home Depot calls contoured, tilts each panel to follow the ground while the pickets stay plumb. Its top and bottom run parallel to the slope.

FeatureSteppedRacked
PanelsLevel, each one lower than the lastTilted to the slope, pickets plumb
Gap under the fenceGrows along each panel, from the clearance to the clearance plus the stepStays the same along an even slope
PostsThe top post is shortest; each lower post is taller by the step it carriesAll the same height
Panels that workAny, including preassembled wood panelsBuilt on site, or prefabricated up to the maker’s rack limit
In the example belowPosts 74 in and 80 in; gaps 2 to 8 inPosts all 74 in; gap 2 in

Neither is better everywhere. Stepping keeps every panel level and works with any panel. Racking keeps the bottom of the fence close to the ground all the way along, which matters wherever an open gap is a problem, such as a pool barrier or a yard that has to hold a small dog. The fence on a slope calculator works out both layouts for your fence line.

Measure the slope first

Home Depot’s guide measures a slope this way. Drive a stake at the top of the fence line and another at the bottom. Tie a string to the top stake at ground level, stretch it to the bottom stake, and level it with a line level. The distance from the string down to the ground at the bottom stake is the drop. The length of the level string is the run. Measure the run along the string, not along the ground, or a steep slope will read long.

slope % = drop ÷ run × 100angle = arctan(drop ÷ run)

Take 11 in of drop over 10 ft of run. Put both in inches before you divide: 11 ÷ 120 = 0.092, a 9.2% slope, or about 5¼°.

On a long run, drive stakes in between as well. They keep the string from sagging, and they show dips and humps where the ground isn’t one even slope. Where the slope changes along the line, plan each section from its own drop.

How a stepped fence works

Each panel steps down by the drop across its own section: the slope times the section’s width. Home Depot’s rule, “Divide the overall drop of the fence by the number of sections,” gives the same step when every section is the same width, but not when the run leaves a shorter one at the end. Each panel hangs level, so the gap under it grows from the clearance you choose at its high end to the clearance plus its step at its low end. Every post below the top one has to reach the top of the panel above it, so it stands taller than the top post by that panel’s step.

slope = drop ÷ runstep = slope × section widthgap (high) = clearancegap (low) = clearance + steptop post = height + clearancelower posts = top post + step above

Worked example: 24 in of drop over 32 ft

  • The slope is 24 in over 384 in, or 6.25% (about 3.6°).
  • In four 8 ft sections, each panel steps 96 × 6.25% = 6 in lower than the one above it: the same as 24 ÷ 4, since the sections are all 8 ft.
  • With 6 ft (72 in) panels and a 2 in gap, the top post stands 72 + 2 = 74 in above the ground and the other four stand 74 + 6 = 80 in.
  • The gap under each panel runs from 2 in at its high end to 2 + 6 = 8 in at its low end.

Shorter sections make smaller steps, at the cost of more posts. With 6 ft sections the same slope steps 72 × 6.25% = 4½ in per panel, and the largest gap shrinks to 6½ in. But 32 ft then takes six sections (five of 6 ft and one of 2 ft), so seven posts instead of five. Here dividing the drop by the sections gives the wrong step: 24 ÷ 6 = 4 in, when the five full panels step 4½ in each and the 2 ft (24 in) one only 24 × 6.25% = 1½ in.

Stepping works with any panel, and it’s the only choice for preassembled wood panels: Home Depot’s wood panel instructions say they “can only be installed using the step method.”

How a racked fence works

On a racked fence the rails run parallel to the slope and the pickets hang plumb, so on an even slope the gap under the fence stays the same from end to end. Every post stands the same height: in the example above, 72 + 2 = 74 in, with each 8 ft panel racked 6 in. Home Depot’s contoured method keeps the bottom rails “3 or 4 inches off the ground.”

Panels built on site from posts, rails and pickets can follow any slope, since you set the rails yourself. Prefabricated panels rack only as far as their maker rates them.

Racking also pulls a panel’s ends closer together. The rails tilt, so they cover less level ground than their length. Ameristar’s chart shows how much: a 94 in rail racked 48 in covers 80.8 in of level ground, 13.2 in less than its length.

level span = √(rail² − rack²) = √(94² − 48²) = 80.8 in

Freedom’s aluminum guide warns of this: “Installing on sloped terrain will reduce distance between posts.” Lowe’s metal fence tips agree: “Racking panels reduces the post spacing.” On a slope, set each post to the racked panel rather than to a mark measured on flat ground.

How far common panels rack

A rack limit is how far one end of a panel can sit below the other. To check a panel, compare its limit with the drop across one panel width on your slope.

PanelRacks up toAs a slope
Freedom aluminum, 6 ft (sold at Lowe’s)38 inAbout 53%
Freedom aluminum, 8 ft (sold at Lowe’s)48 in50%
Barrette Brilliance aluminum, 6 ft (Home Depot)38 inAbout 53%
FORGERIGHT Vinings aluminum, 6 ft (Home Depot)26 in (22°)About 36%
Jerith Liberty aluminum, 6 ft11 in (9°)About 15%
Jerith Liberty Hill Country aluminum, 6 ft26 in (22°)About 36%
Freedom ready-to-assemble vinyl, 6 ft Everton or 8 ft Bolton1 in per foot: 6 in or 8 inAbout 8%
WamBam vinylRails cut at an angle over 10°; call WamBam over 15°About 17.6% / 26.8%
Preassembled wood panelsStep only—
Wood built on siteAny slope—

The slope column divides the rack by the panel’s width (38 ÷ 72 for a 6 ft panel), the cautious reading; the degree figures are the makers’ own. Brand names identify products only.

WamBam, a vinyl fence maker, gives its limits in degrees and asks you to contact it about slopes over 15°. To compare degrees with percentages, take the tangent:

slope % = tan(angle) × 100tan 10° × 100 = 17.6%tan 15° × 100 = 26.8%

On the 6.25% slope in the example, a 6 ft panel has to rack 72 × 6.25% = 4½ in and an 8 ft panel 6 in. Freedom’s vinyl panels can take that (6 in and 8 in), and the aluminum panels have room to spare. On that 9.2% example slope, a 6 ft Everton panel would need 72 × 9.2% = 6.6 in, more than its 6 in. A fence there would step those panels, switch to panels that rack farther, or be built on site.

Closing the gaps under a stepped fence

A stepped panel is level, so the ground falls away beneath it. The gap at its low end is the clearance plus the full step: 8 in in the example. The usual fixes:

  • Raise the soil under each panel toward its low end.
  • Add a kickboard, a treated board along the bottom of the fence that follows the ground.
  • Use shorter sections, so each step is smaller: 4½ in instead of 6 in in the example.
  • Rack the fence instead, if the panels allow it.

Pool barriers

Section 305.2.1 of the 2021 International Swimming Pool and Spa Code allows no more than 2 in between a pool barrier and the ground where the ground isn’t solid, such as grass or soil. A stepped pool fence has to close every gap to that. A racked fence with a 2 in clearance starts there, but check under each panel for dips. Confirm the rule that applies with your building department.

Post heights and lengths

On a stepped fence the posts aren’t all the same height above ground, so they aren’t all the same length either. Home Depot and Quikrete both put about a third of a post’s length in the ground. That works out to half the height above ground:

depth = height above ground ÷ 2length = height above + depth
  • A post standing 80 in needs 40 in in the ground and 120 in overall: a 10 ft post.
  • A post standing 74 in needs 37 in in the ground and 111 in overall.

So the stepped example needs one post 111 in long and four 120 in long; racked, all five are 111 in. The fence materials calculator counts the posts, rails, pickets, screws and post-hole concrete for the whole run.

Sources for the numbers on this page

  1. The Home Depot: How to build a fence on a hill (stepped and contoured fences) · checked
  2. The Home Depot: How to build a fence (post spacing, hole depth, rails and pickets) · checked
  3. WamBam Fence: How to deal with sloping ground · checked
  4. Freedom Outdoor Living: Frequently asked questions (how far panels rack) · checked
  5. Freedom Outdoor Living: Everton vinyl fencing (racking) · checked
  6. Freedom Outdoor Living: Bolton vinyl fencing (racking) · checked
  7. Freedom Outdoor Living: Aluminum fence installation guide, sold at Lowe’s (PDF) · checked
  8. Barrette Outdoor Living, via The Home Depot: Brilliance standard-duty aluminum fence panel, 6 ft wide (racking) · checked
  9. FORGERIGHT, via The Home Depot: Vinings aluminum fence panel, 6 ft wide (racking) · checked
  10. Jerith: Liberty aluminum fence (rackability) · checked
  11. Ameristar: Montage comparison chart (rake and grade by style, PDF) · checked
  12. Lowe’s: Decorative metal fence installation tips: installing posts and panels (PDF) · checked
  13. The Home Depot: Wood fence panel installation instructions (PDF): preassembled panels are stepped, not racked · checked
  14. International Code Council, via Town of Thompson’s Station, Tennessee: 2021 ISPSC chapter 3, section 305.2.1: clearance under a pool barrier (PDF) · checked
  15. Quikrete: Setting posts — project instructions · checked

Corrections and updates are logged on the sources page.