GetTheAmount

Calculator

Fence Calculator

A fence run breaks into three separate quantities that each need their own count: posts (spaced at a fixed interval along the run), panels or pickets (filling the space between posts), and rails (the horizontal framing pickets attach to). Post spacing — typically 6 to 8 feet for wood privacy fence, sometimes different for other styles — is what actually drives post count, not just total run length divided by an assumed panel width.

This calculator works from total fence run length and post spacing to size posts, then panels/pickets and rails from the resulting bay count. Cross-reference the concrete post calculator for how much concrete each post hole needs, and see the panel a fence project guide for the full build sequence including the property-line check most fence guides skip.

Calculate your quantity

Posts

14 posts

Panels/spans

13 spans

Rails
39 rails
  • See the concrete post calculator for footing bag counts per post.

Shopping summary

  • 14 post(s)
  • 13 panel(s)
  • 39 rail(s)

This is an estimate — confirm structural work with a professional.

How this calculation works

Number of posts = (fence run length / post spacing) + 1, rounded to a whole post (spacing often needs slight adjustment across the actual run so bays come out even rather than leaving one short leftover bay). Panels or picket bays = number of posts minus 1, since each bay sits between two adjacent posts. Rails = bays x rails-per-section (typically 2-3 horizontal rails per section for a wood privacy fence, more for taller fences).

Post spacing itself isn't arbitrary — it's set by the panel/picket material's structural span and by local wind load if you're in a high-wind region. A taller privacy fence in a windy area often needs tighter post spacing (closer to 6 feet) than a shorter fence in a sheltered yard, since more fence surface area means more wind load transferred to each post; see fence post spacing guide for spacing by material, height, and wind region.

The formula

spans = ceil(runLength / postSpacing); posts = spans + 1; rails = spans × railsPerSpan

spans = ceil(runLength / postSpacing)
The number of BAYS along the run, rounded up — a run that divides evenly into whole spacings costs no extra, but any remainder forces a whole additional span, which is why real post spacing on site is usually a hair tighter than the target figure entered here, not looser.
posts = spans + 1
One more post than span count, because posts sit at both ends of the run as well as between every span — a run with 1 span has 2 posts, not 1, the same off-by-one relationship a fence, a picket railing, or a row of evenly spaced items always has.
rails = spans × railsPerSpan
Rails scale with spans, not posts — railsPerSpan is the count of horizontal members running between one pair of adjacent posts, so this multiplies against the bay count, not the post count, and the two totals diverge more the shorter the run.

Where these numbers come from

6-8 ft post spacing for wood privacy fence
Trade convention; this calculator applies no wind-load or height check against the entered spacing, so a taller fence in a high-wind region needing tighter spacing than 6 ft has to be entered deliberately, not flagged automatically.
2-3 rails per span for a standard privacy fence, more for taller fences
Trade convention, entered directly as railsPerSpan rather than derived from fence height, since this calculator has no height field at all — rail count is a purely user-supplied structural choice here.
posts = spans + 1, not runLength / postSpacing rounded
Working through the function's arithmetic explains the +1: rounding the raw division alone would under-count posts by exactly one on every run, since a post is needed to close BOTH ends of the fence, not just to mark the interior gaps between spans.

Worked examples

A 140 ft run, 8 ft spacing, 2 rails per span

Inputs
Fence run length140 ft
Post spacing8 ft
Rails per span2
Result
Posts19 posts
Panels/spans18 spans
Rails36 rails

140 ft at 8 ft spacing needs 18 spans (140/8 = 17.5, rounded up), which means 19 posts and 36 rails at 2 per span — a picket-style fence with fewer horizontal members than a full privacy fence would carry.

That half-span remainder (17.5 rounding to 18) is where actual on-site spacing comes from: 140 ft split across 18 spans works out to about 7.8 ft between posts, slightly tighter than the 8 ft target entered, not the other way around.

The same 140 ft run, tighter 5 ft spacing for a tall, wind-exposed fence

Inputs
Fence run length140 ft
Post spacing5 ft
Rails per span3
Result
Posts29 posts
Panels/spans28 spans
Rails84 rails

Tightening spacing from 8 ft to 5 ft — a reasonable adjustment for a taller privacy fence exposed to real wind load — takes this from 19 posts to 29, a 53% jump in post count for a 37.5% reduction in spacing, because posts don't scale one-to-one with spacing changes once the ceil() rounding is involved on a run this length.

Rails grow even faster here: 84 against the wider-spacing run's 36, more than double, from two factors compounding together — more spans AND more rails required per span for the taller, sturdier build this spacing implies.

Common mistakes

  • Dividing run length by a round spacing number without adjusting for the actual terrain, leaving an odd-width leftover bay at the end of the run.
  • Not checking property lines and local fence-height/setback rules before ordering materials — a wrong material order is a minor cost; a fence built over a property line is a much bigger problem.
  • Underestimating post spacing needs in high-wind areas, which is a structural issue, not just a materials-count one.
  • Forgetting gate posts, which typically need to be set with more concrete and sometimes a larger post size than standard line posts, since gates add lateral stress.
  • Not planning for slope — a fence run over sloped ground either steps down in level sections or racks (rails follow the slope at an angle), and each approach uses material slightly differently, which is worth deciding before ordering panels.
  • Ordering pickets without a spacing gap plan — even a 'solid' privacy fence typically has a small gap between pickets for wood movement, which affects how many pickets actually fit a given bay width.

Shopping summary

Order posts at the spacing-derived count (plus corner/gate posts, which may need to be a larger size), panels or picket sets for each bay, rails per bay per the fence height, and concrete per post from the concrete post calculator; this is a structural project — confirm post spacing and depth for your wind region with a professional before setting posts.

Worked example: a 100-foot fence run at 8-foot post spacing needs (100/8) + 1 = 13.5, rounded to 14 posts (adjusting actual spacing slightly to land evenly), which gives 13 bays. At 3 rails per bay for a 6-foot privacy fence, that's 39 rails, plus 13 picket sections or panels, plus concrete for all 14 holes from the concrete post calculator.

FAQ

What post spacing should I use?

6 to 8 feet is standard for most wood privacy fence, with tighter spacing (closer to 6 feet) recommended in high-wind regions or for taller fences, since a taller fence catches more wind load per linear foot.

Do corner and gate posts need anything different?

Yes — they usually carry more structural load than a straight line post and are commonly set larger and with more concrete, especially gate posts, which take repeated lateral stress every time the gate opens and closes.

How many pickets fit in a standard fence bay?

It depends on picket width and gap spacing, but a typical 6-inch picket with a small gap fits roughly 12-14 pickets in a standard 6-8 foot bay — always calculate this from your specific picket width and desired gap rather than assuming a round number, since picket width varies meaningfully between products.

Should I order pre-built panels or individual pickets, rails, and posts?

Pre-built panels save labor and are simpler to install but lock you into that panel's fixed width for post spacing, while individual components (posts, rails, pickets bought separately) give more flexibility to match an irregular run length exactly, at the cost of more on-site cutting and assembly time.

Where to go next

The projects this number is a step of, the guides that explain the method behind it, and the rest of its trade group.