Fence Calculator
This fence calculator turns a fence run into an exact shopping list — posts, rails, pickets, concrete, and gate hardware — before you go to the lumberyard. Enter your total run, corners, and gates, and the calculator handles the fencepost math (easy to get wrong by hand) for you.
Price edits are remembered on this device — no account, nothing sent anywhere.
$16.37/linear ft · band ±10%: $2,210 – $2,701
Estimates only, not quotes. Prices are editable national averages — confirm current pricing and quantities with your supplier before you buy.
How this fence post calculator counts posts, rails, and pickets
A wood fence is priced and bought by the piece, not the foot, so this calculator's real job is turning a single run length into whole counts of posts, rails, and pickets you can hand to a lumberyard.
The first and easiest mistake in a DIY fence estimate is counting posts as if they matched fence sections one-for-one. They don't. Split a 100 ft run into 8 ft sections and you get roughly 12.5 sections, rounded up to 13 whole sections — but that takes 14 posts, because every section shares a post with its neighbor except the two posts at the very ends of the run. This calculator adds that one extra post automatically, then adds a post for every corner (a corner turns the line, so it needs its own post beyond the regular spacing) and one more for every gate (a gate opening rarely lines up on a routine spacing interval, so it gets a dedicated post on top of the line count).
From there, rails multiply straightforwardly — one full run of rails per section, at 2 or 3 per section depending on style — and pickets divide the net fence length (run minus gate openings) by each picket's width plus its gap. Concrete is priced per post, and a 10% fastener allowance covers screws, nails, and post caps that don't get their own line item.


The formula
Worked example: 150 ft of wood fence materials
Using the calculator's own defaults: a 150 ft privacy fence (6 ft boards), 2 corners, 1 gate (4 ft wide), posts every 8 ft, 3 rails per section, 5.5 in pickets with no gap, and 2 bags of fast-setting concrete per post.
- 1. Net run150 − (1 × 4) = 146 ft
- 2. Sections146 ÷ 8 = 18.25 → 19
- 3. Posts19 + 1 + 2 + 1 = 23
- 4. Rails19 × 3 = 57
- 5. Pickets(146 × 12) ÷ 5.5 = 318.5 → 319
- 6. Concrete23 × 2 = 46 bags
- 7. Materials(23×$18)+(57×$9)+(319×$2.75)+(46×$8)+(1×$60) = $2,232
- 8. Total ×1.10$2,455 typical · $2,210–$2,701 · $16.37/lf
Post length guidance: 6 ft boards + 2 ft buried = 8 ft posts.
Assumptions & defaults
| Privacy style | 6 ft boards · 3 rails · no gap |
| Picket style | 4 ft · 2 rails · 1.75 in gap |
| Split-rail style | 4 ft · 2 rails · no pickets |
| Post length rule | Height + 2 ft buried, next even foot |
| Concrete per post | 1–2 bags of 50-lb fast-set (2 is the safer default) |
| Fastener allowance | +10% on the materials subtotal |
| Prices (editable) | Post $18 · rail $9 · picket $2.75 · bag $8 · gate kit $60 |
Selecting a style resets rails and gap to its defaults, but every field stays editable afterward. Prices are editable national-average retail estimates for pressure-treated pine — swap in cedar, vinyl, or metal pricing yourself, or use the fence installation cost calculator to compare installed pricing across materials. Prices reviewed July 2026.
Fence posts per run, by post spacing
| Run length | Posts @ 8 ft | Posts @ 6 ft |
|---|---|---|
| 50 ft | 8 | 10 |
| 100 ft | 14 | 18 |
| 150 ft | 20 | 26 |
| 200 ft | 26 | 35 |
| 300 ft | 39 | 51 |
Sections-plus-one: divide the run by the spacing, round up, add one — then the calculator adds a post per corner and per gate on top, which is what the quick table can't know. Each post takes about two bags of fast-setting concrete, priced per bag by the concrete calculator's math; picket culls and the final short bay are why the waste factors reference gives pickets 5%. When the piece count is settled, the fence cost calculator turns the same run into an installed price per foot.
Sources & standards
Post-setting depth and concrete-bag yield guidance follow manufacturer installation instructions for fast-setting concrete mixes. Ground-contact lumber requirements follow the American Wood Protection Association's Use Category System (AWPA U1, categories UC4A/UC4B) for posts set in soil or concrete. Frost-depth and property-line setback rules are jurisdiction-specific — verify with your local building department before finalizing post depth or fence placement. Prices reviewed July 2026 — see how our price reviews work.