Fence Calculator

Run length and post spacing give sections, posts, and rails; your picket width and gap give the picket count; and the optional hole dimensions give setting concrete using the same displacement math as the post hole calculator. The counting convention — a shorter final bay, never a stretched one — is stated below and locked in tests.

Run, spacing, and parts

Example: 100 ft at 8 ft o.c. → 13 sections, 14 posts, 26 rails, 210 pickets (5.5 in + 0.5 in gap, 5% waste).

Units

Enter the run and spacing to lay out the fence.

Boundary note: post embedment, frost depth, wind loading, and fence-height rules are code- and site-governed — check your local requirements. Hole dimensions here are your own; the concrete math only totals what they hold.

The convention, worked through

The worked fence: 100 ft at 8 ft on-center is ceil(100 ÷ 8) = 13 sections — 12 full bays and one 4 ft bay — so 14 posts and 26 rails at 2 per section. Pickets: each 5.5 in board + 0.5 in gap covers 6 in of run, 1,200 ÷ 6 = 200 net, 5% waste → 210, and the round-up buys 210 pickets. Setting concrete, reusing the post-hole engine: 0.92 cu ft per hole × 14 holes = 12.89 cu ft, + 10% = 14.18 cu ft — 38 bags of 50 lb mix or 24 of 80 lb. All computed at build time by the same engine wired to the form.

Two of those figures are allowances rather than measurements: the 5% on the pickets and the 10% on the concrete. The guide Waste factors, explained covers what the percentage stands for, why it is applied to the quantity before anything is rounded, where every default on the site comes from, and why this fence tool is the instructive edge case — its allowance applies to pickets alone. Read it if the allowance is new to you. The rest of this page explains what this calculator does with the numbers you give it, stage by stage, and how to read what comes back.

What the calculator computes, stage by stage

Every estimator on this site follows the five-stage pipeline documented on the methodology page. The fence engine runs it twice, in effect: once for the line — sections, posts, rails — where every figure is an exact layout count and the purchasing stages do not apply, and once for the pickets, where coverage, waste, and rounding all do. When you give it hole dimensions it hands the posts to the post hole engine for a third pass, so the two tools cannot disagree; this page's build checks that they do not. The engine counts material for a layout you have already decided and makes no structural decision at any stage: quantities only.

  1. Geometry. The run is the sum of your straight segments, in feet. Sections are ceil(run ÷ spacing), taken through the same guarded ceiling the package round-up uses, so an exact multiple of the spacing never gains a phantom section from floating-point noise. Posts are sections + 1 — one at each end plus one per joint between bays — plus whatever gate posts you add; rails are sections × rails per section; and the last section is run − (sections − 1) × spacing, which is the only bay that can be shorter than your spacing. The worked fence spread evenly over 12 bays would put each at 8.33 ft, wider than the spacing you chose, which is why the engine refuses to stretch. For the concrete, the geometry is the post hole engine's: a cylinder of your hole diameter and depth minus the square post embedded the full depth, in cubic feet — 1.09 cu ft of hole less 0.17 cu ft of post on the worked fence.
  2. Coverage. For the pickets the "unit" is one picket plus its gap, and what it covers is (width + gap) inches of run. Net pickets = run in inches ÷ (width + gap), a fractional figure the engine carries unrounded. For the concrete, the divisor is the manufacturer's yield per bag, applied once per bag size the engine reports. The line counts have no coverage stage at all.
  3. Waste. Two allowances, kept apart. The picket count is multiplied by (1 + waste ÷ 100) with the percentage from the form; the default 5% is a trade convention recorded in the site's materials data for the occasional split picket, not a manufacturer figure, and you can replace it. The concrete volume is multiplied by the concrete convention of 10%, which this form applies as given — the post hole calculator is where that percentage is editable. Sections, posts, and rails get no allowance, because a layout count is exact.
  4. Package rounding. The waste-adjusted picket count rounds up to a whole picket, and the adjusted concrete volume is divided by each bag yield and rounded up to whole bags. Both ceilings carry the shared engine's exact-fit guard, so a quantity within one part in a billion of a whole number is treated as that whole number. These are the only roundings in the chain, and both go up.
  5. User-priced cost. A price per picket, if you give one, is multiplied by the pickets to buy — the rounded figure, because that is what you purchase. This form takes no bag price; the site ships no price of its own, and leaving the field blank removes the line.

Why each input matters

Total run is the length of fence line, in decimal feet, with every straight segment added together. The engine treats it as one continuous line: the picket count scales with it directly, the section count steps with it at each multiple of the spacing, and the posts and rails follow the sections. A tape reading in feet and inches goes in as decimal feet — the feet & inches calculator handles that conversion — and segments that each need to end on a post are a layout decision the engine does not make for you.

Post spacing sets the section count and, through it, everything on the line. The counts move in whole steps: 100 ft at 8 ft on-center is 13 sections with a 4 ft final bay, while 96 ft at the same spacing is exactly 12 sections and 13 posts, with a final bay of the full 8 ft. Which spacing is right for the posts, rails, and panels you are using is the question the boundary note under the form hands to your plan and your local requirements; the tool lays out the spacing you tell it.

Rails per section is a straight multiplier on the section count and touches nothing else: the worked fence takes 26 rails at 2 per section and 39 at 3, with the same 14 posts and 210 pickets either way.

Extra gate posts are added to the post count and therefore to the holes and the concrete, and to nothing else — not to the sections, not to the rails, and not to the pickets, which run across the opening as if it were fence. The 150 ft fence in the examples has 19 sections and 20 line posts; its 2 gate posts make 22 posts to set.

Picket width and gap set the pitch, and the picket count moves inversely with their sum. The 5.5 in the field offers is the dressed width of a nominal 6 in board — a sourced figure, listed below — shown as a placeholder rather than applied as a default: leave the width blank and the result carries no picket line at all, because the tool will not guess your board. A gap of 0 is a legitimate entry for butted privacy pickets: the 60 ft privacy fence in the examples needs 130.91 net pickets from 720 in of run at a 5.5 in pitch. The engine sees only the sum of width and gap, so a narrow board with a wide gap and a wide board with a narrow gap that add to the same pitch give the same count.

Picket waste applies to the picket count only, so it moves the order in whole pickets. On the worked fence the default takes 200 net to 210; set the field to 0 and the same fence buys 200, because the net count is already a whole number and the exact-fit guard keeps it one. What the percentage should be for your own layout is the subject of Waste factors, explained.

Price per picket touches only the last stage. It never feeds back into the quantity, so you can add or change it after the fact without disturbing the count.

Hole diameter, hole depth, and post size switch the concrete on: enter a diameter and a depth together and the engine subtracts the post from each hole and totals the bags. The post size is the actual square section, defaulting to the dressed 3.5 in of a 4×4 when the field is blank; a 6×6 is 5.5 in. The engine checks that the post fits — its corner-to-corner diagonal, 4.95 in for a dressed 4×4, must sit inside the hole diameter — and refuses the calculation otherwise. As the note under the form says, the dimensions are yours: the manufacturer's setting-posts guidance quoted in the FAQ suggests a hole 3× the post width — 10.5 in for a dressed 4×4 — as a labeled starting point, never applied automatically, and the depth your site needs is a question for the local building department.

The units toggle changes what the fields expect, not what is computed. In metric mode, meters are divided by 0.3048 and centimeters by 2.54 — both exact definitions — before the engine sees them, and the bag rows switch to the kilogram sizes with their own manufacturer yields. The result panel prints the run, the last section, and the concrete volume in feet and cubic feet in both modes; the metric example below converts them back for the page.

The figures this page relies on

  • Default picket waste, 5% — a common trade convention recorded in the site's materials data, where it is labeled a convention because no primary source publishes a universal figure; it covers the occasional split picket. Adjustable in the form, and applied to pickets only.
  • Concrete waste, 10% — the concrete convention from the same data, the common allowance for spillage and an uneven subgrade. This form applies it as given; the post hole calculator exposes it for editing.
  • Default post size, 3.5 in — the minimum dry dressed size of a nominal 4 in dimension piece under Voluntary Product Standard PS 20-20, the American Softwood Lumber Standard published by NIST (Table 3), recorded in the materials data with its source; the same table dresses a 6×6 to 5.5 in. A published-standard figure, editable for rough-sawn or non-standard stock.
  • Picket placeholder, 5.5 in — the dressed width of a nominal 6 in board under the same standard. A placeholder, not a default: the engine counts no pickets until you enter a width.
  • Concrete mix yield per bag — 40 lb → 0.3 cu ft; 50 lb → 0.375 cu ft; 60 lb → 0.45 cu ft; 80 lb → 0.6 cu ft. Manufacturer figures from the QUIKRETE Concrete Mix (Product No. 1101) product data sheet, which the manufacturer states as approximate. In metric mode, 25 kg → 0.43 cu ft; 30 kg → 0.52 cu ft, the yields Target Products publishes for the two Canadian bag sizes — not scaled from the pound figures.
  • Hole-sizing guidance, 3× the post width — QUIKRETE's "Setting Posts in Concrete" project guide, recorded in the materials data as the manufacturer's installation guidance, not a building code. Surfaced as a labeled suggestion beside fully user-entered hole dimensions and never auto-applied.
  • Inches per foot, 12; meters per foot, 0.3048; centimeters per inch, 2.54; cubic meters per cubic foot, 0.028316846592 — exact definitions, used to turn the run into inches for the picket count, to convert metric entries into the engine's feet and inches, and to present the metric example's concrete in m³.
  • Price — none. This page holds no picket or bag price. A cost appears only as your entry, as the methodology page states.

Worked examples

Every figure in this table was produced at build time by the same engine that runs the form above. Unless the label says otherwise, each fence uses 2 rails per section, the 5.5 in picket with a 0.5 in gap, the default 5% picket waste, dressed 4×4 posts in 10 in × 24 in holes, and the 10% concrete convention; the metric row was entered as meters and centimeters and converted exactly before the engine ran, which is what the metric toggle does.

Fence Sections (last) Posts Rails Pickets net → to buy Concrete, adjusted Bags
100 ft at 8 ft o.c., 2 rails, 5.5 in + 0.5 in, 4×4 in 10 × 24 in 13 (4 ft) 14 26 200 + 5% → 210 14.18 cu ft 48 × 40 lb, 38 × 50 lb, 32 × 60 lb, 24 × 80 lb
100 ft at 8 ft o.c., 2 rails — no picket waste 13 (4 ft) 14 26 200 + 0% → 200 14.18 cu ft 48 × 40 lb, 38 × 50 lb, 32 × 60 lb, 24 × 80 lb
96 ft at 8 ft o.c., 2 rails, same pickets and holes 12 (8 ft) 13 24 192 + 5% → 202 13.17 cu ft 44 × 40 lb, 36 × 50 lb, 30 × 60 lb, 22 × 80 lb
60 ft at 6 ft o.c., 3 rails, 5.5 in + 0 in gap 10 (6 ft) 11 30 130.91 + 5% → 138 11.14 cu ft 38 × 40 lb, 30 × 50 lb, 25 × 60 lb, 19 × 80 lb
150 ft at 8 ft o.c., 2 gate posts, 4×4 in 12 × 30 in 19 (6 ft) 22 38 300 + 5% → 315 42.37 cu ft 142 × 40 lb, 113 × 50 lb, 95 × 60 lb, 71 × 80 lb
48 ft at 6 ft o.c., 6×6 (5.5 in) in 18 × 36 in 8 (6 ft) 9 16 96 + 5% → 101 46.25 cu ft 155 × 40 lb, 124 × 50 lb, 103 × 60 lb, 78 × 80 lb
100 ft at 8 ft o.c., priced at $3.00 per picket 13 (4 ft) 14 26 200 + 5% → 210 14.18 cu ft 48 × 40 lb, 38 × 50 lb, 32 × 60 lb, 24 × 80 lb
30 m at 2.4 m o.c., 14 cm + 1.3 cm, 8.9 cm post in 25 × 60 cm 13 (3.94 ft) 14 26 196.08 + 5% → 206 13.43 cu ft 32 × 25 kg, 26 × 30 kg

The worked fence, with and without an allowance. The geometry is the same in both rows: 13 sections, 14 posts, 26 rails, and 200 net pickets. With the default 5% the allowance takes the pickets to 210 and the round-up buys 210; with the waste field at 0 they are 200. The allowance is therefore 10 pickets on this fence, and the concrete does not move at all — 14.18 cu ft and 38 bags of 50 lb mix either way, because its allowance is the separate concrete convention.

The exact multiple. 96 ft at 8 ft is 12 sections on the nose, so the engine reports 12 sections, 13 posts, 24 rails, and a last section of 8 ft — the full spacing. The guarded ceiling is what keeps a binary hair above 12 from buying a phantom section and the extra post that would come with it. Pickets: 1,152 ÷ 6 = 192 net, 202 to buy; concrete 13.17 cu ft for 13 holes.

The privacy fence. 60 ft at 6 ft on-center is 10 sections and 11 posts, and at 3 rails per section the rail count is 30. Butted pickets have a pitch of just the board width, 5.5 in, so 720 in of run needs 130.91 net pickets and 138 after the allowance and the round-up. Closer posts mean more holes for the length: 11 holes come to 11.14 cu ft of concrete, against 14.18 cu ft for the 100 ft fence at 8 ft.

The fence with a gate. 150 ft at 8 ft on-center is ceil(18.75) = 19 sections with a 6 ft final bay, 20 line posts plus the 2 gate posts for 22 in all, and 38 rails. The pickets run the full length — 300 net, 315 to buy — because the engine does not subtract the opening. The holes are 12 in × 30 in: 1.75 cu ft each, 38.52 cu ft for 22 holes, 42.37 cu ft after the allowance, and 71 bags of 80 lb mix. The gate posts are counted in the concrete because they are set exactly like line posts.

Heavier posts. 48 ft at 6 ft on-center is an exact 8 sections and 9 posts, with 101 pickets. The posts are dressed 6×6 — 5.5 in — in 18 in × 36 in holes, so each hole takes 4.67 cu ft, 5.07 times the worked fence's 0.92: a wider hole grows with the square of its diameter and a deeper one in proportion, and the larger post subtracts only a little of that back. 9 holes come to 46.25 cu ft after the allowance and 78 bags of 80 lb mix. Whether a fence needs posts and holes this size is a question for your plan and your building department; the engine totals the concrete for whatever you enter.

The priced fence. The worked fence again, this time with $3.00 typed into the price-per-picket field as a stand-in for whatever your supplier quoted. The quantity does not change — 210 pickets — and the cost line is 210 × $3.00 = $630.00. The price is a placeholder chosen only to show the arithmetic; the site holds no price, and the line multiplies the rounded picket count because the rounded count is what you buy. Posts, rails, and bags carry no price on this form.

The metric fence. In metric mode, 30 m at 2.4 m on-center reaches the engine as 98.43 ft at 7.87 ft: 13 sections, 14 posts, 26 rails, and a last section of 3.94 ft, which is 1.2 m. The 14 cm picket and 1.3 cm gap become 5.51 in and 0.51 in, a pitch of 6.02 in, so 1,181.1 in of run needs 196.08 net pickets and 206 to buy. The 25 × 60 cm hole around an 8.9 cm post is 9.84 × 23.62 in around 3.5 in — the dressed 4×4 is 8.89 cm, which the field placeholder rounds, just as the 5.5 in picket is 13.97 cm — giving 0.87 cu ft per hole and 13.43 cu ft after the allowance, or 0.38 m³ through the exact factor. The bag rows read 32 bags of 25 kg (0.43 cu ft each) or 26 bags of 30 kg (0.52 cu ft each) — the manufacturer's own metric yields, not the pound figures rescaled.

How to read the result

The headline line is the purchase: N posts, N rails, N pickets, with the picket count present only when you entered a width. Beneath it, N sections gives the section count with the length of the last section — the one bay that may be shorter than your spacing, and the figure to check against your rail and panel lengths. Pickets shows the net count and the percentage that was added, then the whole pickets to buy, so you can see how much of the order is allowance. A cost line appears only when a price is entered and multiplies the pickets to buy. Setting concrete appears only when a hole was entered: it shows the net cubic feet per hole, the number of holes, and the concrete percentage, then the adjusted volume, followed by one row per bag size with the whole bags each would take — four pound sizes in imperial mode, two kilogram sizes in metric. The bag rows are alternatives, not a sum: pick the size you will buy. Read the section line against your layout, the picket line against your board and gap, the concrete line against your holes, and the headline to place the order. The copy button places a short plain-text summary of the result on the clipboard.

Common misreadings

A spacing in inches. Run and spacing go in as feet; pickets, gaps, holes, and posts as inches. Enter 8 ft on-center as 96 and the engine sees 96 ft bays: the worked fence collapses to 2 sections, 3 posts, and 4 rails, with a last section of 4 ft, while the picket count stays at 210 because it depends on the run alone. There is no error, because 96 ft is a legitimate spacing for something. A post count that looks absurdly low under a picket count that looks right means the spacing field.

A hole depth in feet. The slab tools' thickness-in-feet error in this tool's clothing. Type the worked fence's 24 in depth as 2 — its depth in feet — and the engine sees a hole 2 in deep: 0.08 cu ft per hole, 1.18 cu ft in all, and 4 bags of 50 lb mix instead of 38 — 12 times too little concrete, because there are 12 inches to the foot. The line counts are untouched, which is the tell: a fence that looks right over a bag count that looks like a single hole means the depth field.

A hole diameter in feet. The same slip on the diameter is caught. Type the 10 in hole as 0.83 and the engine sees a hole 0.83 in across, into which a post with a 4.95 in diagonal cannot go; it refuses with "The post is too wide for this hole — its corner-to-corner diagonal must fit inside the hole diameter." rather than subtract a post that could not be there. The message is the engine's own, asserted when this page was built.

A post at its nominal size. A 4×4 is 3.5 in, not 4; the form's default is the dressed size. Type 4 and the engine subtracts a larger post from every hole: 0.87 cu ft per hole instead of 0.92, 13.38 cu ft instead of 14.18, and 36 bags of 50 lb mix against 38. The difference is small on this fence, and it is in the direction of buying too little — enter the actual post you will set.

Metric figures in the imperial fields. The metric fence above is 30 m at 2.4 m with 14 cm pickets and 25 × 60 cm holes. Type those same numbers with the toggle still on Imperial and the line counts survive — 13 sections and 14 posts, because the ratio of run to spacing is the same in any unit — but the pickets become 14 in boards along a 30 ft run, 25 of them instead of 206, and the holes become 25 × 60 in: 220.13 cu ft of concrete against 13.43. A post count that looks right over a picket count that looks tiny and a bag count that looks enormous means the toggle.

Waste as a fraction. The waste field takes a percentage. The worked fence at 5% buys 210 pickets; typed as 0.05 it is read as 0.05%, and the count drops to 201 — the allowance all but gone, with no warning, because a fraction of a percent is a valid input.

Padding twice. Rounding the run up before entering it, adding a margin to the picket count afterwards, or rounding the concrete up hole by hole repeats work the pipeline already does: the allowance is applied to the quantity and the round-up to the allowance, exactly once each, and the bag round-up happens once on the total rather than once per hole. The no-waste row in the table shows what the rounding alone adds; the allowance is meant to be the only other margin.

Where the model stops

The engine models one continuous run of fence at a single post spacing, with every section carrying the same rails, pickets laid at one pitch along the whole run, and every post set in an identical hole. It does not model corners or the posts they share between segments, a gate opening in the picket run, panels bought pre-assembled instead of built from pickets and rails, caps, kickboards, or the fasteners and hardware that fix any of it — none of those are counted, and the picket allowance is the single flat percentage you are given to fold the pickets' share of them into. The concrete is the post hole engine's displacement geometry and nothing more: a gravel base under the post is not subtracted unless you reduce the depth you enter, and the concrete allowance is the convention applied as given. The tool holds no price. And, as the boundary note under the form says, it makes no structural or code decision: post embedment, frost depth, wind loading, and fence-height rules are code- and site-governed, hole dimensions here are your own, and the spacing and post size you enter should already carry that review. The site estimates material quantities only. The methodology page lists the simplifications every estimator shares.

Deeper on any piece

Per-hole concrete detail (round posts, bag pricing, an editable concrete allowance) lives in the post hole calculator — the same math, one hole at a time. Rails and pickets by the running foot are the linear feet calculator's specialty, lumber volume for priced-by-the-board-foot stock is the board foot calculator's, and a deck behind the fence starts at the deck calculator, whose joists are exact layout counts in the same way the posts here are. The feet & inches calculator turns tape readings into decimal feet, and the construction unit converter moves any figure between feet and meters. For the allowance itself, see waste factors, explained; for the bag yields the concrete line divides by, concrete bag yields by size; for the pipeline, how material estimates are calculated; or browse all guides.

Frequently asked questions

How are posts counted when the run is not a multiple of the spacing?

The tool never stretches a span beyond your chosen spacing: sections = ceil(run ÷ spacing), and posts = sections + 1. A 100 ft run at 8 ft on-center is 13 sections — 12 full 8 ft bays plus one 4 ft bay — needing 14 posts and, at 2 rails per section, 26 rails. The alternative (stretching 12 bays to 8.33 ft) would exceed the spacing your rails and panels are sized for, so the shorter last bay is the convention this site locks in and tests.

How are pickets counted?

Each picket plus its gap occupies (width + gap) inches of run, so the count is run ÷ (width + gap) with your waste percentage applied before rounding up. A 100 ft run with 5.5 in pickets (the dressed width of a nominal 6 in board per the PS 20 lumber standard) and 0.5 in gaps needs exactly 1,200 ÷ 6 = 200 pickets before waste. Width and gap are always yours — board sizes and gap preferences vary.

Do posts and rails get waste too?

No — they are exact layout counts (you cannot break 5% of a post), so the waste percentage applies only to pickets, where cutting and the occasional split board actually consume extras. The default is a modest 5%, labeled as a convention and fully adjustable.

How much concrete per post?

Exactly the post-hole calculator's math, reused: hole cylinder minus the post below grade, times every post including gate posts. QUIKRETE's guidance — a hole 3× the post width, 1/3–1/2 of the above-ground height deep — is a labeled starting point; frost depth and embedment for your area come from the local building department.

Does the tool handle gates?

As posts, yes: enter the extra gate posts (typically 2 per gate for a sturdy hang) and they are added to the post and concrete counts. The gate leaf itself — a kit or a build — is outside a quantity count of the fence line.

Does the gate opening reduce the picket count?

No. The picket count runs across the whole run you enter, gate opening included, because the engine treats the run as one continuous line of pickets; the gate posts you add change the post and concrete lines only. If you want the pickets for the fence line alone, subtract the gate width from the run before you enter it — the 150 ft example in the table was entered at its full length and counts 315 pickets accordingly.

Why does the tool say the post is too wide for the hole?

Because a square post has to fit corner to corner: the engine checks that the post's diagonal — its width times √2, 4.95 in for a dressed 4×4 — is inside the hole diameter, and it refuses the calculation rather than subtract a post that could not be there. The usual cause is a hole diameter typed in feet: the worked fence's 10 in hole typed as 0.83 reaches the engine as a hole under an inch wide, and the message is "The post is too wide for this hole — its corner-to-corner diagonal must fit inside the hole diameter."

Can I enter the fence in meters and buy kilogram bags?

Yes. Switch the units toggle to Metric: the run and spacing take meters, divided by the exact 0.3048 m per foot, and the picket, gap, hole, and post fields take centimeters, divided by the exact 2.54 cm per inch, before the engine runs — so a 30 m fence at 2.4 m on-center gets 14 posts, 26 rails, and 206 pickets by the same arithmetic as an imperial entry. The bag rows switch to the 25 kg and 30 kg sizes with the yields Target Products publishes for them; the result panel still prints the run, the last section, and the concrete volume in feet and cubic feet.

Dimensions never leave your browser. Sources, conventions, and the estimating pipeline are documented on the methodology page.