Fence Calculator

Enter the total run, the fence height, your post spacing and the style you are building, and this calculator returns the post, rail, picket or panel and concrete counts. Corner and end posts are counted separately because they carry different loads.

Set by your panel or rail length, not by preference. 8 ft for panels, 10 ft for chain link.

Every direction change. These take load from two runs at once.

Where the fence stops, meets the house, or hangs a gate.

Posts
21posts
16 line, 2 corner, 2 end, 1 gate
Sections
19at 8.0 ft
Pre-built panels
19panels
Rails
57rails
Post hole depthone-third of the above-ground height, check your frost line
2.0ft
Concreteabout 2 bags per hole at this depth
3380 lb bags
Gate hardware setshinges, latch and a drop rod per gate
1sets
Estimated material costmaterial only, no labour
$3,175

What this figure includes

Counts assume a straight run divided into equal sections at your post spacing, with the last section cut to fit. It does not model slope-stepped panels, retaining or grade changes, rock excavation, concrete for gate posts sized larger than line posts, post caps, stain, or fasteners beyond gate hardware. Post depth is the one-third rule and may be less than your local frost line or code requires. Material prices are retail shelf prices with no labour or delivery.

How this is calculated

The formula

A fence takeoff is a division problem followed by a plus-one:

Sections = total run ÷ post spacing, rounded up

Posts = sections + 1, plus one extra post per gate opening

The plus-one is the part people forget. Ten sections need eleven posts, because every section needs a post at each end and the last one has nowhere to borrow from. Miss it on a 40-post job and you make a second trip for one post.

Rails = sections × rails per section. Three rails per section on a 6 ft privacy fence, two on a low picket, three on split rail, and a single top rail on chain link.

Pickets = run in feet × pickets per foot. A 5½ in picket butted tight is 2.18 per foot; spaced at a picket's width apart it is about 1.1 per foot. The calculator uses 2.1 as a snug default.

A worked example

A 150 ft run of 6 ft privacy panels, 8 ft spacing, one gate, two corners, two ends, posts set in concrete.

  • Sections: 150 ÷ 8 = 18.75, round up to 19
  • Posts: 19 + 1 = 20, plus 1 for the gate = 21 posts
  • Panels: 19
  • Rails inside the panels: 19 × 3 = 57
  • Post depth: 6 ÷ 3 = 2 ft
  • Hole volume at 10 in diameter, 2 ft deep, less the post: about 1.1 cu ft
  • Concrete: 21 × 1.1 ÷ 0.6 cu ft per bag = 39 bags of 80 lb mix

That is roughly two bags a hole, which matches what any fence crew loads onto the truck.

Post spacing is not a preference

This is the single most common mistake on a DIY fence. People pick 8 feet because it sounds right, then buy 6-foot panels, and end up with a two-foot gap they have to fill with something ugly.

Spacing is dictated by the material. Pre-built privacy panels are almost always 8 ft wide, so posts go at 8 ft centres and the panel spans between them. Split rail comes in 10 ft rails with the tenons already cut, so posts are at 10 ft. Chain link uses 10 ft as the maximum by code in most places and the fabric will simply sag beyond that. Only on a stick-built picket or board fence, where you cut your own rails, do you get to choose — and even then 8 ft is the practical maximum for a 2x4 rail before it bows in the middle.

Measure your run, decide the material, and let the material set the spacing. Then absorb the odd remainder in one short section, ideally at a corner where the eye does not read it.

Corners and ends are different posts

A line post has equal tension pulling from both sides and effectively cancels out. A corner post has two runs pulling on it at ninety degrees, and an end or gate post has an unbalanced pull from one side only, plus, in the case of a gate, a swinging load that tries to lever it out of the ground every time someone opens it.

So corner, end and gate posts get upgraded. On a wood fence that means a 6x6 instead of a 4x4, or at minimum a deeper and wider footing — plan on a hole a third deeper and an extra bag of concrete. On chain link, terminal posts are a heavier gauge and larger diameter than line posts, and every fitting is different; ordering all line posts is a classic first-time mistake. A gate post that was set like a line post is the reason most gates drag on the ground within two years.

The one-third rule and the frost line

The working rule for post depth is one third of the above-ground height, so a 6 ft fence goes 2 ft down, an 8 ft fence goes about 2 ft 8 in. That is the stability requirement — enough embedment that wind load cannot lever the post over.

The frost line is a separate and often deeper requirement. Where the ground freezes, water in the soil expands and heaves anything shallower than the frost depth straight up out of the ground, a little each winter. Northern states commonly run 36 to 48 inches, and local code will state the number. Whichever is deeper — one third or the frost line — wins.

Two details make concrete footings last: crown the top of the concrete so it sheds water away from the post rather than holding a puddle against the end grain, and put three or four inches of gravel in the bottom of the hole so the post foot drains instead of sitting in a concrete bathtub. In well-drained soil, tamped gravel alone is a legitimate alternative and makes the post far easier to replace later.

Cost figures last reviewed 9 Sept 2026 · US big-box shelf prices for pressure-treated fence stock, pre-built privacy panels and galvanised chain link. Material only, no labour or delivery.

Frequently asked questions

How many posts do I need for a 150 ft fence?
At 8 ft spacing, 19 sections and 20 posts, plus one extra post for each gate opening. The rule is sections plus one — the final section needs a post at its far end that no other section provides.
How far apart should fence posts be?
Let the material decide. Pre-built privacy panels are 8 ft, split rail is 10 ft, chain link is 10 ft maximum. On a stick-built fence 8 ft is the practical limit before a 2x4 rail starts to bow.
How deep should fence posts be?
One third of the above-ground height — 2 ft for a 6 ft fence — or your local frost line, whichever is deeper. In northern climates the frost line often governs at 36 to 48 inches.
How many bags of concrete per fence post?
About two 80 lb bags for a 4x4 in a 10 in wide, 2 ft deep hole. Corner, end and gate posts want a bigger hole and typically take three. Crown the top so water runs off the post rather than pooling.
Do fence posts have to be set in concrete?
No. Tamped gravel drains better, moves with frost instead of fighting it, and makes replacing a rotten post far easier. Concrete is stronger against wind load and is worth it for gate and corner posts even if the line posts go in gravel.
How many pickets do I need per foot?
About 2.1 pickets per foot for standard 5½ in boards butted tight, allowing for the gap that opens as they dry. A spaced picket fence with a picket's width between boards needs roughly 1.1 per foot.