What is Fence Calculator?

Estimate posts, rails, and boards for any fence project. Enter your perimeter length, post spacing, and board dimensions to get a full material list with quantities.

The calculator works in feet/inches or meters/centimeters, assumes equal-spaced posts plus a post on each side of every gate, and rounds section count up so you do not run short. Pick a fence-type preset (privacy, picket, split rail, chain link, or vinyl) and the post spacing, rail count, and board width snap to typical values for that style. Set a waste factor (10 percent is the industry default) and the posts, rails, and boards figures bump up accordingly so your shopping list survives cuts, knots, and damaged pieces. Toggle round posts when you are using sonotube forms and the concrete-per-hole volume updates to match the cylindrical math.

How to use

  1. Step 1 — Enter the total perimeter length and the number of gate openings.
  2. Step 2 — Set post spacing, rail count per section, and board width.
  3. Step 3 — Review the computed material list: number of posts, rails, and boards.

When to use

  • Pricing materials before a trip to the lumber yard for a backyard or pasture project.
  • Estimating a quote for a client and need ballpark post, rail, and picket counts.
  • Comparing two layouts (e.g. 6 ft vs 8 ft post spacing) to see how the part count changes.

Result

Planning a 120-foot backyard fence with 8-foot post spacing and one 4-foot gate: the calculator shows you need 15 posts, 28 rails, and 180 pickets.

FAQ

How is the number of posts calculated?
Each fence section needs a post at both ends, so posts equal sections plus one. Each gate adds two more posts (one on each side), since a gate hinge can't share a post with a fence panel without sagging issues. Add the number of corners too — every direction change needs its own post, which is why the corners field bumps the total.
Why does the count include extra boards even when the math works out evenly?
When the waste factor is zero, the count rounds up to the nearest whole picket because real lumber cannot be partially used. Turn the waste factor on (10 percent is the industry default) and the count bumps further to cover cuts, knots, and pieces that arrive damaged. Most pros budget at least this much when ordering.
What post spacing should I use?
8 feet (about 2.4 m) is standard for residential wood fences and matches common rail lengths. Use 6 feet for heavier panels, high-wind areas, or vinyl. Tighter spacing costs more but reduces sag over time.
Does the calculator account for slope or hills?
It treats the perimeter as flat ground. On a slope, measure the actual on-ground distance (not the map distance) and add roughly 5–10% to the perimeter to cover the extra material that follows the contour.
Why is the gate width subtracted from the perimeter?
Each gate replaces a stretch of fence, so the rails and pickets that would have filled that span aren't needed. Posts still count, since you need one on each side of the opening to hang the gate.

Related Tools