Fence Calculator: Posts, Rails and Pickets

Enter the total fence line or perimeter, the gates, the post spacing and your picket size. The calculator subtracts the gates, then gives posts, rails and pickets rounded up. After switching units, re-enter your measurements.

Updated

Embed this calculator

Paste this code into your page. The calculator runs inside the frame and links back to the full version.

Keep the credit link in place. Do not resell the calculator.

Formula

  • Fence length: total length - gates x gate width
  • Sections: fence length / post spacing, rounded up
  • Posts: open run sections + 1, closed loop sections, plus 1 per gate
  • Rails: sections x rails per section x (1 + waste / 100), rounded up
  • Pickets: (fence length + gap) / (picket width + gap) x (1 + waste / 100), rounded up

Assumptions

  • Fence length is measured along the line, with all picket and gap sizes converted to the same unit (12 in per ft or 1000 mm per m).
  • Each gate adds one extra post. Posts are not given a waste allowance.
  • A rail is one piece per section (post spacing long); rails that must be joined or cut need more.
  • Gate frames, hardware, concrete, fasteners and corner posts beyond the above are not included.

Worked example

An open 100 ft run with one 4 ft gate, 8 ft post spacing, 3 rails, 5.5 inch pickets with 0.5 inch gaps and 10 percent waste. Fence length is 96 ft and sections = 12. Posts = 12 + 1 + 1 gate = 14. Rails = 36 x 1.1 = 39.6, so 40. Pickets = (1,152 + 0.5) / 6 = 192.08, x 1.1 = 211.3, so 212.

Frequently asked questions

How many fence posts do I need?

Divide the fence length by the post spacing and round up to get the sections. An open run needs one more post than sections; a closed loop needs the same number. For 96 ft at 8 ft spacing that is 12 sections and 13 line posts, plus one extra post for a gate.

How many pickets do I need?

Pickets = (length + gap) / (picket width + gap). For 96 ft with 5.5 inch pickets and a 0.5 inch gap that is (1,152 + 0.5) / 6 = 192.1, or 212 after 10 percent waste and rounding up.

How do gates change the count?

Each gate width is taken off the fence length, so a 100 ft run with one 4 ft gate has 96 ft of fence. Each gate also adds one post, since a gate needs a post on both sides and one of them is already counted as a line post. Buy the gate hardware and frame separately.

What post spacing should I use?

6 to 8 feet (about 1.8 to 2.4 m) is typical for wood fences. Closer spacing makes a stronger fence. Check local rules and your material supplier for the spacing and post depth that apply to you.