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
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.
- Net run: 100 − 4 = 96 ft.
- Spans: ceil(96 ÷ 8) = 12. Posts: 12 + 1 + 2 = 15.
- Depth: max(2, 6 ÷ 2) = 3 ft. Post length needed: 9 ft, so buy 10-ft 4×4 posts.
- Rails: 3 rows × 12 spans = 36 pieces, one per 8-ft board. 36 × 1.10 = 39.6, rounded up to 40 boards.
- Pickets: 96 × 12 ÷ 5.625 = 204.8, rounded up to 205. With the buffer, 205 × 1.10 = 225.5, rounded up to 226.
- Concrete: each hole holds about 1.38 cu ft after subtracting the post. 15 posts is 20.72 cu ft, or 34.5 bags. With the buffer that is 38 bags, plus 2 for the gate posts, giving 40.
- Hardware: 226 × 3 rails × 2 screws = 1,356 screws, about 14 lb. Rail brackets: 36 × 2 = 72, plus 10% = 80.
- Cost at default prices: 15 × $22 + 40 × $6 + 226 × $3.50 + 40 × $7 + 1 × $150 = $1,791.00.
Tips & Common Mistakes
- Measure the line, not the yard. Walk the actual fence path with a tape or measuring wheel, and confirm the property line with a survey before digging.
- Call 811 first. Buried gas, electric and water lines are the most dangerous surprise in post-hole digging.
- Beef up gate posts. A gate swings a lot of leverage on one post. Use a larger post, set it deeper, and don't skip the extra concrete.
- Add 10–15% for slopes. Racking or stepping a fence on a slope means longer pickets and more cut-offs than a flat run.
- Check rules before you buy. Height limits, setbacks and permits differ by town, and a fence that doubles as a pool barrier has its own height, gap and latch rules.
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.