Skip to content
FiftyCalc Free calculators for all 50 states

Fence Perimeter Calculator

Test cases replayed : 2 of 2 match · Methodology · No outside source listed

Enter the yard size, any side you don't fence (such as along the house) and the gate widths.

Result

Sample figures

Fence line to build—ft

Yard perimeter (feet) —

  • Fencing after gates (feet)—
  • Fence sections between posts—

The unit choice applies to the fields you fill in. Results stay in the units written with them.

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Fence Perimeter Calculator

Units: switches the fields between the two unit systems.

Yard length, in ft: enter 0 or more. Prefilled example: 100.

Yard width, in ft: enter 0 or more. Prefilled example: 60.

Length left unfenced, such as the house wall, in ft: enter 0 or more. Prefilled example: 0.

Total width of gate openings, in ft: enter 0 or more. Prefilled example: 4.

Post spacing, in ft: enter 1 or more. Prefilled example: 8.

Affiliate link

This is an affiliate link. As an Amazon Associate I earn from qualifying purchases. This does not change the result.

Search Amazon for fencing and fence installation supplies. Visit Amazon

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Units: switches the fields between the two unit systems.
  2. Yard length, in ft: enter 0 or more.
  3. Yard width, in ft: enter 0 or more.
  4. Length left unfenced, such as the house wall, in ft: enter 0 or more.
  5. Total width of gate openings, in ft: enter 0 or more.
  6. Post spacing, in ft: enter 1 or more.
  7. Read the result: Fence line to build; the panel also shows Yard perimeter (feet), Fencing after gates (feet) and Fence sections between posts.

How this calculator works

Perimeter of a rectangle = 2 × (length + width). The fence line is the perimeter minus any side left open; the fencing to buy excludes the gate openings.

Sections = fencing length ÷ post spacing, rounded up. Posts depend on the layout: a straight run needs sections + 1, a closed loop as many posts as sections, plus gate posts.

The formula

  1. Per=2×(L+W)
  2. Run=max⁡(0,Per−s)
Symbols used in the formula
SymbolMeaningUnit
LYard lengthft
WYard widthft
sLength left unfenced, such as the house wallft
PerYard perimeterfeet
RunFence line to buildft
max(a, b, …)the largest of the values.

Worked example

Yard length100 ft
Yard width60 ft
Length left unfenced, such as the house wall0 ft
Total width of gate openings4 ft
Post spacing8 ft
Yard perimeter (feet)320.0
Fencing after gates (feet)316.0
Fence sections between posts40
  1. Per=2×(100+60)=320
  2. Run=max⁡(0,320−0)=320

Fence line to build 320.0 ft

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

How much fence for a 100 × 60 ft yard?

The perimeter is 2 × (100 + 60) = 320 feet.

How do I handle an irregular yard?

Measure each side and add them; the rectangle formula only applies to four straight sides at right angles.

Questions answered

Related calculators