Home › Home and Building Calculators › Fence Calculator
Fence Calculator
Count the posts, sections, rails and pickets for a fence line, with gates taken out of the run.
Use this when: you are planning a wood or vinyl fence and need a shopping list of posts, rails and pickets. Need concrete for the posts? Use the Concrete Calculator.
Last updated: November 6, 2026. Free, runs in your browser, nothing is saved.
How this fence calculator works
Enter the total length of the fence line and the width of one section, which is the distance between posts (8 feet is common for wood panels and rails). Gates are taken out of the run, then the calculator counts the sections, the posts, the rails and the pickets. Pickets are counted for a picket-style fence; if you buy ready-made panels, use the number of sections instead of pickets.
The formulas
Fence run = total length − gates × gate width. Sections = fence run ÷ section width, rounded up. Posts = sections + 1, plus one extra post for each gate. Rails = sections × rails per section (2 for a low picket fence, 3 for a 6 ft privacy fence). Pickets = fence run × 12 ÷ (picket width + gap), rounded up.
Example
For 100 feet of fence with one 4 foot gate, the run is 96 feet. At 8 feet per section that is 12 sections and 13 line posts, plus one gate post, so 14 posts. With 2 rails per section you need 24 rails. For pickets 5.5 inches wide with a half inch gap, 96 × 12 ÷ 6 = 192 pickets.
Quick reference (one 4 ft gate, 8 ft sections)
| Fence length | Sections | Posts | Rails (2 per section) | Pickets |
|---|---|---|---|---|
| 50 ft | 6 | 8 | 12 | 92 |
| 100 ft | 12 | 14 | 24 | 192 |
| 150 ft | 19 | 21 | 38 | 292 |
| 200 ft | 25 | 27 | 50 | 392 |
| 300 ft | 37 | 39 | 74 | 592 |
Tips
- Walk the line and mark every corner, gate and change of direction, because each corner needs its own post.
- Buy 5 to 10% extra pickets for cuts and warped boards.
- Post holes are usually about a third of the post length deep. Use the Concrete Calculator to plan for bags.
- Check property lines, local height limits and any permit you may need before you build.
Estimates only
Real fences vary with the slope of the land, corners, the type of post and local rules. Treat the counts as a starting point and confirm with the supplier or the product instructions.
Frequently asked questions
How many posts do I need for a 100 foot fence?
With 8 foot sections you need 13 posts for 100 feet in a straight line, plus one for each gate.
How far apart should fence posts be?
Six to eight feet is typical for wood fences. Always follow the product guide for the panel or rail you buy.
How many pickets per foot?
With 5.5 inch pickets and a half inch gap you need 2 pickets per foot. For tight, privacy-style fences with no gap you need slightly more.
Do corners need extra posts?
Yes. Each corner and end needs its own post. This calculator counts a straight line, so add a post for every corner.
Related calculators
- Concrete CalculatorCubic yards and bags for post holes and slabs
- Gravel, Mulch and Soil CalculatorCubic yards and bags for beds and paths
- Paint CalculatorGallons of paint for a room
Browse all calculators or all guides.