Fence Calculator
This fence calculator returns the exact posts, rails, pickets, and concrete bags for any fence length, height, and gate count. Enter your numbers below to size a wood, vinyl, or chain link fence before you order material.
Advanced: Picket Width & Gap
13 line + 2 gate, 4x4
With 5% waste: 38 rails, 215 pickets/boards.
Hole: 10 in diameter x 2 ft deep, 0.92 cu ft per post.
Total: 30 bags (80 lb) / 45 bags (60 lb) / 45 bags (50 lb) for 15 posts, 13.81 cu ft.
A fence material calculator answers one question before you spend a dollar: how much fence do I need? This tool converts a total run length, a height, a post spacing, and a gate count into the exact number of posts, rails, pickets, and concrete bags a wood, vinyl, or chain link fence requires. It works the same way for a straight backyard run or a full fence perimeter calculator job around a rectangular lot — the how to measure for a fence guide covers taking that measurement across corners, slopes, and gates before you let the math below do the rest.
For material-specific detail, use the picket fence calculator, wood fence calculator, chain link fence calculator, or vinyl fence calculator — or compare all four in the fence materials compared guide if you haven't settled on one yet. The full lineup of tools lives on the material calculators page, and every one of them uses the same formulas shown here.
This calculator handles a straight run out of the box, but the same math extends to a full property perimeter. For an enclosed rectangle, add up all four sides into one total length, then subtract gate widths before running the formula — the last post on an enclosed loop doubles as the first, so an enclosed layout needs one fewer post than the same total length run as a straight line. Fencing multiple separate runs, such as a front yard and a backyard treated independently, means running each run through the calculator on its own and adding the results together, since gate and corner counts don't carry over between disconnected runs.
How the Fence Calculator Works
Five steps turn a tape-measure number into a complete materials list, whether you're fencing a 50-foot side yard or a 300-foot property line.
- Measure the total run in linear feet, subtracting the width of any gate openings — gate width doesn't count toward post spacing.
- Divide by your post spacing (commonly 8 feet for wood, 10 feet for chain link) and round up to get the number of sections.
- Add one post per section, plus one for line posts (sections + 1), then add 2 posts per gate opening.
- Multiply sections by rails per section — 2 rails for a 4-ft fence, 3 rails for 5–6 ft, 4 rails above 6 ft.
- Divide the clear space in each section by picket width plus gap to get pickets per section, then multiply by sections and add 5% waste.
Worked example — 100 feet of 6-ft privacy fence, 8-ft post spacing, one 4-ft gate: subtract the gate first: 100 − 4 = 96 feet of fence line. That's 96 ÷ 8 = 12 sections, so line posts = 13 (sections + 1) and gate posts = 2, for 15 posts total. Rails: a 6-ft fence uses 3 rails per section, so 12 × 3 = 36 rails. Pickets: each 8-ft section has 92.5 inches of clear space (96 inches minus a 3.5-inch 4×4 post), and a 5.5-inch dog-ear picket with no gap fits 17 per section (92.5 ÷ 5.5 = 16.8, rounded up), so 12 × 17 = 204 pickets, or 215 pickets with 5% waste. Post length: a 6-ft fence needs a 2-ft bury (height ÷ 3, minimum 2 ft), so posts run 6 + 2 = 8 feet total — an 8-ft post with a 2-ft bury. Concrete: a 4×4 post in a 10-inch hole at 24 inches deep needs 2 bags of 80-lb mix, and the 6×6 gate posts in a 12-inch hole at the same depth also round to 2 bags each, so 15 posts × 2 bags = 30 bags of 80-lb concrete.
Fence Quantity Chart by Length
Posts, rails, and pickets for a 6-ft privacy fence at 8-ft post spacing, no gates, computed with the same formulas as the worked example above.
| Length | Sections | Posts | Rails (3/section) | Pickets (+5% waste) |
|---|---|---|---|---|
| 50 ft | 7 | 8 | 21 | 125 |
| 100 ft | 13 | 14 | 39 | 233 |
| 150 ft | 19 | 20 | 57 | 340 |
| 200 ft | 25 | 26 | 75 | 447 |
| 300 ft | 38 | 39 | 114 | 679 |
Swap the height and the rail count changes with it: a 4-ft fence needs only 2 rails per section, while anything over 6 ft needs 4. Post count and picket count don't change with height — only spacing and picket width move those numbers. The fence post calculator breaks the post math out on its own if that's the only number you need, and the fence post spacing calculator shows equal spacing for lengths that don't divide evenly.
Materials List for a Standard Wood Fence
Beyond posts, rails, and pickets, a complete order includes a few line items this calculator surfaces but doesn't itemize by brand:
- Posts: 4×4 (3.5-in actual) for line posts, 6×6 (5.5-in actual) for gate posts and any fence over 6 ft tall, cut or bought pre-cut to stock lengths of 8, 10, 12, 14, or 16 feet.
- Rails: 2×4 lumber in 8-ft or 10-ft lengths matching your post spacing, 2 to 4 per section depending on height.
- Pickets or panels: 1×6 dog-ear boards for privacy, 1×4 spaced boards for picket style, or prefab panels for vinyl and some wood systems — see the fence board calculator and fence panel calculator.
- Hardware: roughly 2 screws or nails per picket per rail it crosses, plus post caps and optional brackets.
- Concrete: 80-lb, 60-lb, or 50-lb bagged mix, sized per post by the concrete per fence post calculator.
Post Depth and Concrete
Post depth follows one rule: bury at least a third of the total post height, with a 2-ft minimum. A 6-ft fence needs a 2-ft bury, an 8-ft fence needs a 3-ft bury, and frost line in cold climates can push that deeper — check the fence post depth and frost line guide for your state before digging. Hole diameter runs about three times the post's actual width — 10 inches for a 4×4, 12 inches for a 6×6 — and each hole's volume converts directly to a bag count on the concrete calculator for fence posts. Always call 811 before you dig to have underground utility lines marked, and check the fence height rules and permits guide for typical height limits before you finalize a design.
Waste and Ordering
Add 5% to pickets and rails to cover cutting errors, warped boards, and end-of-run trims — that's the difference between 204 and 215 pickets in the worked example above. Posts and concrete don't need a waste factor since you're not cutting them to a non-standard length. Order pickets and rails in full bundle or unit quantities where your supplier sells them that way, since rounding up to the next bundle usually beats a second delivery trip for a handful of boards.
Sloped yards need one more adjustment before you order: a fence can either step down a hill in level sections with a small gap under each panel, or rack to follow the slope at an angle, and racking usually needs the same picket count with slightly longer posts at the low end of each section. Measure the grade change across your run and add extra post length on the downhill side rather than assuming every post uses the same stock length.
Next Steps
Once you know your exact post, rail, and picket count, the fence cost calculator turns those quantities into an installed price range for materials and labor in your area.
Fence Material Calculators
All Material Calculators →Chain Link Fence Calculator
This chain link fence calculator returns line posts, terminal posts, top rail, fabric rolls, and hardware for any run length and height. Enter your fence length below to get a complete chain link bill of materials.
Concrete per Fence Post Calculator
This calculator answers how many bags of concrete per fence post you need, in 80-lb, 60-lb, and 50-lb mix, for one post and for your whole fence. Enter your post size, hole diameter, and depth below to get an exact bag count before you buy concrete.
Fence Board Calculator
This fence board calculator returns the exact number of boards for board-on-board, shadowbox, and horizontal fence layouts. Enter your length, height, and board style below to get a board count for any run.
Fence Panel Calculator
This fence panel calculator returns the number of prefab panels, posts, and caps needed for any fence length and panel width. Enter your run length and panel width below to see how many fence panels do I need for wood or vinyl prefab systems.
Fence Post Calculator
This fence post calculator returns the number of fence posts you need based on total length, post spacing, and gate count. Enter your run length below to get line posts, corner posts, and gate posts broken out separately.
Fence Post Spacing Calculator
This fence post spacing calculator finds the actual equal spacing between posts when a fence length doesn't divide evenly into your target spacing. Enter your total length and target spacing below to see the exact section count and true spacing.
Picket Fence Calculator
This picket fence calculator returns the exact number of pickets, posts, and rails for any fence length and picket spacing. Enter your run length and gap width below to see how many 1×4 pickets a picket fence of any size actually needs.
Vinyl Fence Calculator
This vinyl fence calculator returns the number of prefab panels, posts, and post caps for any fence length and panel width. Enter your run length below to get an exact count for a 6-ft or 8-ft vinyl panel system.
Wood Fence Calculator
This wood fence calculator returns posts, rails, and board counts for privacy, picket, shadowbox, and board-on-board styles. Enter your fence length, height, and style below to get a complete materials list for any wood fence.
Fence Cost Calculators
Aluminum Fence Cost Calculator
This aluminum fence cost calculator estimates installed price by height, length, gates, and state. Aluminum sits between chain link and wrought iron in both look and price, offering a decorative, low-maintenance metal fence without custom ironwork costs.
Chain Link Fence Cost Calculator
This chain link fence cost calculator estimates your installed price for galvanized or vinyl-coated chain link by height, length, gates, and state. Chain link is consistently the cheapest common fence material, and the tool below shows exactly why.
Cost to Fence an Acre
Cost to fence an acre depends more on lot shape and material than most homeowners expect — a square acre needs 835 feet of fence line, and that length costs anywhere from $1,500 in farm wire to over $40,000 in wood privacy fencing. Pick your acreage and material below to see where your project lands.
Fence Cost Calculator
This fence cost calculator estimates your installed fence cost by material, height, length, gates, and state — the same numbers a contractor's quote would break down. Enter your project details below to get a materials-vs-labor total in low, mid, and high tiers.
Fence Cost per Foot
The cost to install a fence ranges from $10 to $175 per linear foot, installed, depending on material. This reference table breaks down every common fence material at 4, 6, and 8 feet tall so you can see exactly where your project lands before requesting quotes.
Pool Fence Cost Calculator
This pool fence cost calculator prices removable mesh and permanent aluminum pool barriers by length, height, and state, including the self-closing gate hardware most pool-safety codes require. Both styles meet the same basic barrier concept — a mesh fence is temporary and budget-friendly, while aluminum is permanent and built to match the rest of your yard.
Privacy Fence Cost Calculator
This privacy fence cost calculator prices a solid, no-gap fence in wood or vinyl by height and length. A 6-foot privacy fence is the most-searched height for both materials, and the breakdown below shows what changes the total from there.
Split Rail Fence Cost Calculator
This split rail fence cost calculator prices wood, vinyl, and 3-rail ranch-style fencing by length, height, and state. Split rail is one of the cheapest ways to mark a property line since it uses far fewer materials per foot than a solid-board fence.
Vinyl Fence Cost Calculator
This vinyl fence cost calculator prices privacy and picket vinyl fencing by height, length, gates, and state. Vinyl's prefabricated panels keep labor light, so the installed price leans heavily on the material tier you pick.
Wood Fence Cost Calculator
This wood fence cost calculator prices out privacy, picket, shadowbox, and board-on-board styles by height, length, and grade. Wood remains one of the most requested fence materials because it's the easiest to customize, and the tool below breaks the installed cost down by exactly which style and grade you're after.