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 type | Posts (3 sides) | 3 sides (100 ft) | 4 sides (120 ft) |
|---|---|---|---|
| Wood Privacy | 16 | $1,500–$2,500 | $1,800–$3,000 |
| Vinyl | 16 | $2,000–$3,500 | $2,400–$4,200 |
| Chain Link | 13 | $800–$1,500 | $960–$1,800 |
| Picket | 16 | $1,000–$1,800 | $1,200–$2,160 |
| Split Rail | 16 | $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
Pressure-Treated Fence Post 4×4×8
Ground-contact rated, ideal for all fence types.
$12 – $18
Cedar Dog-Ear Picket 1×6×6
Naturally rot-resistant, smooth on one side.
$3 – $6
Quikrete 60 lb Fast-Setting Concrete
Sets in 20-40 minutes. No mixing required.
$5 – $7
Post Hole Digger – Fiberglass Handle
Heavy-duty clamshell digger for clean holes.
$35 – $55
Simpson Strong-Tie Fence Bracket
Galvanized L-bracket for rail-to-post connections.
$4 – $8
Decorative Post Cap 4×4
Copper-top cap, fits standard 4×4 posts.
$5 – $12