Fence Calculator

Enter the length of the fence and how far apart your posts go. You get the post, rail and picket counts, the size of every post hole, and how many bags of concrete it takes to set them.

Imperial units. Last reviewed August 12, 2026.

The run
Add up every side you are fencing.
6 to 8 ft on center is standard.
Rails and pickets
2 for a 4 ft fence, 3 for 6 ft, 4 for 8 ft.
A nominal 1x6 measures 5.5 in.
0 for a solid privacy fence.
Post holes
One third of the above-ground height, or below your frost line, whichever is deeper.

Fence materials

14posts

12 sections at 8 ft, plus 1 gate opening.

Posts
144x4, 8 ft long minimum
Rails
363 per section, 8 ft each
Pickets
2315.5 in wide, 0 in gap
Concrete
28 bags80 lb bags, or 42 bags of 60 lb

The numbers above are a worked example for a 100 ft solid privacy fence, 6 ft high, posts at 8 ft, with one 4 ft gate. Allow this page to run scripts in your browser to use your own numbers, or follow the formulas below and do it by hand.

Before the digging starts

Two calls and one cart. Call 811 to have your utilities located, free, before any post hole is dug in the United States. Then price the material, because lumber and concrete are the whole budget here.

Outbound links to suppliers may earn us a commission at no extra cost to you. We do not collect your name, email, phone number or address, and there is no form on this site.

How the fence calculator works, step by step

A fence is four quantities: posts, rails, pickets and the concrete that holds the posts. Each one comes from the run length and a single decision about spacing.

Step 1 - sections and posts fenced length = total length - (gates x gate width) sections = ceiling( fenced length / post spacing ) posts = sections + 1 + gate posts

The plus one is the post at the far end: a run of three sections needs four posts, the same way three fence panels need four supports. Gate openings are taken out of the fenced length first, because you do not picket across a gate, then each gate adds its own post.

Step 2 - rails rails = sections x rails per section

Two rails for a 4 ft fence, three for 6 ft, four for 8 ft. Each rail is cut to the post spacing, so an 8 ft spacing and 8 ft stock means no waste on rails, which is the main reason 8 ft spacing is so common.

Step 3 - pickets pickets = ceiling( fenced length x 12 / (picket width + gap) x (1 + waste rate) )

Note that this uses the actual width of the board, not the nominal name. A 1x6 fence board is 5.5 in wide, and a dog-ear picket is often 5.5 in as well. Using 6 in instead of 5.5 in undercounts a 100 ft fence by about 18 boards.

Step 4 - concrete per post hole hole diameter = post width x 3 hole volume (cu ft) = 3.1416 x (hole diameter / 24)^2 x (hole depth / 12) concrete = hole volume - post volume bags = ceiling( concrete per hole / bag yield ) x number of posts bag yield: 80 lb = 0.6 cu ft, 60 lb = 0.45 cu ft

Worked example: 100 ft of 6 ft privacy fence, 4x4 posts, one 4 ft gate

  1. Fenced length: 100 - 4 = 96 ft
  2. Sections: 96 / 8 = 12 sections
  3. Posts: 12 + 1 + 1 gate post = 14 posts, each 8 ft long (6 ft up, 2 ft down)
  4. Rails: 12 x 3 = 36 rails at 8 ft
  5. Pickets: 96 x 12 / 5.5 = 209.5, plus 10 % = 231 pickets
  6. Hole: 3.5 in post x 3 = 10.5 in diameter, 24 in deep
  7. Hole volume: 3.1416 x (10.5 / 24)^2 x 2 = 1.203 cu ft
  8. Less the post: 1.203 - 0.170 = 1.033 cu ft of concrete per hole
  9. Bags: 1.033 / 0.6 = 1.72, rounded up to 2 bags per hole, so 28 bags of 80 lb

The rounding on the last line is deliberate. You mix concrete one hole at a time, so the round-up happens per hole, not once at the end. Rounding at the end would tell you 24 bags and you would stop work at post eleven to go back to the store.

Bag yields per QUIKRETE, Concrete Mix product line (bag yields) - product line page. Post-setting depth and hole sizing follow the manufacturer's fast-setting mix instructions. Verify the yield printed on the bag you buy: fast-setting and high-strength mixes differ.

Post spacing, depth and the frost line

Spacing

Six to eight feet on center covers almost every residential fence. Eight feet is the economic choice because rail stock comes in 8 ft lengths. Six feet is stiffer, and it is the right call for a solid privacy fence in a windy location, because a 6 ft tall solid fence is a sail: every section is 48 square feet of surface for the wind to push on.

Measure on center, post middle to post middle. That is what the calculator assumes, and it is what makes the rail length equal the spacing.

Depth

The working rule is one third of the above-ground height in the ground, with a 24 in minimum. A 6 ft fence gets 24 in of post below grade, an 8 ft fence gets 32 in. Corner posts, end posts and gate posts carry more load than line posts and deserve an extra 6 in of depth and a wider hole.

Fence heightHole depthPost lengthHole diameter, 4x4
4 ft24 in6 ft10.5 in
5 ft24 in7 ft10.5 in
6 ft24 in8 ft10.5 in
8 ft32 in11 ft10.5 in

The frost line beats the rule

In any climate that freezes, the bottom of the post hole must sit below the local frost depth, or frost heave will lift the post out of the ground over a few winters. Frost depth ranges from nothing in the Gulf states to 60 in and more in northern Minnesota and Maine. Your local building department publishes the number for your jurisdiction, and it overrides the one-third rule whenever it is deeper. Enter that depth in the hole depth field and the concrete quantity follows it.

Hole diameter

Three times the post width is the standard: a 3.5 in post gets a 10.5 in hole, a 5.5 in post gets a 16.5 in hole. A wider hole is not wasted concrete, it is a bigger footing resisting the lever arm of the fence. A narrower hole is a post that leans.

Cases the simple formula does not cover

Corners and multiple sides

Calculate each straight run separately, then add the results and subtract one post per shared corner, because a corner post belongs to both runs. A rectangular yard fenced on three sides is three runs and two shared corners.

Ground that is not level

Measure the run along the ground, not on a map. On a slope you also choose between stepping the fence, where each section stays level and the panels step down, and racking it, where the rails follow the grade. Stepping needs longer posts at the low end of each step. Racking needs pickets cut to a slope and pushes waste toward 15 %.

Gates

A gate needs a post on each side, and both should be treated as heavier duty than a line post: a 6x6 instead of a 4x4 on the hinge side is normal for anything above a small pedestrian gate, set deeper and in a wider hole. A double drive gate needs the same on both sides. This calculator adds one post per gate opening on the assumption that the other side is shared with a line post, which is the usual layout.

Gravel base and drainage

Many installers put 4 to 6 in of gravel in the bottom of the hole so water drains away from the end grain of the post. If you do that, dig the hole that much deeper and keep the concrete depth as calculated, or the concrete estimate will run over.

Setting posts without concrete

Compacted gravel is a legitimate alternative in well-drained soil and makes a post far easier to replace later. It does not calculate the same way: gravel fills the whole hole minus the post, so the volume is the hole volume less the post volume with no bag rounding, and it is sold by the bag or the cubic yard.

Frequently asked questions

How many posts do I need for a 100 foot fence?

At 8 ft spacing, 100 ft is 13 sections, so 14 posts including both ends. At 6 ft spacing it is 17 sections and 18 posts. Take out any gate openings first, and add one post per gate. Corners count as one post shared by two runs.

How many bags of concrete per fence post?

For a 4x4 post in a 10.5 in hole 24 in deep, about 1.03 cu ft of concrete, which is two 80 lb bags or three 60 lb bags. A 6x6 post in a 16.5 in hole at the same depth needs about 2.6 cu ft, which is five 80 lb bags. Round up per hole, not at the end of the job.

How deep should fence posts be?

One third of the above-ground height, with a 24 in minimum, so 24 in for a 6 ft fence and 32 in for an 8 ft fence. In freezing climates the hole must also reach below the local frost line, and that requirement wins whenever it is deeper. Your building department publishes the frost depth for your area.

How many pickets for a 100 foot fence?

With standard 5.5 in boards butted tight, 100 ft is 1200 in / 5.5 = 219 boards before waste, so about 240 with a 10 % allowance. Leave a 1/2 in gap between boards and it drops to 200 before waste. The gap between pickets changes the count more than anything else on the page.

Should fence posts be 6 or 8 feet apart?

Eight feet is the standard and the cheapest, because rails come in 8 ft lengths and you buy fewer posts and dig fewer holes. Six feet is stiffer and is the better choice for tall solid privacy fence, exposed sites, or heavy panels. Never exceed 8 ft on center with standard 2x4 rails; they sag.

How long should the posts be?

Fence height plus hole depth. A 6 ft fence with 24 in in the ground needs 8 ft posts. An 8 ft fence with 32 in in the ground needs 11 ft posts, which is why tall fences cost disproportionately more: the post stock jumps to the next size and the concrete goes up with it.

Do I need to call before digging post holes?

Yes. In the United States, call 811 or file a locate request online before any digging, including post holes. The service is free, it is legally required in most states, and it marks buried gas, electric, water and telecom lines. Hitting one of those is significantly more expensive than the entire fence.