Fence Calculator

Enter the length of each fence run and the height to get posts, rails, pickets, and bags of post concrete, with gates, corners, and evenly spaced pickets worked out for you.

Units

Fence line

Length
ft
in
Include any gates
Gates
1
Fence height
ft
in
Also the picket length
8 ft is standard. Use 6 ft for tall or windy spots.
Gate width
ft
in
The opening, post to post
in
A 1×6 picket is 5.5 in wide
in
Privacy fence: 1/8 in
Posts, concrete, and prices
in
Quikrete: about 3 times the post width
%
For split or warped boards

Prices at your store

$
$
$
$
$

Result

15 posts and 215 pickets

For 96 ft of fence in 13 sections, plus 1 gate.

  • Posts$27015 posts of 4×4, 10 ft long (you need 9 ft). Each stands 6 ft above ground in a 36 in hole.
  • Rails$19539 boards of 2×4, 8 ft long, for 3 rails per section.
  • Pickets$753215 pickets, 6 ft long and 5.5 in wide, with 5% extra. Spaced evenly, each 8 ft section takes 17 with 0.15 in gaps.
  • Concrete$42857 bags of 50 lb Fast-Setting Concrete Mix, about 3.8 per post. Fills each 10.5 in hole to 3 in below the ground.
  • Gates$1501 gate, 4 ft wide, hung between two posts.

Estimated cost$1,795

Prices are examples. Change them under “prices” to match your store. Check local code and HOA rules on height before you build, and contact 811 before you dig.

Show the math
  1. Fence: 100 ft − 1 gate × 4 ft = 96 ft ÷ 8 ft = 12, plus 1 for the gate = 13 sections, 15 posts
  2. Post: 6 ft above ground + 36 in in the ground = 9 ft
  3. Rails: 13 sections × 3 = 39
  4. Pickets per section: 8 ft ÷ (5.5 in + 0.13 in) = 17.07, so 17 pickets with 0.15 in gaps
  5. Concrete per post: (π ÷ 4 × (10.5 in)² − (3.5 in)²) × 33 in = 1.42 cu ft
  6. Concrete: 21.3 cu ft ÷ 0.375 cu ft per bag = 56.79, rounded up to 57 bags

How to use this fence calculator

  1. Measure each straight run of fence from end to end, gates included. A backyard fence is often three runs: two sides and the back.
  2. Set how many gates are in each run and how wide the opening is, post to post.
  3. If you have more than one run, say how they connect. Runs that meet at a corner share a post.
  4. Enter the fence height and choose the post spacing and how many rails each section gets.
  5. Choose side-by-side pickets or board-on-board, then enter the picket width and the gap or overlap you want.
  6. Open “Posts, concrete, and prices” to change the post size, hole size, concrete, or the prices at your store.

How the calculator works

Posts

Each run is a row of bays, and every bay has a post on each side. A bay is either a fence section or a gate. So a run has one more post than it has bays.

fence length  = run length − gates × gate width
sections      = fence length ÷ post spacing, rounded up, + 1 per gate
posts per run = sections + gates + 1
total posts   = posts in every run − shared corner posts

The extra section per gate is there because we don’t know where the gate goes. The fence on each side of it usually ends in a short section, and that short section needs its own post. Where two runs meet at a corner, they share one post. In a closed loop the last run ends on the first run’s starting post.

Pickets and the gap you’ll actually get

Pickets don’t divide evenly into most sections, so the calculator finds the whole number that comes closest to your gap and tells you the real gap:

pickets per section = section ÷ (picket width + gap), rounded
actual gap          = section ÷ pickets − picket width

For board-on-board, the back row is spaced so the front boards overlap each edge, and the count doubles. Alta Forest Products suggests 1/8 inch between privacy boards, citing the ASTM F537 fence standard, and 4 inches between back boards when you use 6 inch boards. With 5.5 inch boards, that 4 inch space leaves a 3/4 inch overlap on each side. We add 5% to the picket count for split and warped boards. That figure is our own estimate.

Rails

We suggest 2 rails per section below 5 feet and 3 rails from 5 feet up, which is common practice. Alta recommends 3 rails on every new fence. At 8 ft spacing each rail is a full 8 ft 2×4. At 6 ft spacing we cut 12 ft boards in half.

Post length and concrete

Quikrete’s directions for setting posts give the hole size:

hole depth    = post length ÷ 3, which is half the height above ground
post length   = height + hole depth, rounded up to 8, 10, or 12 ft
hole diameter = 3 × post width
concrete      = (π ÷ 4 × diameter² − post width²) × (depth − 3 in)

The top 3 inches of each hole get soil instead of concrete, as Quikrete’s Fast-Setting directions say. A 50 lb bag makes 0.375 cubic feet. Quikrete’s own example, two bags for a 3 inch post in a 9 inch hole 30 inches deep, is a little lean by this math, which gives about 2.3 bags. We go with the math so you don’t run short on the last post. For footings, slabs, or other concrete work, the concrete calculator compares every bag size.

A worked example

Say you’re fencing a backyard 6 feet high. One side is 50 feet with a 4 ft gate, the back is 80 feet, and the other side is 50 feet. The runs meet at both back corners. Posts are 8 feet apart, and the pickets are 5.5 inches wide with 1/8 inch gaps.

  • Side with the gate: 50 − 4 = 46 ft, which is 5.75 sections, rounded up to 6, plus 1 for the gate. That’s 7 sections and 9 posts.
  • Back: 80 ft is 10 sections and 11 posts.
  • Other side: 50 ft is 6.25 sections, rounded up to 7, with 8 posts.
  • Corners: 28 posts, minus 2 shared corners, is 26 posts for 24 sections.
  • Rails: 24 sections × 3 = 72 2×4s, 8 ft long.
  • Pickets: 17 per section with 0.15 inch gaps, 374 in all, or 393 with 5% extra.
  • Posts: 6 ft above ground plus a 36 inch hole is 9 ft, so buy 10 ft 4×4s.
  • Concrete: each 10.5 inch hole holds 1.42 cubic feet, so 26 posts take 99 bags of 50 lb Fast-Setting mix.

At our example prices the fence comes to about $3,100. The concrete often surprises people. That’s close to 4 bags a post, because a hole a third of the post length is deep. If your local code allows a shallower hole, set your own depth under the post settings. A 24 inch hole cuts the concrete to about 2.4 bags per post, but check your frost depth first.

Tips before you dig

  • Check your city’s code and any HOA rules before you buy anything. They can limit the height, say where on the lot a fence can go, and require a permit.
  • Set the corner, end, and gate posts first. Run a mason line between them, then set the line posts to the string.
  • Gate posts take the most strain. Consider 6×6 posts for gates, and pick 6×6 in the settings to see the extra concrete.
  • Keep the pickets and rails off the soil. Wood that touches the ground rots first.
  • Use galvanized or stainless steel fasteners so they don’t rust and streak the wood.
  • If you fill the hole to the top with concrete, slope it away from the post so rain runs off. Wait 4 hours before putting any strain on posts set with Fast-Setting mix.

Frequently asked questions

How many fence pickets do I need?

For a privacy fence with 5.5 inch pickets and 1/8 inch gaps, each 8 ft section takes 17 pickets. A straight 100 ft fence takes 212, or 223 with 5% extra for split and warped boards. Board-on-board takes about 20 per section, because it has two rows.

How many fence posts do I need?

Divide the length of each run by the post spacing, round up, and add one for the end post. A straight 100 ft run with posts 8 ft apart needs 13 sections and 14 posts. Runs that meet at a corner share the corner post. A gate is its own bay with a post on each side, and the fence next to it may end in a short section, so each gate adds one or two posts. Put a 4 ft gate in that 100 ft run and it needs 15 posts.

How deep should fence posts be?

Quikrete's rule is a hole one third of the post's full length. That works out to half the height above ground, so a 6 ft fence gets 36 inch holes and 9 ft posts, which means buying 10 footers. In cold climates the post must also go below the frost line, so ask your building department how deep that is.

How many bags of concrete per fence post?

It depends on the hole. A 4×4 post in a 10.5 inch hole 36 inches deep takes about 1.4 cubic feet, close to 4 bags of 50 lb Fast-Setting Concrete Mix. Quikrete says two bags set a 3 inch post in a 9 inch hole 30 inches deep, which is a smaller hole.

Should fence posts be 6 or 8 feet apart?

Eight feet is the usual spacing for wood fences, and it matches an 8 ft 2×4 rail. Go to 6 feet for very tall fences, windy sites, or a heavy board-on-board fence. The calculator cuts 12 ft rails in half for 6 ft spacing.

Do I need to call 811 before digging fence post holes?

Yes. 811 is the free national call-before-you-dig service. Contact it a few business days before you dig, and the utilities will mark their buried lines with paint or flags. A fence line may cross a gas, power, or cable line without any sign above ground.

Sources

  1. Fast-Setting Concrete Mix (No. 1004), product data sheet, Quikrete. Hole about 3 times the post width, depth one third of the post length, top 3 to 4 in filled with soil, 0.375 cu ft per 50 lb bag, two bags for a 3 in post in a 9 × 30 in hole.
  2. Concrete Mix (No. 1101), product data sheet, Quikrete. Yield of 0.45 cu ft per 60 lb bag and 0.60 per 80 lb bag; slope the top away from the post.
  3. Suggestions for Installation of Your Western Red Cedar Fence, Alta Forest Products. Three rails, 1/8 in between privacy boards (citing ASTM F537), 4 in between back boards for board-on-board with 6 in boards, no ground contact.
  4. 811 Before You Dig, Common Ground Alliance. Free national service; contact 811 a few business days before digging.

Last updated . Found a number that looks off? Tell us and we'll check it.