Fence Calculator
A 100 ft fence with posts set 8 ft apart needs 14 posts for 13 sections, because a run takes a post at each end. Sections round up, which holds every span at or under the spacing entered and tightens the real gap between posts to 7.69 ft. This fence calculator counts the rails (the horizontal timbers spanning each section) and the pickets (the vertical boards nailed across them), sets how deep each post has to be buried and converts that depth into 80 lb concrete bags.
Cost per unit (optional)
Leave at 0 to skip the budget. Enter your local lumber prices to get a total in your own currency.
Posts
14
Rails
39
Pickets
219
| Material | Quantity | Unit cost | Subtotal |
|---|---|---|---|
| PostsOne per section, plus the end post everyone forgets | 14 | — | — |
| RailsSections multiplied by rails per section | 39 | — | — |
| PicketsPicket width plus gap, rounded up to the next full board | 219 | — | — |
Post hole depth
24 in (0.61 m)
Bury one third of the post height, never less than 24 in and always below your local frost line. Shallow posts are the number one reason a fence leans after a couple of winters.
- Dig to (with gravel base)
- 30 in
- Post length to buy
- 8 ft
- Hole diameter
- 10.5 in
Actual post spacing
7.69 ft
13 equal sections
Total rail length
300 ft
80 lb concrete bags
25 (0.41 m³)
Examples
How to use
- 1
Choose imperial or metric, then enter the length of one straight run and the spacing you are aiming for between post centers. A fence that turns a corner is two runs and gets measured twice.
- 2
Enter the fence height above ground, the picket width and the gap between pickets. Leave the gap at 0 for a solid privacy fence; 2 in to 2.5 in gives the spaced picket look. Metric mode reads these two fields in centimeters while the length stays in meters.
- 3
Set how many rails each section carries, from 1 to 6. Three is standard on a 6 ft privacy fence and two is enough on a 4 ft picket run.
- 4
Read the post, rail and picket counts, then open the depth panel for the buried depth, the dig depth including gravel and the bag count. Unit costs are optional and add a subtotal to each line.
How many fence posts do I need for a 100 foot fence?
A 100 ft run with posts every 8 ft takes 13 sections and 14 posts, since 12.5 spans round up and the far end still needs its own post. Every span then stays at or under 8 ft, so the real gap settles at 7.69 ft center to center.
That count covers one straight run. A yard fenced on three sides is three separate runs, minus one post per shared corner, where the post closing one side also opens the next.
How many posts and pickets for 20 to 300 ft of fence?
Every row runs at 8 ft of target spacing with three rails per section and 5.5 in pickets butted tight.
| Fence length | Sections | Posts | Rails | Pickets | Real spacing |
|---|---|---|---|---|---|
| 20 ft | 3 | 4 | 9 | 44 | 6.67 ft |
| 40 ft | 5 | 6 | 15 | 88 | 8.00 ft |
| 60 ft | 8 | 9 | 24 | 131 | 7.50 ft |
| 80 ft | 10 | 11 | 30 | 175 | 8.00 ft |
| 100 ft | 13 | 14 | 39 | 219 | 7.69 ft |
| 150 ft | 19 | 20 | 57 | 328 | 7.89 ft |
| 200 ft | 25 | 26 | 75 | 437 | 8.00 ft |
| 300 ft | 38 | 39 | 114 | 655 | 7.89 ft |
How deep should fence posts be?
Burial depth is one third of the height above ground rather than the finished post length, floored at 24 in. A 6 ft privacy fence sits exactly on the hinge, so the post to buy is 8 ft long.
A 4 ft picket run never reaches the ratio and takes the 24 in floor. An 8 ft fence buries 32 in and calls for a 10 ft 8 in post, no stock length, so the order is a 12 ft post cut on site.
The same panel works as a fence post depth calculator. Dig depth adds the 6 in gravel bed under the concrete, taking the hole for a 6 ft fence to 30 in. Hole width is three times the post width, so a nominal 4x4 (3.5 in of real timber) wants a 10.5 in hole.
Those depths are a construction minimum and not a local code. Frost heave, the ground swelling as it freezes, lifts any post whose footing sits above the frost line. Codes across the upper Midwest and New England call for 42 in to 48 in. The local building department decides.
How many bags of concrete per fence post?
A 10.5 in hole dug 24 in deep swallows about 1.03 cu ft of concrete once the post displaces its own share, a little under two 80 lb bags at the 0.6 cu ft a bag yields. The 14 post fence from earlier comes to 25 bags.
Bags are counted once across the whole fence rather than hole by hole. Rounding each hole up on its own would put 28 bags on the same 14 posts, three more than the volume asks for.
| Fence height | Set depth | Bags, 100 ft run (14 posts) | Bags, 150 ft run (20 posts) |
|---|---|---|---|
| 4 ft | 24 in | 25 | 35 |
| 6 ft | 24 in | 25 | 35 |
| 7 ft | 28 in | 29 | 41 |
| 8 ft | 32 in | 33 | 46 |
Every figure here is built on a nominal 4x4 with 3.5 in faces. The 6 in gravel bed stays outside the bag count and gets ordered separately by the cubic foot.
Is 6 ft or 8 ft post spacing better?
Eight feet is the default span because rails and pre-built panels are milled to that length. Dropping the same 100 ft run to 6 ft spacing pushes the post count from 14 to 18 and the rails from 39 to 51, while the picket count stays at 219 boards. The tighter spacing costs four extra posts and around six more bags of concrete.
A solid privacy panel is often described as a sail, catching wind across its whole face. That sail effect bends rails over a few winters, which a shorter span slows. Windy sites with 6 ft privacy panels earn the tighter spacing.
How the picket gap changes the picket count
Butted tight, 5.5 in boards take 219 pickets over 100 ft. A 1 in gap brings the order down to 185 and a 2 in gap to 161, the count dividing the run by one board plus one gap.
Board width works against the gap. A 3.5 in picket with a 2.5 in gap comes back up to 201 boards over that same 100 ft. Used as a picket fence calculator the tool reads the gap in inches.
What does a fence cost per foot?
A fence cost calculator is only as good as the three unit prices typed into it. The 150 ft example at 8 ft spacing comes to 1,951 in materials, a shade over 13 per linear foot.
Materials for a wood privacy fence commonly land between 10 and 30 per linear foot, with installed quotes running two to three times that once labor and post setting are priced in. Both bands swing hard with region, with lumber grade and with the choice between treated pine, cedar and vinyl, so any cost to install fence calculator gives an order of magnitude instead of a quote.
Concrete, gravel, screws, hinges and the gate sit outside the total, which prices posts, rails and pickets only. A single gate costs more than the plain section it replaces.
Parameters
Every field of this tool can be prefilled from the URL. Use these query parameters:
| Parameter | Type | Default |
|---|---|---|
| unit | imperial | metric | imperial |
| fenceLength | number | 100 |
| postSpacing | number | 8 |
| fenceHeight | number | 6 |
| picketWidth | number | 5.5 |
| picketGap | number | 0 |
| railsPerSection | number | 3 |
| costPerPost | number | 0 |
| costPerRail | number | 0 |
| costPerPicket | number | 0 |
Example : https://www.veltotools.com/home/fence-calculator?unit=imperial&fenceLength=100&postSpacing=8&fenceHeight=6&picketWidth=5.5&picketGap=0&railsPerSection=3
API
The same tool is available as a free JSON API, with the same parameters as above. No key, no sign-up.
Frequently asked questions
Updated Aug 15, 2026