Fence Calculator

Plan a privacy, picket or panel fence: the posts, rails, boards, pickets or panels to buy and the bags of concrete to set the posts.

Reviewed · How we build and check our calculators

Your details

ft

The total length of the run. Leave gates in; they replace a section.

ft

Center to center, usually 8 ft (2.4 m) at most. For panels, the panel width.

ft
in

Boards butt edge to edge. Actual width; a 1 × 6 board is 5.5 in (14 cm).

Posts to buy

14 posts

13 sections along 100 ft, straight run

Post length
9 ft
3 ft in the ground, half the fence height
Rails
39 rails
3 per section, 8 ft long
Boards
219 boards
6 ft long
Concrete, 80 lb (36 kg) bags
37 bags
2.6 bags per post, 0.8 yd³ in all
Or 50 lb (23 kg) fast-setting bags
58 bags
Last section
4 ft
Shorter when the length does not divide evenly

What if

  • Posts 6 ft apart

    18 posts, 47 bags

    +4 posts

  • 4 ft high fence

    14 posts, 25 bags

    Same posts

Dig each hole about 6 in deeper for gravel, and below the frost line where the ground freezes. Add one post for each corner and each side of a gate, and check property lines and permits before you dig.

How the fence calculator works

Choose a privacy, picket or panel fence and enter its length, post spacing and height. The calculator counts the posts, rails, boards, pickets or panels and the bags of concrete to set the posts.

Formula

Sections = length ÷ post spacing, rounded up; posts = sections + 1. Rails = sections × 2 (up to 4 ft high), 3 (up to 6 ft) or 4 (taller). Boards = length ÷ board width; pickets = length ÷ (picket width + gap). Concrete per post = (π × (1.5 × post width)² − post width²) × hole depth, with the hole half as deep as the fence is high.

  1. 1

    Count the sections and posts

    100 ft ÷ 8 ft = 12.5, so 13 sections and 14 posts; the last section is 4 ft.

  2. 2

    Count the rails

    A 6 ft fence takes 3 rails per section: 13 × 3 = 39 rails of 8 ft.

  3. 3

    Count the boards

    100 ft is 1,200 in; 1,200 ÷ 5.5 in = 218.2, so 219 boards 6 ft long.

  4. 4

    Set the posts

    Each 3.5 in post sits 3 ft deep in a 10.5 in hole: 1.55 ft³ of concrete, 2.6 bags of 80 lb. 14 posts need 37 bags of 80 lb or 58 bags of 50 lb fast-setting mix, and 9 ft posts.

Worked example

The calculator opens with these values

Fence style and units
Privacy, boards edge to edge (feet, inches)
Fence length
100 ft
Post spacing
8 ft
Fence height
6 ft
Board width
5.5 in

Posts to buy

14 posts

Posts, boards and concrete by fence length

Each row is the calculator run on one straight run of privacy fence. A 4 ft fence needs the same posts and boards (shorter ones), 2 rails per section instead of 3, and less concrete because its holes are shallower.

Add one post for every corner and gate, and take the gate width off the board count.

Straight privacy fence, posts 8 ft apart, 5.5 in boards
Fence lengthPostsRails (6 ft fence)Boards80 lb bags (6 ft fence)80 lb bags (4 ft fence)
25 ft5 posts12 rails55 boards13 bags9 bags
50 ft8 posts21 rails110 boards21 bags14 bags
75 ft11 posts30 rails164 boards29 bags19 bags
100 ft14 posts39 rails219 boards37 bags25 bags
150 ft20 posts57 rails328 boards52 bags35 bags
200 ft26 posts75 rails437 boards68 bags45 bags
300 ft39 posts114 rails655 boards101 bags68 bags

Check these before you dig

Fences cause more disputes with neighbors and towns than most home projects. A few calls before you buy save moving posts later.

  • Call 811, the free US call-before-you-dig number, a few working days ahead so buried lines are marked.
  • Find the property line from your survey or plat; do not rely on an old fence or a hedge.
  • Ask the building department about height limits, permits and setbacks; front-yard fences often have a lower limit than back-yard ones.
  • Read the rules of your homeowners association, which may set the style, color and the side that faces out.
  • Ask for the local frost depth: in cold climates, posts set above it can heave out of the ground.
  • Around a pool, the 2021 International Swimming Pool and Spa Code (section 305) requires a barrier at least 48 in high with no gap that a 4 in sphere can pass.

Setting posts that stay straight

A fence is only as straight and solid as its posts, so take the most care with them.

  • Set the two end posts first, stretch a string between them and line up every post in between to it.
  • Put a few inches of gravel in each hole so water drains away from the end of the post.
  • Brace each post plumb in two directions while the concrete sets, and wait the time on the bag before hanging rails.
  • Slope the top of the concrete away from the post so rain runs off instead of collecting against the wood.
  • Use posts rated for ground contact, and a heavier 6 × 6 post or a deeper hole on each side of a gate.

Common questions

How far apart should fence posts be?

6 to 8 ft (1.8 to 2.4 m) center to center. 8 ft suits most wood fences because rails come in 8 ft lengths; use 6 ft in windy places, for heavy boards or for vinyl. Panel fences use the panel width.

How deep should fence post holes be?

A common rule is to bury a third of the post, which is half the height above ground: 3 ft for a 6 ft fence, plus about 6 in of gravel. Go below the frost line in cold climates and follow local rules.

How many bags of concrete per fence post?

For a 4 × 4 post in a 10.5 in hole, about 1 bag of 80 lb mix per foot of depth, so 2 to 3 bags for a 6 ft fence. Bag yields used here: 0.6 ft³ for 80 lb standard mix and 0.375 ft³ for 50 lb fast-setting mix.

Does the count include gates and corners?

No, it assumes one straight run. Add one post for each corner and one for each side of a gate, and leave the gate width out of the board count.

Deck Calculator

Deck boards by board length, joists and screws for a rectangular deck

Add this calculator to your website

Free for blogs, schools and businesses. Paste this code into your page; the calculator works inside it, with no ads and no tracking. Please keep the credit line.