Fence planning guide

How many fence posts do I need?

Count fence sections and unique post locations for a straight line, a corner, or a gate opening. Use your own measurements and spacing.

The short answer

For a straight fence with no gates, divide the length by your chosen maximum post spacing. Round up to find the number of sections, then add one post for the end:

sections = ceil(length ÷ maximum post spacing)

posts = sections + 1

Use the same units for length and spacing. This gives you a starting count of post locations. For corners, gates or separate fence lines, count each part of the layout as shown below.

Example: 100 ft with an 8 ft maximum

Say you have a straight 100 ft run with no gates and choose an 8 ft maximum spacing. The 8 ft figure is an example; the right spacing depends on your fence design.

  1. 100 ÷ 8 = 12.5; round up to 13 sections.
  2. Count the two ends and the posts between sections: 13 + 1 = 14 posts.
  3. If sections are equal, their actual length is 100 ÷ 13 ≈ 7.69 ft, below the chosen maximum.

The calculator spaces sections equally within each solid segment. Your layout or product instructions may call for a different arrangement.

Quick reference: one straight run

Each row assumes one straight run with no gates. The 6 ft and 8 ft columns show chosen maximums, not recommended spacing. On a narrow screen, scroll the table to see both columns.

Length6 ft maximum8 ft maximum
25 ft6 posts5 posts
50 ft10 posts8 posts
100 ft18 posts14 posts
150 ft26 posts20 posts
200 ft35 posts26 posts

Two connected runs: count the corner once

Take two solid 16 ft runs that meet at a corner, with a maximum spacing of 8 ft. Each run has two sections and needs three posts on its own. Because both runs use the same corner post, count it only once: 3 + 3 − 1 = 5 unique posts.

Two connected fence runsAn L-shaped line with five posts: two ends, two intermediate posts, and one shared corner.16 ft16 ftshared corner
Five unique post locations. Diagram not to scale.

If the fence lines do not connect, calculate them separately. Each line needs its own end posts. The calculator handles connected runs entered in sequence; it does not model a closed loop or intersecting fence lines.

Count the posts around a gate

Now take a 20 ft run with a 4 ft gate opening and 8 ft of solid fence on each side. With an 8 ft maximum spacing, each side has one section and two endpoints. That gives you four unique posts: two outer ends and two gate-edge posts.

Fence run with gateA straight run with two eight-foot solid segments separated by a four-foot gate opening. Four post points mark the outer ends and gate edges.8 ft4 ft gate8 ft4 unique post locations
The gate opening is included in the 20 ft total. Diagram not to scale.

If a gate edge falls at the end of a run or at a corner, count that location once. This count does not determine the size, hardware or support your gate posts need.

Choosing spacing and checking your layout

Choose a maximum spacing that suits your fence design and local requirements. The calculator accepts values from 4 to 8 ft; the 6 ft and 8 ft values above are examples. The tool does not design footings or check wind loads, soil, slopes, post strength or gate construction.

Measure each connected run, including its openings. Enter the solid segments and gate widths separately, then confirm the construction details with a qualified professional. See the full methodology and model limits.

Calculate your fence materials or learn how many pickets you need.