Fence calculator

How many fence posts do I need?

Add each side of your fence and place the gates. Get posts by type (end, corner, gate, line), panels or pickets and rails, and post-hole concrete.

Fence · saves on this device as you type

Your fence line, side by side

Add each straight side. Place gates by their distance from the start of the side.

Pending input

Side

Measured along the ground, end to end, including any gates.

Maximum distance between postsUsually your panel width or the longest span your rails allow, centre to centre. Sections are spaced evenly at or under this.

What kind of fence?Panels are pre-built sections; picket fences are built from rails and individual boards.

With hole depth, gives the post length to buy.

Setting posts in concrete?Optional. Adds post-hole concrete to the plan.

Saved automatically in this browser. Nothing is sent to a server.

How this fence calculator counts posts

The method

  • Each side is split by its gates into fence stretches.
  • Each stretch gets the fewest equal sections that don’t exceed your maximum spacing: sections = stretch ÷ spacing, rounded up.
  • Posts sit at every section end and both sides of every gate. Sides that join share one corner post.
  • Posts are counted one by one, so the plan tells you how many are end, corner, gate and line posts.

Why not just length ÷ spacing + 1?

That shortcut is right for one straight side with no gates. It goes wrong with gates (each one splits the side and adds posts), corners (shared, so counted once), and closed loops (the last post is the first post). Counting post by post avoids all three mistakes.

Worked examples

  1. One straight 100 ft side at up to 8 ft spacing: 100 ÷ 8 = 12.5 → 13 sections, so 14 posts.
  2. A 40 ft side with a 4 ft gate starting 10 ft along: stretches of 10 ft (2 sections) and 26 ft (4 sections); posts = 1 + 2 + 1 (gate) + 4 = 8, two of them gate posts.
  3. A square enclosure, four 25 ft sides joined in a loop: 4 sections per side, 16 sections and 16 posts in total.
  4. A 10 ft picket stretch with 5½ in pickets and 2 in gaps: (120 + 2) ÷ 7.5 = 16.3 → 17 pickets.