What It Is
The Rectangle Fence Perimeter Calculator quickly tells you how much fencing material you need to enclose a rectangular yard, garden, paddock, or lot. Enter the length and width, and it returns the total perimeter — the distance around all four sides — along with the enclosed area.
How to Use It
Measure the two sides of your rectangular space in feet. Type the longer dimension into Length and the shorter into Width (the order does not affect the result). The calculator instantly shows the total feet of fencing required and the square footage enclosed, helping you estimate materials and cost.
The Formula Explained
A rectangle has two pairs of equal sides. The perimeter is the sum of all four sides, which simplifies to:
$$P = 2 \times (L + W)$$
Adding length and width gives one "long-plus-short" pair; multiplying by 2 accounts for the matching pair on the opposite sides. The enclosed area uses \(A = L \times W\).
Worked Example
Suppose your backyard is 50 ft long and 30 ft wide. The perimeter is $$2 \times (50 + 30) = 2 \times 80 = 160 \text{ feet}$$ of fencing. The enclosed area is $$50 \times 30 = 1{,}500 \text{ square feet}.$$ If fence panels come in 8-foot sections, you would need \(160 \div 8 = 20\) panels (plus posts and a gate).
Practical Fencing Tips
- Round up and add a margin. Fence is sold in whole panels or rolls, so round up to the next whole unit. Then add about 5-10% extra for waste, cuts and mistakes.
- Handle gates separately. Subtract each gate opening from the panel or rail footage, but keep the gate posts. Gate posts usually need to be sturdier than line posts.
- Check that the yard is really rectangular. Mark the corners and measure each side separately. Opposite sides should match. Also measure both diagonals: in a true rectangle they are equal. If they differ, the corners are not square and the perimeter formula will be off.
- Check the rules before you build. Local setback rules, easements, height limits and property lines vary by location. Confirm them with your local authority or a survey before digging.
This is general information for planning, not professional construction or legal advice.
Perimeter and Area for Common Yard Sizes
Every value uses \(P = 2(L + W)\) and \(A = L \times W\), with lengths in feet.
| Length (ft) | Width (ft) | Perimeter (ft) | Area (sq ft) |
|---|---|---|---|
| 20 | 20 | 80 | 400 |
| 40 | 30 | 140 | 1,200 |
| 50 | 30 | 160 | 1,500 |
| 60 | 40 | 200 | 2,400 |
| 100 | 50 | 300 | 5,000 |
Same Perimeter, Different Shapes (160 ft of fence)
| Length (ft) | Width (ft) | Perimeter (ft) | Area (sq ft) |
|---|---|---|---|
| 70 | 10 | 160 | 700 |
| 60 | 20 | 160 | 1,200 |
| 50 | 30 | 160 | 1,500 |
| 40 | 40 | 160 | 1,600 |
With the same 160 ft of fence, the enclosed area grows as the shape gets closer to a square. The 40×40 square encloses 1,600 sq ft, more than twice the 700 sq ft of the long 70×10 rectangle.
Estimating Posts and Panels from the Perimeter
- Compute the perimeter: \(P = 2(L + W)\).
- Subtract gate width: take each gate opening out of the length that needs panels or rails.
- Divide by the section or post spacing (commonly 6 ft or 8 ft) and round up to a whole number of sections.
- Count the posts. In a closed rectangular loop, the number of posts equals the number of sections, because the last section meets the first post.
- Add extra posts if needed for gate hardware, heavier corner posts or any bracing.
Example: 160 ft with 8 ft spacing
A 50 ft × 30 ft yard has \(P = 2(50 + 30) = 160\) ft. With posts every 8 ft:
$$\text{Sections} = \frac{160}{8} = 20$$
The closed loop therefore needs 20 sections and 20 posts. If the sections are 6 ft instead, \(160 / 6 \approx 26.7\), which rounds up to 27 sections. Spacing is then slightly adjusted so the sections fit evenly. Remember to add a 5-10% allowance for waste, and to adjust the count if a gate replaces one of the sections.
FAQ
Does it matter which side is length vs width? No. Because the formula adds the two dimensions, swapping them gives the same perimeter.
Should I subtract for a gate? The perimeter is the full enclosure. Subtract your gate width afterward if you only want fencing material, or keep it for ordering posts.
Can I use meters instead of feet? Yes — the math is identical. Just enter your measurements in the same unit and the result will be in that unit.