Fence Material Calculator

</> Embed this calculator on your site

This fence calculator answers the question every builder asks first: how much material do I need? Enter your fence length, height and type to get post, rail, picket, panel, concrete and gate counts, plus a cost estimate.

Fence layout diagram showing post spacing, fence height, post depth and total run Spacing 8 ft Height 6 ft 3 ft deep Post 10 ft Pickets Rail Concrete footing Total run 100 ft · 15 posts

Diagram not to scale. Labels update with your numbers when you calculate.

8 ft

Each straight run rounds up to whole spans, so every corner adds one post and one span as an allowance.

10%
Unit prices (optional)

Estimates only. By using this calculator you agree to our Terms.

Planning estimate only. Results follow common rules of thumb (posts buried at least one-third of their length, minimum 24 in.). The IRC does not set fence post depth, and local codes, frost depth, wind exposure, setbacks and permit rules vary. This is not engineering, permit or inspection approval. Call 811 before you dig.

</> Embed this calculator on your site

Free for any website, blog, classroom or intranet. No sign-up, no ads inside the embed. Copy the code and paste it into your page.

Preview the embed

How to Use This Fence Material Calculator

Enter the total length of the fence line, including any gate openings, then pick the height, fence type and post spacing. Add the number and width of gates, the number of corners, and a waste buffer. Unit prices are optional. Press Calculate (or Enter) to get post counts and lengths, rails, pickets, panels or fabric, concrete bags, hardware, gate kits and an estimated cost. A post-position table and the diagram update with your numbers.

Why This Matters

Fence materials are bought in many small pieces, so small counting errors get expensive. Take a plain 200-ft, 6-ft-tall wood privacy fence with 8-ft post spacing, no gates and the default 10% buffer. This calculator returns 26 posts, 83 rail boards, about 470 pickets and roughly 66 bags of concrete. At the default prices that is about $3,200, so coming up 10% short means a second trip and ordering 10% too much leaves money in a pile of boards.

Homeowners use these counts to compare DIY cost against a contractor quote. Contractors use them to price jobs and build pick lists. Gates are the item people forget: a 4-ft opening removes 4 ft of pickets and rails but adds two posts and a gate kit. Corners are the second: each straight run rounds up to a whole number of spans, so a yard with four corners almost always needs more posts than length divided by spacing suggests. Counting all of this before you order lets you buy once, check the delivery and start digging.

How It's Calculated

Net run = Length − (Gates × Gate width)
Spans = ceil(Net run ÷ Spacing) + Corners
Posts = Spans + 1 + (2 × Gates)

The "+1" is the end post of the run. Each gate gets two posts, one on each side of the opening. This is deliberately on the generous side, because gates split the fence into separate runs that each round up.

Post length and depth. Buried depth = the larger of 2 ft or half the above-ground height, which puts one-third of the post underground. Height plus depth is rounded up to the next standard post length (6, 8, 10 or 12 ft). Heights of 7 ft and up use 6×6 wood posts. Check your local frost depth and use the deeper figure if it is greater.

Rails (wood). Rail rows are 2 for fences up to 4 ft, 3 for 5–6 ft and 4 for 8 ft. Rail pieces = rows × spans. They are cut from 8, 10 or 12 ft boards, using the shortest stock that is at least as long as the spacing.

Pickets (wood). Count = Net run × 12 ÷ board pitch. The pitch is 5.625 in. for privacy boards (5.5 in. plus a 1/8 in. gap) or 5 in. for picket slats (3.5 in. plus a 1.5 in. gap), rounded up.

Concrete. Each hole is 10 in. wide for 4×4 wood posts and chain-link posts, and 12 in. wide for 6×6 and vinyl posts. Hole volume = π × radius² × depth, minus the post's own volume. One 80 lb bag yields about 0.6 cu ft. Total bags are rounded up after the buffer, plus one extra bag per gate post because gate posts carry more load.

Vinyl and chain link. Vinyl panels = spans, with your spacing as the panel width. Chain link uses 50-ft fabric rolls, one top-rail section per 10 ft, tension bars at ends, gates and corners, and about one tension band per foot of height per bar.

Buffer and rounding. The waste buffer applies to rails, pickets, panels, fabric, concrete and hardware, but not to posts or gate kits, which are counted exactly. Every figure is rounded up, never down. Costs include only the items you can price. Caps, screws and brackets are listed but not priced.

Worked Example

These are the default inputs: 100 ft of 6-ft wood privacy fence, 8-ft spacing, one 4-ft gate, no corners, 10% buffer.

Tips & Common Mistakes

Frequently Asked Questions

How many bags of concrete do I need per fence post?

For a 4×4 post in a 10-in. hole 36 in. deep (a 6-ft fence), the hole holds about 1.38 cu ft after subtracting the post, which is roughly 2.3 bags of 80 lb mix. If you buy per post, plan on 3 bags. This calculator pools the total across all posts, adds your buffer, and adds one extra bag per gate post.

What is the best post spacing for a wood fence?

Eight feet is the most common because standard boards come in 8-ft lengths, so rails fit without extra cutting. Use 6 ft in windy areas or with heavy privacy boards. Rails spanning more than 8 ft tend to sag.

How do I calculate a fence with corners?

Add the lengths of all straight runs into one total and enter the number of corners. Each run rounds up to a whole number of spans, so the calculator adds one post and one span per corner to cover that rounding. A closed loop that returns to its start needs one fewer post than the tool shows.

Do gates change how much fence material I need?

Yes. Each gate opening is subtracted from the length of pickets, rails or fabric you need. Each gate also adds two posts, extra concrete and a gate kit.

How deep should fence posts be set?

A common rule of thumb is to bury at least one-third of the post length, with a 24-in. minimum. In cold climates, frost depth is often 30–48 in., so use whichever is deeper. Local code and soil conditions take priority over this estimate.

Does vinyl or chain link use the same math as wood?

The post math is the same, but the infill differs. Vinyl is counted as panels, one per span, using your spacing as the panel width. Chain link is counted as 50-ft fabric rolls with a top rail and tension hardware at terminal posts.

Related Tools