Key takeaways
- Posts = sections + 1, plus any extra corners and gate posts.
- Post spacing of 6 to 8 feet and burial depth are rules of thumb, and advice on burial conflicts.
- Fence height and placement are set locally, so check before you build.
Enter your fence's length, spacing and picket size. Measure your picket's actual width, because a board's name usually overstates it. For corners and gates, add extra posts.
How the calculator works
- Sections: length ÷ post spacing, rounded up
- Posts: sections + 1 + extra posts
- Rails: sections × rails per section
- Pickets: length in inches ÷ (picket width + gap), rounded up
This builds on Omni's fence formulas. We don't subtract post width from the picket count, so the number errs a little high, which leaves a few spare.
Worked example
100 feet at 8-foot spacing, 3 rails per section, 5 1/2-inch pickets with 1/4-inch gaps, and 2 extra posts:
- Sections: 100 ÷ 8 = 12.5, so 13
- Posts: 13 + 1 + 2 = 16
- Rails: 13 × 3 = 39
- Pickets: 1,200 ÷ 5.75 = 208.7, so 209
How spacing changes your posts
| Post spacing | Sections | Posts (no extras) | Rails at 3 per section |
|---|---|---|---|
| 6 ft | 17 | 18 | 51 |
| 7 ft | 15 | 16 | 45 |
| 8 ft | 13 | 14 | 39 |
Rule-of-thumb guides commonly put posts 6 to 8 feet apart, and closer for heavy panels or windy sites. We didn't find a code table for fence structure.
Worked out by run
Add each straight run separately, because a section can't span a corner. For example, a 40-foot and a 60-foot run at 8-foot spacing make 5 + 8 = 13 sections and share a corner post. Each gate side usually needs its own post, sized for the gate.
How deep should posts go?
Advice conflicts, so we don't give one number. QUIKRETE's post method uses a depth of 1/3 of the post's overall height. Other guides use 1/3 to 1/2 of the above-ground height. Frost depth and soil matter, so ask your building department or a local fence contractor. Then work out your concrete with the fence post calculator.
Rules that aren't about math
- Height and setbacks are local. 2021 IRC Section R105.2 exempts fences up to 7 feet from building permits in the model code, but that doesn't override zoning or other local laws. Front-yard limits can be much lower, so check yours.
- Property lines and HOAs. Confirm where your line is, and check any HOA rules, as we can't advise on those.
- Digging. Contact 811 a few business days before you dig. Fence installation is one of the projects it names.
Frequently asked questions
How many fence posts do I need for 100 feet?
At 8-foot spacing, 14 posts for a straight run, plus any extras for corners and gates.
How far apart should fence posts be?
Commonly 6 to 8 feet, as a rule of thumb. Follow your fence system's instructions if it has them.
Do I need a permit for a fence?
It depends on where you live. Ask your local building or zoning office.
Sources
We use primary sources where we can: building codes, federal rules and manufacturer documents. Read our editorial standards.
- 2021 International Residential Code, Chapter 1, Section R105.2
- 811: What is 811?
- Omni Calculator: Fence material formulas (rules of thumb)