Fence Calculator

How many fence posts do you need? Enter the fence length and the post spacing to get the number of posts, rails and fence boards or pickets, plus a suggested post length and an optional cost.

Enter your fence

Units

6 ft and 8 ft are common post spacings and often match the length of the rails or panels you buy. The height is used for the suggested post length.

The horizontal rails between each pair of posts. 2 or 3 is typical, depending on the style and height.

Each gate adds one extra post. Enter 0 for none.

A common 1x6 board is about 5.5 in wide. Enter 0 for the gap if the boards touch.

Optional. Leave blank to skip.

Optional. Leave blank to skip.

Optional. Leave blank to skip.

You need

15 posts

13 sections · 39 rails · 200 boards

Fence materials
Fence length100 ft
Post spacing (maximum)8 ft
Sections13
Actual spacing7.69 ft
Line posts (sections + 1)14
Extra posts for gates1
Total posts15
Rails (3 per section)39
Boards (5.5 in wide, 0.5 in gap)200
Suggested post length8 ft to 9 ft

Formula: posts = fence length ÷ post spacing, rounded up, plus 1, plus 1 per gate. For a fence with corners, work out each straight side, add the totals and subtract one post for every shared corner.

The post length is a common rule of thumb: the post is buried about one third to one half of the fence height. Check local frost depth, soil and building rules. The board count covers the full length in a single layer and does not deduct gate openings.

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 posts needed (no gates)
Fence lengthPosts at 6 ft spacingPosts at 8 ft spacing
50 ft108
100 ft1814
150 ft2620
200 ft3526
300 ft5139

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.

Rule-of-thumb post length by fence height
Fence height above groundBuried (1/3 to 1/2 of height)Post length
4 ft1.33 to 2 ft5.33 to 6 ft
5 ft1.67 to 2.5 ft6.67 to 7.5 ft
6 ft2 to 3 ft8 to 9 ft
8 ft2.67 to 4 ft10.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.

Guides

Last updated . Free to use, no sign-up. How we check our numbers.