The Fence Calculator
By Yard Dimensions

How Much Fence for a 20×40 Yard?

A 20 by 40 foot yard (800 sq ft) needs 120 feet of fence to enclose all four sides, or 100 feet if your house covers one 20-foot side.

Quick Calculator

Posts

16

Concrete

32

Pickets

320

Rails

39

Est. Cost

$1,500–$2,500

Fence Footage for a 20×40 Yard

The perimeter of a rectangle is 2 × (width + depth). For 20 × 40, that is 2 × 60 = 120 feet. Most backyard fences only run three sides because the house closes off the fourth: one 20-foot back line plus two 40-foot sides, or 100 feet. If your fence returns to the house partway along the side, measure that actual run instead.

For a wood privacy fence on three sides you'd buy about 16 posts, 32 bags of concrete, 39 rails, and 320 pickets. Enclosing all four sides raises that to 18 posts and 384 pickets.

Cost to Fence a 20×40 Yard by Type

Fence typePosts (3 sides)3 sides (100 ft)4 sides (120 ft)
Wood Privacy16$1,500–$2,500$1,800–$3,000
Vinyl16$2,000–$3,500$2,400–$4,200
Chain Link13$800–$1,500$960–$1,800
Picket16$1,000–$1,800$1,200–$2,160
Split Rail16$1,000–$1,800$1,200–$2,160

Material estimates with one walk gate. Professional installation typically adds $5–$15 per foot.

Other Yard Sizes

Recommended Materials

Frequently Asked Questions