Fence Calculator

Calculate fence materials — enter your fence length, post spacing and height to get the number of posts, rails, pickets and concrete bags, plus an estimated cost.

Project Details
Fence run
Pickets & gates

How do I calculate fence materials?

A wood fence is a repeating kit of four parts: posts set in concrete, horizontal rails spanning between them, vertical pickets on the rails, and the concrete that holds the posts. Estimating a fence means counting each part from one measurement — the total linear feet — plus your post spacing, height and picket size. The calculator above returns all four, minus your gate openings, with an estimated cost.

Posts: spacing and count

Posts carry the whole fence, so start there. Divide the run by the on-center spacing and add one for the last post:

posts = ⌈ length ÷ spacing ⌉ + 1  ·  sections = posts − 1

Wood posts are usually set 6 to 8 feet apart. Eight feet is standard for typical rails and pickets; drop to 6 feet for tall privacy panels, heavy materials or windy sites. Corners, ends and gates each need their own post, so add for those. Set each post about one-third of its above-ground height into the ground — a 6 ft fence wants a hole roughly 2 to 3 feet deep.

Worked example: a 150 ft privacy fence

Say you are building 150 linear feet of 6 ft privacy fence at 8 ft spacing with one 4 ft gate and solid 5.5 in pickets:

  • Posts = ⌈150 ÷ 8⌉ + 1 = 19 + 1 = 20 posts
  • Sections = 20 − 1 = 19 sections
  • Rails at 3 per section (6 ft fence) = 19 × 3 = 57 rails
  • Picket run = 150 − 4 (gate) = 146 ft = 1,752 in; pickets = 1,752 ÷ 5.5 = ≈ 319 pickets
  • Concrete at 2 bags/post = 20 × 2 = 40 × 50 lb bags

The calculator scales rails and concrete with height automatically — a 4 ft fence uses 2 rails and about 1 bag per post, an 8 ft fence 4 rails and about 3 bags.

Rails per section by height

Fence heightRails per sectionConcrete / post
3–4 ft2 rails≈ 1 bag
5–6 ft3 rails≈ 2 bags
7–8 ft4 rails≈ 3 bags

Pickets: privacy vs spaced

Picket count depends on the picket width and the gap you leave between them:

pickets = fence length (in) ÷ (picket width + gap)

  • Solid privacy fence: no gap — pickets butt together. A standard picket is 5.5 in (a nominal 1×6). Some builders overlap or add a 3/8 in gap to allow for wood swelling.
  • Spaced picket fence: add the gap (often equal to a picket width for a classic look), which roughly halves the count.

Subtract gate openings from the run before counting pickets and rails — gates are pre-built units, not framed on site.

How much does a fence cost?

Fence cost splits into materials and labor. The figures below are typical 2026 US ranges and are estimates only.

ItemTypical cost (2026 est.)
Wood privacy fence, installed$15–$40 / linear ft
150 ft wood fence, installed≈ $2,500–$6,000
Materials only (share of the above)≈ one third
Chain-link, installed$10–$25 / linear ft
Vinyl, installed$20–$45 / linear ft

Price moves with height, wood species (cedar and redwood cost more than pressure-treated pine), terrain, gates and how many corners the layout has. Get itemized bids and compare to the material estimate above.

Common mistakes

  • Uneven post spacing. Odd spacing makes rails and pickets fall on awkward lengths. Lay out the whole run first and split it into even sections.
  • Shallow post holes. Posts that are not deep enough (or below the frost line in cold climates) heave and lean. Depth is what keeps a fence straight.
  • Forgetting gate posts. Gates hang on heavier, deeper-set posts — plan and buy them with the rest.
  • No gap on solid fences. Wood swells; butting wet or green boards tight can buckle a run. A small gap or overlap avoids it.
  • Skipping waste. Warped and split boards are normal — order about 10% extra pickets and a couple of spare posts.

When to hire a pro

A short, flat fence on clear ground is a solid DIY project if you can dig straight, deep holes and keep posts plumb. Bring in a fence contractor for long runs, sloped or rocky ground, tall privacy fences that catch wind, anything near a property line you need surveyed, or digging close to utilities — always call 811 to locate lines first. Use this calculator to size the materials and get accurate bids. For the post-setting concrete, see the concrete calculator and the concrete bags calculator; if you're also hardscaping the yard, the paver, gravel and retaining wall calculators cover the rest.

Figures here are estimates only and vary by region, materials, terrain and supplier as of 2026 — verify quantities and pricing with a local supplier or fence contractor, and call 811 before you dig.

Live Results Calculated in real time

How do I calculate fence materials?

Start with the total linear feet of fence. Divide by your post spacing and add one for the posts, multiply sections by rails-per-section for rails, and divide the length by picket width plus gap for pickets. The calculator above does all of it — posts, rails, pickets and the concrete for the post holes — from your length, spacing and height, and subtracts your gate openings.

posts = length ÷ spacing + 1  ·  pickets = length (in) ÷ (picket width + gap)

Setting posts in concrete? See the concrete calculator for bag counts, or the concrete bags calculator.

Frequently asked questions

How do I calculate fence materials?

Start with the total linear feet of fence. Divide by your post spacing (usually 6 or 8 ft on-center) and add 1 for the number of posts. Multiply the number of sections by the rails per section for rails, and divide the fence length in inches by the picket width plus gap for pickets. The calculator above does all of this and adds concrete for the post holes.

How many fence posts do I need?

Divide the fence length by the post spacing and add one for the final post. At 8 ft spacing, a 150 ft fence needs 150 ÷ 8 = 19 sections, so about 20 posts. Closer 6 ft spacing gives a stiffer fence but more posts. Gates and corners need their own posts, so add for those.

How far apart should fence posts be?

Wood fence posts are typically set 6 to 8 feet apart on-center. Eight feet is the most common for standard pickets and rails; drop to 6 feet for tall privacy fences, heavy panels or windy sites where you want extra stiffness. Keep the spacing even so rail and picket lengths work out cleanly.

How much concrete do I need per fence post?

A typical 4×4 post in a 10-inch-wide hole about 2 feet deep takes roughly one to two 50 lb bags of fast-setting concrete. Taller fences and end or gate posts go deeper and take more. Set posts about one-third of their above-ground height into the ground. The calculator estimates bags per post from your fence height.

How many pickets do I need?

Divide the fence length in inches by the picket width plus any gap between pickets. For a solid privacy fence with 5.5-inch pickets and no gap, a 100 ft run (1,200 in) needs about 1,200 ÷ 5.5 = 218 pickets. Add a spacing gap for a picket-style fence, which lowers the count. Subtract any gate openings first.

How much does a fence cost?

A wood privacy fence typically runs about $15–$40 per linear foot installed in 2026, so a 150 ft fence often costs $2,500–$6,000 depending on height, wood species, terrain and gates. Materials alone are roughly a third of that. Chain-link and vinyl fall in different ranges. Get itemized bids and compare to the material estimate above.

How much extra material should I buy for a fence?

Add about 10% to pickets and rails for cuts, waste and the occasional warped board you set aside, and buy a couple of spare posts. Order it with the main load so the wood matches and weathers together. Concrete is cheap insurance — keep an extra bag or two on hand for a deep or loose hole.

Related tools