Deck & Fence
Fence Calculator
Plan a fence before you buy. Enter the length, height and post spacing, and this fence calculator counts the posts, rails, pickets or panels, gates and bags of concrete for the post holes, with a material cost for wood and panel fences.
Result
Enter your measurements and press Calculate. What to buy, the working and the cost will appear here.
How to use the fence calculator
- Measure the fence line and add up every side, including gate openings.
- Choose the style: pickets on rails, or pre-made panels.
- Set the post spacing (8 ft is standard), picket width and gap, and rails per section.
- Enter gates and post hole size, add prices, and press Calculate.
Fence material formulas
- Sections = (fence length − gates) ÷ post spacing, rounded up.
- Posts = sections + 1, plus one extra post at each gate.
- Rails = sections × rails per section.
- Pickets = fence length ÷ (picket width + gap).
- Concrete = holes × π × (diameter ÷ 2)² × depth, in bags.
Worked example: a 150 ft privacy fence
A 6 ft privacy fence runs 150 ft with one 4 ft gate. Posts are 8 ft apart in 10 in × 30 in holes, with three rails and 5.5 in pickets butted tight:
- Fence line: 150 ft − 1 × 4 ft gate = 146 ft
- Sections: 146 ft ÷ 8 ft, rounded up = 19
- Posts: 19 + 1 end post + 1 for gates = 21
- Pickets: 146 ft ÷ (5.5 in + 0 in gap) × 1.05 → 335
- Concrete: 21 holes × 1.36 ft³ × 1.1 ÷ 0.6 ft³ per bag → 53
Posts: 21; Pickets: 335; Rails: 60; Concrete for posts: 53 × 80 lb bags; Material cost: $2,351.25. Open this example in the calculator.
Post spacing and depth
- Spacing: 8 ft between posts is standard for wood fences; 6 ft for heavy or windy sites and some vinyl panels.
- Depth: a common guide is one third of the post’s length in the ground (for a 6 ft fence, an 8 ft post with about 2–3 ft buried), and below the frost line where the ground freezes.
- Hole width: about three times the post width, so 10–12 in for a 4 × 4.
- Corners and ends each need a post; add one for every change of direction.
Need more detail on the concrete? The concrete bag calculator compares bag sizes for post holes.
Picket spacing
For a privacy fence, pickets are butted together (gap 0) or overlapped. For a picket fence, a gap of about half a picket width is common, but check local rules: some places limit openings for pool fences and similar.
Assumptions and limitations
- The fence line is treated as one straight run; add posts for corners.
- Gate hardware, gate frames and gravel at the bottom of holes are not included.
- This is a planning estimate. Check property lines, permits and height rules, and have underground utilities marked before you dig.
Fence questions
How many fence posts do I need?
Divide the fence length by the post spacing, round up, and add one, plus a post for each gate and corner. 100 ft at 8 ft spacing is 12.5, so 13 sections and 14 posts in a straight line.
How many pickets for a 100 ft fence?
With 5.5 in pickets and no gap, 100 × 12 ÷ 5.5 = 219 pickets, plus a few extra for splits.
How many bags of concrete per fence post?
For a 10 in × 30 in hole, about 2–3 bags of 80 lb mix per post, a little less once the post is in.
Formulas, unit conversions and default values are explained on our methodology page. Results are estimates; check manufacturer data and local codes before you buy or build.