Fence post and rail calculator

Short answer

Subtract gate openings from the run length, divide the remaining fence by the post spacing and round up to get sections. Posts are the sections plus one for each separate stretch between ends and gates. Rails are sections times rails per section, and hole concrete is the hole volume times the post count.

Calculator

ft
ft
ea
ft
ea
in
in
Fence length less gates (ft)…Sections (bays) (ea)…Posts (ea)…Rails (ea)…Post hole concrete (cu yd)…

Fence is a linear takeoff with a few counts hanging off it. Measure the run, take out the gates, divide by post spacing, and you have the bays. Posts, rails and post-hole concrete all follow from that. This calculator treats the fence as one line with gates in it; for a fence with several separate runs, run it once per run.

The formula

  1. Fence length: total run − (gates × gate width).
  2. Sections: fence length ÷ post spacing, rounded up.
  3. Posts: sections + gates + 1. Each gate splits the line into another stretch, and every stretch needs an end post.
  4. Rails: sections × rails per section.
  5. Concrete: posts × π × (hole diameter ÷ 24)² × hole depth ÷ 12, ÷ 27 for cubic yards.

Worked example (the calculator's defaults)

Say the site plan shows 250 ft of 3-rail wood fence with two 4 ft gates, posts at 8 ft on center, and the detail calls for 10 in diameter holes 36 in deep (example values).

  • Fence length: 250 − 2 × 4 = 242.0 ft
  • Sections: 242 ÷ 8 = 30.25, rounded up to 31
  • Posts: 31 + 2 + 1 = 34
  • Rails: 31 × 3 = 93
  • Concrete per hole: π × (10 ÷ 24)² × 3 = 3.1416 × 0.1736 × 3 = 1.636 cu ft. × 34 = 55.63 cu ft, ÷ 27 = 2.06 cu yd

Why the count is approximate

The calculator rounds up the sections once over the whole fence. In the field, each stretch between gates and ends rounds up on its own. Three stretches of 80, 82 and 80 ft at 8 ft spacing need 10, 11 and 10 sections, or 31 total, matching the example. But stretches like 81, 81 and 80 need 11, 11 and 10, or 32. If your plan has many short stretches, run each one separately and add them; with long stretches, the difference is rarely more than a post or two.

Corners don't add posts, but they change the post type. Corner, end and gate posts are often heavier, set deeper, or braced. Count them by type from the plan:

Post type Where Count in the example
End posts Two ends of the run 2
Gate posts Both sides of each gate 4
Corner posts Each change of direction From the plan
Line posts Everything else Remainder

The 34 posts include all types. Subtract terminal posts from the total to get line posts.

Reading the fence plan

  • Fence type and height are usually shown by a line type and tag on the site plan, with a detail for each type. A job can have several fence types; measure each separately.
  • Gates are tagged with width and type. Double drive gates are two leaves with a wider opening.
  • Limits: fences may stop short of buildings, tie into walls, or continue off the sheet onto a match line. Follow the line across sheets.

On a vector site plan, a fence line can be measured as a whole run in one click and the gates counted as symbols. Keep the marked-up sheet so every fence type's length is traceable.

Mistakes worth avoiding

  • Not subtracting gates. Fence fabric and rails stop at gates. Gates are a separate item with their own hardware.
  • Forgetting the extra post. A 10-section stretch has 11 posts.
  • Wrong hole size. Terminal posts may use bigger holes than line posts. Run the concrete separately by post type if the detail differs.
  • Slope. Fences on steep grades measured in plan view are a little short of the real length, and racking or stepping the panels adds labor.

Check the result

Divide fence length by posts: it should be a little under your spacing because of the extra posts at gates and ends. For the example, 242 ÷ 34 = 7.1 ft. If you get something near your spacing exactly, you probably left out the gate posts. For larger concrete counts by post, the concrete column calculator works the same way, and the fence takeoff guide covers fabric, pickets and hardware.

Questions estimators ask

Why is the post count more than the number of sections?

Every straight stretch of fence needs one more post than it has sections, because a post closes each end. A gate splits the run into separate stretches, each with its own end post. That is why the calculator adds one post per gate plus one for the run. Corners don't add posts; the corner post is shared.

Should I measure fence along the property line or the plan line?

Measure the fence line shown on the site or landscape plan, which may be set back from the property line. Take any dimensions on the plan over scaled lengths. Where the plan shows the fence following a curve, measure along the curve, not the chord between ends.

How big should the post holes be?

Use the hole diameter and depth on the fence detail. They depend on post size, fence height, wind exposure, soil and frost depth, and the designer or manufacturer sets them. The 10 inch by 36 inch hole in the calculator is an example, and the concrete figure ignores the post's own volume, which leaves a small margin.

Does this work for chain link?

For posts and concrete, yes. Chain link uses a top rail run continuously along the whole fence rather than rails per bay, plus fabric by the linear foot and tension wire. For chain link, set rails per section to 0 and price top rail and fabric from the fence length after gates.

Count it, measure it, price it, in one place

Upload a PDF plan set and Veraqi lists the symbols on each sheet with their counts, measures runs and areas at the sheet's scale, and exports a priced Excel estimate. 14-day free trial, 10 sheets, no card.

Start free trial