Fence Line Length and Grade Slope Calculator

Calculate the true slope length of a fence line, grade percentage, slope angle, and number of posts needed based on horizontal distance and elevation change.

Formulas Used

True Slope Length (Pythagorean Theorem):
L = √(H² + R²)
where H = horizontal distance, R = rise (elevation change).

Grade Percentage:
G% = (R ÷ H) × 100

Slope Angle:
θ = arctan(R ÷ H)

Posts per Run:
Posts = floor(L ÷ spacing) + 1

Fence Panels per Run:
Panels = Posts − 1

Assumptions & References

  • Horizontal distance is the map (plan) distance, not the slope distance.
  • Elevation change is the total vertical rise over the entire horizontal run.
  • Post count uses slope length so posts are evenly spaced along the actual ground surface.
  • Sections are treated as independent runs; shared corner/end posts between sections are not deducted automatically.
  • Grade classifications follow common fencing industry guidelines: <5% gentle, 5–15% moderate, 15–30% steep, >30% very steep.
  • For stepped (stair-step) fencing, horizontal distance governs panel width; for racked fencing, slope length governs.
  • Formula reference: Pythagorean theorem (Euclid, Elements, Book I, Proposition 47).
  • Grade percentage formula per AASHTO and standard civil engineering practice.

In the network