Home & DIY
Fence Calculator
Estimate fence posts, panels or pickets, rails and concrete for a fence line — and the material cost.
How to use
- 1Enter the total fence length and post spacing (usually 6–8 ft).
- 2Add gates, picket width and gap for picket fences, and prices if you want costs.
How it's calculated
Sections = ⌈length ÷ spacing⌉; posts = sections + 1 (+ 1 per gate). Pickets = length × 12 ÷ (picket width + gap). Concrete ≈ 1–2 × 50 lb bags per post.
Frequently asked questions
How far apart should fence posts be?
Typically 6–8 ft. Closer spacing is stronger for tall fences or windy sites.
How deep should posts go?
A common rule is one-third of the post's above-ground height, and below the frost line in cold climates.
Do I need a permit?
Often for fences over a certain height (commonly 6 ft) or near property lines. Check local rules and HOA covenants.
Why post count isn't simply length divided by spacing
A 120 ft fence at 8 ft spacing doesn't need 120÷8 = 15 posts — it needs 16, because posts sit at both ends of every section, not just one. The calculator handles this by computing sections first (⌈length ÷ spacing⌉), then adding 1 for the extra end post, plus one more post for every gate, since a gate needs its own posts on both sides and the calculator assumes you're adding one dedicated post per gate beyond the regular line. Miscounting this 'fencepost error' by hand is one of the most common ways people come up short mid-project.
Worked example: Fence Calculator
A 120 ft fence with 8 ft post spacing and one gate needs ⌈120÷8⌉ = 15 sections, which means 15 + 1 + 1 (for the gate) = 17 posts total. At 2 rails per section, that's 15 × 2 = 30 rails. With 5.5 in pickets and a 0.5 in gap, pickets needed come to ⌈(120×12)÷6⌉ = 240. Concrete at 1.5 bags per post for 17 posts rounds up to 26 bags of 50 lb mix.
Why post spacing is a structural choice, not just a cost one
Tighter spacing means more posts and more concrete, but it isn't purely a cost-saving decision to space them as far apart as the material allows — a tall privacy fence or a site exposed to strong wind needs closer spacing to resist the greater leverage wind places on a larger panel area, which is why 6 ft spacing is common for taller or more exposed fences even though 8 ft is the typical default for shorter runs.
What this calculator doesn't check for you
Post depth (commonly one-third of the above-ground height, and below the frost line in cold climates) and local permitting rules — often triggered by fences over 6 ft or built near a property line — aren't part of this material estimate, but both affect whether the fence you're planning is actually allowed and structurally sound. Checking those with your local building department and any HOA covenant before buying materials avoids having to redo the layout after the fact.
Each gate adds a post on top of the end posts
Sections are the length divided by the spacing, rounded up, and both numbers have to be above zero. Posts are the section count plus one, for the post at the far end, plus one more for every gate. The opening example, 120 feet at 8 foot spacing with one gate, is 15 sections and 17 posts. A picket width above zero, which is how it opens at 5.5 inches, counts pickets from the length in inches divided by the picket plus the gap, rounded up. Setting that width to zero changes the section label to panels and hides the picket line. Concrete bags are the posts times the bags per post, which opens at 1.5, rounded up.
Related tools
- Home Renovation Budget Planner
Plan a renovation budget room by room — list the line items, add a contingency, and see the total and the share each part takes.
- TV Size & Viewing Distance Calculator
Find the best TV size for your seating distance — or the ideal distance for your TV — using the SMPTE (30°) and THX (40°) viewing angle guidelines.
- Curtain Size Calculator
Work out curtain width and length for a window — rod width, fullness and drop — so curtains hang properly whether closed or open.
- Moving Box & Storage Unit Calculator
Estimate how many moving boxes you need by home size and packing style, and the storage unit size that fits your belongings.
- Solar Panel Size & Payback Calculator
Estimate how many solar panels and what system size (kW) you need to cover your electricity use, the yearly savings and the payback period.
- Inflation Calculator
See how inflation changes the value of money — what today's amount will cost in the future, or what it's really worth after years of price rises.