Home › Home & Construction › Fence Calculator
Fence Calculator
Buying fence materials a few pieces short means a second trip mid-project; buying a pallet too many means money stacked in the garage. This free fence calculator turns your fence length and post spacing into exact counts — posts, sections, and pickets or rails for your style — with an optional materials cost.
Prices are optional — leave a price blank to count materials without costing that item.
The currency only changes the symbol and formatting — it never converts amounts.
| Fence posts needed | 14 |
| Sections | 13 |
| Actual post spacing | 7.6923 ft |
| Pickets needed | 160 |
| Rails needed | — |
| Posts cost | $175.00 |
| Pickets cost | $520.00 |
| Total estimated cost | $695.00 |
How it works
A fence run divides into sections — the bays between neighboring posts. The core arithmetic is three lines: divide the length by your target spacing and round up to whole sections, add one post for the far end, then spread the length evenly across the sections so every bay comes out the same width.
Post spacing is usually 6–8 ft for wood fences: wider spacing saves posts but asks more of the rails and pickets spanning each bay, and some local rules cap it. Your spacing is a target — the actual spacing shown in the results is the target adjusted so the run divides into equal whole sections, which is how a careful builder lays it out with a tape and string line anyway.
The style decides what fills each section. A picket fence covers the run with vertical boards at a set pitch (width plus gap), a privacy fence closes the gap to zero — which is why the same run needs noticeably more boards — and a rail fence skips boards entirely and runs horizontal rails, 2 or 3 per section, between the posts. Prices are per piece; leave any price blank and that item is counted but not costed.
Worked example
A straight 100 ft picket fence, posts at a target 8 ft spacing, standard 5.5-inch pickets with a 2-inch gap. Posts cost $12.50 each and pickets $3.25.
Step 1 — sections: 100 ÷ 8 = 12.5, rounded up to 13 sections.
Step 2 — posts: 13 + 1 = 14 posts, and the real spacing becomes 100 ÷ 13 ≈ 7.69 ft.
Step 3 — pickets: each takes 5.5 + 2 = 7.5 inches of run; 1,200 inches ÷ 7.5 = 160 pickets.
Step 4 — cost: 14 × $12.50 = $175.00 in posts, 160 × $3.25 = $520.00 in pickets — $695.00 total.
Enter the same numbers above and the calculator returns exactly that shopping list. In the yard, add two spare posts and a dozen spare pickets and you have the real purchase order (see the FAQ on extras).
Before you buy
Check where you're allowed to build. Property lines, setbacks, HOA rules and local height limits decide a lot of fences before the first hole is dug. A survey beats a guess, and a fence on a neighbor's land is an expensive mistake to move.
Don't forget the setting materials. This calculator counts the fence itself. Each post also needs a hole and concrete or gravel to set it — the fence post calculator sizes that part — plus screws or nails, and gate hardware for any opening.
Measure runs, not perimeters. A corner post serves two runs. Run this calculator once per straight side and add the lists; if you run the whole perimeter as one line, you'll overbuy a post at every corner.
FAQ
How many posts do I need for a 100-foot fence?
With the common 8-foot post spacing: 100 ÷ 8 = 12.5, which rounds up to 13 sections, and a post at both ends of every section means 13 + 1 = 14 posts. Posts always outnumber sections by one on a straight run — that “plus one” is the end post people forget at the lumber yard. Corners on an L- or U-shaped fence are shared between runs, so work each straight run separately.
Why is my actual post spacing different from what I entered?
Because sections have to come out whole. If your length doesn't divide evenly by your target spacing, the calculator rounds the section count up and spreads the length evenly — a 100 ft fence at “8 ft spacing” really gets 13 sections of about 7.69 ft. Even spacing looks better, keeps every panel the same width, and stays inside the maximum span your rails or panels allow.
How are pickets counted?
By pitch: each picket takes up its own width plus the gap beside it. A standard 5.5-inch picket with a 2-inch gap has a 7.5-inch pitch, so a 100 ft (1,200 in) fence needs 1,200 ÷ 7.5 = 160 pickets. Privacy fences close the gap to zero, so the same fence takes 219 pickets at 5.5-inch pitch — the calculator sets the gap to 0 automatically when you pick the privacy style.
Should I buy extra materials?
Yes — plan on roughly 5–10% extra pickets and at least one or two spare posts. Boards warp, a picket splits on a nail, and the last cut of the day is the one that goes wrong. The counts here are the exact mathematical minimum for a perfect run; what you should load on the truck is that plus a sensible margin. Unused full boards can usually go back to the store.
Does the calculator include gates and post concrete?
No. The count covers one straight fence run: posts, sections, and pickets or rails. Gates need their own posts, hinges and hardware, and every post hole needs concrete or gravel that depends on the hole size — the fence post calculator on this site works out setting posts in detail. Measure each straight run of your fence separately and add the results together.