Plan Your Fence Materials
This fence calculator estimates the posts, rails and pickets you need to enclose a rectangular yard. Enter the yard length and width, the post spacing, the number of gates and the gate width. The calculator subtracts gate openings from the perimeter so you only buy what you need for the fence sections themselves.
How Fence Materials Are Calculated
- Perimeter = 2 × (length + width).
- Fence length = perimeter − (number of gates × gate width).
- Posts = fence length ÷ post spacing, rounded up, plus 1.
- Rails = posts × 2 (a top and bottom rail for each section).
- Pickets = fence length in inches ÷ 4, which assumes about 3.5-inch pickets with a small gap.
Example
A 35 ft × 15 ft yard has a 100 ft perimeter. With one 4 ft gate, the fence runs 96 ft. With posts every 8 ft you need about 13 posts, 26 rails and 288 pickets. Buy a few extra posts and pickets for corners, gate posts and any damaged boards.
Frequently Asked Questions
How far apart should fence posts be?
Most wood privacy and picket fences use 6–8 feet between posts. Use closer spacing (6 ft) in windy areas or for taller fences, and follow the manufacturer's guidance for vinyl and chain-link.
How deep should fence posts be set?
A common guideline is to bury about one-third of the post's length, and at least 2 feet. In cold climates, set posts below the frost line to prevent heaving.
Do I need extra posts for gates and corners?
Yes. Gates need sturdy posts on both sides, and every corner needs its own post. Add these to the total if your layout has more corners or gates than a simple rectangle.