Skip to main content
Home ImprovementFree · no sign-up

Fence Calculator

Posts, panels, and gates for any run — with spacing and corner math done right.

Updated

100 ft

You need

14posts

set in concrete, one-third of post length in the ground

Panels
12
Gates
1
Sections
13

In short

How many fence posts and panels do I need?

Posts equal sections plus one, plus one more per corner. Divide the total run by your post spacing and round up to get sections: a 100 ft run at 8 ft spacing is 13 sections and 14 posts on a straight line. Panels equal sections minus gates, because a gate hangs between the same two posts a panel would have used.

Hole depth is a local question — frost depth varies by county and is set by your building department, so confirm the required footing depth, permit and setback rules before you dig.

How to use the fence calculator

Walk the fence line with a long tape or a measuring wheel and enter the total run in feet, adding every side you intend to fence into one number. Stake the line and pull a string before you measure: measuring along a string is how you get an honest length across a sloped or gently curved yard, where a tape laid on the ground consistently reads long.

Then count gates and, under Advanced, corners. A gate replaces a panel but keeps its posts, and a corner ends one straight run and begins another, which costs an extra post without buying you any extra section.

13

Sections in a 100 ft run

at the standard 8 ft spacing

14

Posts on a straight line

sections plus one

4 ft

The last section

the panel you cut down

Post spacing drives the whole bill of materials, and for most residential fences the panels decide it for you rather than the other way round. Prefab panels and rail kits come in fixed widths, the posts have to land on their ends, and an 8 ft panel therefore means 8 ft spacing, full stop.

Where you genuinely have a choice — building stick-style with rails and pickets — 8 ft is the economical standard and 6 ft buys stiffness, because shorter spans flex less in wind and sag less under wet pickets.

Other fence types set their own conventions: UGA Extension puts line posts 10 to 12 ft apart for most farm fences, and ASTM F567 caps chain-link line posts at 10 ft. None of those transfer to a tall privacy fence, which behaves like a sail.

Read the three outputs as three different shopping lists. Posts is the dig-and-set number: it drives how many holes you auger, how much concrete you carry, and how long the weekend gets.

QUIKRETE states that two 50 lb bags of its fast-setting mix will set a 4-inch post in a 10-inch hole 2 feet deep, so multiply that by your post count before the store run, and expect more for the bigger, deeper holes that corner and gate posts want.

Backfilling the holes with stone?

Post backfill is one of the jobs the compacted-base setting exists for, and stone is ordered as a volume in cubic yards or tons rather than by the bag.

Open the gravel calculator

Panels is what goes on the cart, and gates ride along as prefab units or hardware kits. Buy panels last if your run has a remainder, because a 100 ft run at 8 ft spacing ends in a 4 ft section that most people fill by cutting one panel down rather than ordering a custom width.

Do

  • Call 811 and wait for the locate before any hole is dug.
  • Stake the line and measure along a string rather than along the ground.
  • Match the post spacing to the width of the panels you are buying.
  • Ask the building department for the footing depth before you buy posts.

Don't

  • Leave off the final post, or the last panel has nothing to hang on.
  • Carry a farm or chain-link spacing across to a tall privacy fence.
  • Subtract a post for a gate, which hangs between the two a panel would use.
  • Order panels before you know how wide the leftover last section is.

Posts, sections and the awkward last piece, worked out across common run lengths. The last-section column is the one that catches people out: it is the panel you will be cutting down, and it is almost never a full width.

Fence run8 ft spacing: sections8 ft spacing: postsWidth of the last section at 8 ft spacing6 ft spacing: sections6 ft spacing: posts
20 ft344 ft45
30 ft456 ft56
40 ft568 ft — a full panel78
50 ft782 ft910
60 ft894 ft1011
75 ft10113 ft1314
100 ft13144 ft1718
125 ft16175 ft2122
150 ft19206 ft2526
200 ft25268 ft — a full panel3435
250 ft32332 ft4243
300 ft38394 ft5051
Computed July 2026 from the same engine this page runs, on a straight run with no corners. Add one post per corner. Sections round up, so the final section is whatever length is left over. Panel counts equal sections minus gates.

How deep should the posts be set?

Depth is where fences are won or lost, and it is the one figure this calculator deliberately will not give you. The carpentry convention is to bury a third of the post length, which is why a 6 ft privacy fence is built from 8 or 9 ft posts.

Extension guidance runs in the same direction: UGA Extension says wooden line posts should be set at least 2 ft deep and preferably deeper, with deeper settings in sand or wet soil, while Penn State Extension gives a typical line post depth of 36 inches and notes that corner and gate posts are about 25 percent larger in diameter and often go to 48 inches.

Penn State also names the failure mode directly — soils heave with frost and loosen posts that are not set deep enough. Your required depth relative to the frost line is a local code figure, so ask the building department before you buy posts.

From run length to sections, posts and panels Sections first, then everything else Round sections UP — a part-section still needs its own post. total length ÷ post spacing round UP sections the pivot number posts = sections + 1 + corners panels = sections − gates Both ends of a run need a post — that is where the + 1 comes from. WORKED EXAMPLE 100 ft run · 8 ft spacing · 1 gate 100 ÷ 8 = 12.5 → up 13 posts (13 + 1) 14 panels (13 − 1 gate) 12 Same 100 ft at 6 ft spacing: 17 sections · 18 posts · 16 panels
Run length and post spacing -> posts, panels, and gates.

The formula, worked line by line

A fence is the classic off-by-one problem dressed in cedar. Divide the run by the post spacing and round up, because a leftover 3 ft of yard still needs a section to close it, and you now have your section count.

Then add one, because a line of N sections is bounded by N + 1 posts: every section needs a post at each end, and every internal post is shared by the two sections either side of it. Miss that final post and the last panel has nothing to hang on.

Corners and gates then pull in opposite directions, which is why they are separate inputs. A corner is where one straight run stops and another begins, so it needs its own post but adds no section — one extra post, one extra hole, no extra panel. A gate is the reverse: it occupies a section that a panel would otherwise have filled, hanging between the same two posts, so it removes a panel and leaves the post count untouched.

sections = total length ÷ post spacing, rounded UP
posts = sections + 1 + corners
panels = sections − gates   [never below 0]
A fence has one more post than sectionsThree sections need four posts. The default 100-foot run at 8-foot spacing is 13 sections, so 14 posts, with 12 panels after one gate.N SECTIONS → N+1 POSTSpanelgatepanel12343 sections → 4 posts+1 post / corner100 FT @ 8 FTsections13+ 1 (+ corners)panels (− 1 gate)12posts14
The fencepost off-by-one: a run of N sections always needs N+1 posts.
A 100 ft run at 8 ft spacing
Sections
100 ÷ 8 = 12.5, rounded up to 13
Posts
13 + 1 = 14
Last section
4 ft, after 12 full bays
Panels with one gate
13 − 1 = 12
Shopping list
14 posts, 12 panels, 1 gate

Tighten the spacing to 6 ft and the same 100 ft becomes 100 ÷ 6 = 16.67, so 17 sections, 18 posts and 16 panels. That is four more posts, four more holes, and roughly eight more bags of concrete for the same length of yard.

Corners are worth walking through because they surprise people. Take a 60 by 40 ft rectangle you want fully enclosed: the run is 200 ft, which at 8 ft spacing is 25 sections. On a straight line that would be 26 posts, but a closed rectangle has four corners, and adding four gives 30.

Fence an L-shaped side yard instead, with one corner, and 200 ft comes to 27 posts. The corner count is not cosmetic — each one is a post that carries pull from two directions at once and is normally upsized and set deeper for exactly that reason.

Two things this arithmetic cannot decide for you, both local. The first is depth: frost depth is a county-level figure enforced by your building department, and a footing that is fine in Georgia will heave out of the ground in Minnesota.

The second is whether you are allowed to build the fence at all in the position you have staked — height limits, setbacks from the property line, corner-visibility triangles, and permit requirements vary street by street, and a survey pin is a much cheaper way to find your boundary than a neighbour with a tape measure. This is a materials estimate, not a plan set.

Questions people ask

Sources

Where the constants and formulas on this page come from. Each line names the figure it backs.

  1. The 36 inch typical line post depth, and that corner and gate posts run about 25 percent larger in diameter and often go to 48 inches.

    Fence Planning for HorsesPenn State Extension

  2. The 10 to 12 ft line post spacing for most farm fences, and the at-least-2-ft wooden post depth that goes deeper in sand or wet soil.

    Fences for the Farm, Circular 774University of Georgia Cooperative Extension

Shop post hole diggers on Amazon

Browse current options and prices directly on Amazon — we don’t list products here.

As an Amazon Associate we may earn from qualifying purchases.