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.
100 ÷ 8 = 12.5; round up to 13 sections.- Count the two ends and the posts between sections:
13 + 1 = 14 posts. - 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.
| Length | 6 ft maximum | 8 ft maximum |
|---|---|---|
| 25 ft | 6 posts | 5 posts |
| 50 ft | 10 posts | 8 posts |
| 100 ft | 18 posts | 14 posts |
| 150 ft | 26 posts | 20 posts |
| 200 ft | 35 posts | 26 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.
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.
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.