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
Fence line to buildft
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.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
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.
- Units: switches the fields between the two unit systems.
- Yard length, in ft: enter 0 or more.
- Yard width, in ft: enter 0 or more.
- Length left unfenced, such as the house wall, in ft: enter 0 or more.
- Total width of gate openings, in ft: enter 0 or more.
- Post spacing, in ft: enter 1 or more.
- 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
| Symbol | Meaning | Unit |
|---|---|---|
| Yard length | ft | |
| Yard width | ft | |
| Length left unfenced, such as the house wall | ft | |
| Yard perimeter | feet | |
| Fence line to build | ft | |
max(a, b, …) | the largest of the values. |
Worked example
| Yard length | 100 ft |
|---|---|
| Yard width | 60 ft |
| Length left unfenced, such as the house wall | 0 ft |
| Total width of gate openings | 4 ft |
| Post spacing | 8 ft |
| Yard perimeter (feet) | 320.0 |
|---|---|
| Fencing after gates (feet) | 316.0 |
| Fence sections between posts | 40 |
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.