Fence Cost Calculator
Estimate the number of posts and panels and the total material cost of a fence from its length, post spacing, and unit prices.
How to use this tool
- Enter the total fence length in linear feet.
- Set the post spacing (6-8 ft is typical).
- Enter the cost per post, including concrete and hardware.
- Enter the cost per section or panel.
- Read the total cost and the post and section counts.
Budget your fencing job. Enter the length, post spacing, and your unit prices for posts and panels, and this tool counts the materials and totals the cost.
Formula
Divide the run by the post spacing to get sections, then add one for the closing post:
Sections = ⌈ Length ÷ Spacing ⌉
Posts = Sections + 1
Total cost = Posts × Post cost + Sections × Panel cost
A straight fence always needs one more post than the number of spans between them.
How it works
A fence is a repeating run of posts with a panel or set of rails filling each span between them. We divide the total length by the post spacing to count the spans, rounding up so a partial last span still gets its own section, then add one post because a straight fence is bounded by a post at each end. This fence-post counting is why an off-by-one mistake is so common: 100 feet at 8-foot spacing needs 14 posts, not 12 or 13.
The cost figure combines per-post and per-section pricing so you can fold in the real-world extras. Roll the cost of concrete footing, post caps, and fasteners into the per-post price, and the cost of pickets, rails, or a prefab panel into the per-section price. For board fences, price one section as the lumber for that span rather than a single prefab panel.
The estimate assumes uniform spacing on level ground and a single straight run. Gates, corners, and end posts may need heavier hardware, and sloped ground can add stepped sections. Add a gate as one extra section at its own price, and budget a little extra lumber for waste on custom board fences.
Worked example
100 ft fence, 8 ft post spacing, $25 posts and $70 panels
- Sections = ⌈100 ÷ 8⌉ = ⌈12.5⌉ = 13 sections.
- Posts = 13 + 1 = 14 posts.
- Post cost = 14 × $25 = $350.
- Panel cost = 13 × $70 = $910.
- Total = $350 + $910 = $1,260.
Total $1,260.00 | 14 posts | 13 sections
Posts and sections by fence length (8 ft spacing)
| Fence length | Posts | Sections |
|---|---|---|
| 50 ft | 7 | 7 |
| 100 ft | 13 | 13 |
| 150 ft | 19 | 19 |
| 200 ft | 26 | 25 |
| 300 ft | 38 | 38 |
Key terms
- Post spacing
- The center-to-center distance between fence posts, commonly 6 to 8 feet. Closer spacing adds strength and cost.
- Section (span/panel)
- The stretch of fence between two adjacent posts, filled by a prefab panel or by rails and pickets.
- Line post
- An intermediate post along a straight run, as opposed to heavier corner, end, and gate posts.
- Fence-post counting
- The rule that a straight run of N spans requires N+1 posts because both ends are capped by a post.
Frequently asked questions
- How many posts do I need for a fence?
- Divide the length by the post spacing and round up to get the number of spans, then add one. A 100 ft fence at 8 ft spacing needs 14 posts (13 spans plus one closing post).
- How far apart should fence posts be?
- Six to eight feet on center is standard for most wood and vinyl fences. Closer spacing is stronger and stiffer; wider spacing saves posts but can sag.
- What does this cost estimate include?
- It multiplies your per-post and per-section prices by the counts. Roll concrete, caps, and fasteners into the post price and pickets or panels into the section price. Add gates as extra sections.