How to calculate how many fence posts you need
A fence is a row of equal sections, and each section needs a post at both ends, so a run always has one more post than it has sections. Divide the fence length by the post spacing, round up to whole sections, and add one.
Sections = fence length ÷ post spacing, rounded up
Line posts = sections + 1
Total posts = line posts + 1 extra post per gate
Rails = rails per section × sections
Boards = fence length × 12 ÷ (board width + gap), in inches, rounded up
Post spacing is measured from the center of one post to the center of the next. Spacings of 6 ft and 8 ft are common, and they often match the length of the rails or panels sold at a lumber yard, but follow the product you buy. A gate needs a post on each side of its opening, so the calculator adds one extra post per gate. Corner and end posts are already counted, because they are the posts at the ends of sections.
If the fence turns corners, work out each straight side on its own, add the totals, and subtract one post for every corner that two sides share.
Worked example: 100 ft of fence
Say you are fencing 100 ft with posts every 8 ft, three rails per section, one gate and 1x6 boards (about 5.5 in wide) set 0.5 in apart.
- Sections: 100 ÷ 8 = 12.5, rounded up to 13
- Line posts: 13 + 1 = 14
- Total posts with the gate: 14 + 1 = 15
- Rails: 3 × 13 = 39
- Boards: 100 × 12 ÷ (5.5 + 0.5) = 200
Because 13 sections share 100 ft, the posts end up about 7.7 ft apart, a little closer than the 8 ft you asked for. Enter a price for posts, rails or boards and the calculator adds up the cost of the items you priced.
| Fence length | Posts at 6 ft spacing | Posts at 8 ft spacing |
|---|---|---|
| 50 ft | 10 | 8 |
| 100 ft | 18 | 14 |
| 150 ft | 26 | 20 |
| 200 ft | 35 | 26 |
| 300 ft | 51 | 39 |
How long should fence posts be?
A common rule of thumb is to bury a post about one third to one half of the fence height. A 6 ft fence then needs 2 to 3 ft of post in the ground, which means a post 8 to 9 ft long. The calculator shows this range for your fence height. Soil, wind, the local frost depth and building rules can call for more, so check them before you cut or order anything.
| Fence height above ground | Buried (1/3 to 1/2 of height) | Post length |
|---|---|---|
| 4 ft | 1.33 to 2 ft | 5.33 to 6 ft |
| 5 ft | 1.67 to 2.5 ft | 6.67 to 7.5 ft |
| 6 ft | 2 to 3 ft | 8 to 9 ft |
| 8 ft | 2.67 to 4 ft | 10.67 to 12 ft |
Posts set in concrete hold better in loose or wet soil. To size the concrete, treat each hole as a cylinder (π × radius² × depth) and use the circle option of the concrete calculator, then multiply by the number of posts. Bag yields differ by brand, so use the yield printed on the bag. If the fence rests on a stone base or you fill around the posts with gravel, the gravel calculator works out the quantity.
What this fence calculator does not cover
The board count assumes one layer of boards with an even gap along the full length, and it does not deduct gate openings, so it may run a little high. Board-on-board, lattice, caps, trim, hardware, gate frames and stain are not included. Chain link and wire fences use different parts, so use the length and post spacing only.
Fence Calculator FAQ
How many fence posts do I need for 100 feet?
With posts every 8 ft you need 14 line posts for 100 ft (13 sections plus 1), and one more for each gate. With posts every 6 ft you need 18, because 100 ÷ 6 rounds up to 17 sections.
How far apart should fence posts be?
Spacings of 6 ft and 8 ft are common. Many rails and panels are sold in lengths that match, so choose the spacing that fits the material you buy and the style of the fence.
How long should fence posts be?
A common rule of thumb is to bury about one third to one half of the fence height. For a 6 ft fence that is a post 8 to 9 ft long. Local frost depth, soil and building rules can change this.
How many pickets or boards do I need?
Multiply the fence length in feet by 12, then divide by the board width plus the gap, both in inches. For 100 ft of 5.5 in boards with a 0.5 in gap that is 100 × 12 ÷ 6 = 200 boards.
How much concrete do I need for fence posts?
Each post hole is a cylinder: π × radius² × depth, minus the volume of the post. Work out one hole with the concrete calculator and multiply by the number of posts. Use the yield printed on the bag, since it varies by brand.