Estimate the materials for a straight run of wood or vinyl fence. Enter the total length and post spacing to get the number of posts, sections and rails, and the picket width and gap to count pickets.
For fences with corners or gates, add an extra post at each corner and a post on each side of every gate.
How do you estimate fence materials?
A typical wood fence has posts, two or three horizontal rails between each pair of posts, and vertical pickets (boards) nailed to the rails. Posts are spaced 6–8 ft apart; 8 ft is the most common for wood because rails come in 8 ft lengths.
The number of sections is the fence length divided by the post spacing, rounded up, and you need one more post than sections — plus extra posts for gates and corners. Pickets are counted from the picket width plus any gap you leave between them.
How to use the fence calculator
- Enter the total fence length.
- Enter the post spacing, rails per section and picket width.
- Read the posts, sections, rails and pickets.
Formula
Sections = ⌈Length ÷ Post spacing⌉ · Posts = Sections + 1
Pickets = ⌈Length ÷ (Picket width + Gap)⌉ and Rails = Sections × Rails per section.
Worked examples
100 ft of fence, posts every 8 ft
- Units
- Imperial (ft, in)
- Total fence length
- 100 ft
- Post spacing
- 8 ft
- Rails per section
- 2
- Picket width
- 5.5 in
- Gap between pickets
- 0.5 in
- Posts
- 14
- Sections (panels)
- 13
- Rails
- 26
100 ÷ 8 = 12.5, so 13 sections and 14 posts. With two rails per section that is 26 rails, and 5½ in pickets with ½ in gaps need 200 pickets.
A 30 m fence with 2.4 m bays
- Units
- Metric (m, cm)
- Total fence length
- 30 m
- Post spacing
- 2.4 m
- Rails per section
- 3
- Picket width
- 10 cm
- Gap between pickets
- 2 cm
- Posts
- 14
- Sections (panels)
- 13
- Rails
- 39
30 ÷ 2.4 = 12.5, so 13 bays and 14 posts, with three rails per bay.
Posts and sections by fence length (8 ft spacing)
| Fence length | Sections | Posts |
|---|---|---|
| 24 ft | 3 | 4 |
| 50 ft | 7 | 8 |
| 75 ft | 10 | 11 |
| 100 ft | 13 | 14 |
| 150 ft | 19 | 20 |
| 200 ft | 25 | 26 |
| 300 ft | 38 | 39 |
Counting posts
A straight run needs one more post than sections. 100 ft at 8 ft spacing is 13 sections and 14 posts, because the last section is shorter. Each corner and gate needs its own posts, so add them for every change of direction.
Common mistakes
- Forgetting extra posts at corners and on each side of a gate.
- Setting posts at the rail length but measuring center to center from the wrong side, so rails don’t reach.
- Ignoring property-line surveys and local height limits before building.
Frequently asked questions
How far apart should fence posts be?
Usually 6–8 ft (1.8–2.4 m) for wood fences. Vinyl and pre-made panels have a fixed spacing set by the panel width.
How many rails does a fence need?
Two rails for fences up to about 5 ft tall, and three for 6 ft privacy fences to stop pickets from warping.
Do gates need extra posts?
Yes. Gate posts carry more load, so they are often heavier and set deeper than line posts.
Sources
- Fence and Wall Guidance, American Fence Association
- 2021 International Residential Code (IRC), International Code Council
Last updated · Calculations checked by automated tests· Editorial policy