Skip to content
EveryFix

Fence Calculator

The Fence Calculator estimates how many posts and rails you need based on your total fence length and post spacing, plus an estimate of concrete bags for setting posts. Enter lengths in feet or meters. Because the section count always rounds up (never down), your actual post spacing ends up slightly tighter than the value you enter — for example, 100 ft of fence at an 8 ft target becomes 13 sections of about 7.7 ft each rather than one full-length gap. The concrete estimate (2 bags per post hole) assumes a standard 60 lb bag and typical residential post depth; taller privacy fences or heavier gate posts set in deeper, wider holes may need 3 or more bags per post. Gates add one extra post to frame the opening but don't change the section or rail count, since a gate opening simply replaces one fence section rather than adding to it.

Intermediate⏱ 1-2 minutesUpdated 2026-10-28
Units

Switch between U.S. Customary and Metric units.

ft
ft

Taller privacy fences often use 3; shorter picket fences may use 2.

Enter your details above and click “Calculate Fence Materials” to see your results here.

How This Tool Works

Pick your units, then enter your total fence length, desired post spacing, and number of gates to see exactly how many posts, rails, and concrete bags to buy.

Formula & Method

Sections = fence length ÷ post spacing (rounded up). Posts = sections + 1, plus one extra per gate. Rails = sections × rails per section. Concrete bags = posts × 2. Lengths can be entered in feet or meters.

Example Calculation

A 150 ft fence with posts every 10 ft and 1 gate: sections = 150 ÷ 10 = 15. Posts = 15 sections + 1 + 1 (for the gate) = 17. Rails (at 2 per section) = 15 × 2 = 30. Concrete = 17 posts × 2 bags = 34 bags. In metric, a 45 m fence with posts every 2 m and 0 gates: sections = 45 ÷ 2 = 22.5, rounded up to 23. Posts = 23 + 1 = 24. Rails (at the default 3 per section) = 23 × 3 = 69. Concrete = 24 × 2 = 48 bags.

Please note: This calculator provides estimates only and is not professional construction or engineering advice. Material needs vary by project, local building codes, and site conditions — consult a licensed contractor or engineer before starting your project.

About the Fence Calculator

A fence looks simple on paper, but the shopping list hides a lot of small multiplications: how many posts, how many rails stretched between them, and how much concrete to anchor every post. This calculator turns four inputs into that list. You give it the total fence length, the spacing between posts, the number of gates, and the number of rails per section, and it returns the section count, the post count, the rail count, and a concrete estimate. All four numbers update the moment you change an input, so you can compare a 6 ft layout against an 8 ft layout in seconds.

The counting logic follows how fences are actually framed. A run of fence is divided into sections, and each section is a span between two posts. Because a line of N sections always needs N + 1 posts, the post count is the one number people most often get wrong by hand. The calculator also rounds the section count up, never down, so your real spacing comes out slightly tighter than the target you typed. That is the safe direction: a post spaced a little closer than planned never causes a structural problem, while one spaced wider than the rails allow can.

The result is most useful before you spend money. Posts, rails, and bagged concrete are the heavy, bulky items, and they are the ones that cause repeat trips to the lumber yard when the count is off. Homeowners planning a weekend build, contractors writing a quick quote, and landlords pricing a boundary repair can all use the totals as a starting materials list. Pickets, panels, hardware, and gate parts are separate purchases that depend on the style you choose.

When to Use It

Pricing a backyard privacy fence

A homeowner walks the property line, measures 240 feet with a tape, and wants to know what a six-foot privacy fence will take before calling suppliers. They enter the length, 6 ft spacing, two gates, and three rails, then use the post and rail totals to ask for itemized quotes and compare against doing it themselves.

Comparing post spacing options

A builder is deciding between 6 ft and 8 ft spacing for a long run. Changing only the Post spacing field shows how many fewer posts and bags of concrete the wider spacing saves, which makes it easy to weigh that saving against the stiffer, more wind-resistant feel of a tighter layout.

Fencing a garden or dog run

Someone enclosing a vegetable garden against deer or rabbits needs only a short run, maybe 85 feet, with one gate and two rails per section. The calculator gives an exact post and concrete count, so they can buy the right number of bags instead of guessing and ending up with a pallet of leftover concrete.

Planning in metric for a rural boundary

A landowner outside the United States measures a 52 m paddock boundary in meters and prices timber posts and rails locally. Switching the unit toggle to Metric lets them enter meters directly, and the counts they get back are the same whole numbers a supplier would use when writing up an order.

How to Use It, Step by Step

  1. Choose your unit system first. Pick U.S. for feet or Metric for meters, because the length and spacing fields change their unit labels and allowed ranges when you switch.
  2. Enter the Total fence length by measuring the line the fence will follow, not a straight line between the end points. For a run with corners, add each straight leg together using a tape measure or measuring wheel.
  3. Set the Post spacing to the center-to-center distance you plan between posts. Many wood fences use 6 to 8 ft (about 1.8 to 2.4 m), but your panel width, rail length, and wind exposure should decide the number.
  4. Type the Number of gates. Count every walk gate and driveway gate that will interrupt the fence line, since each one adds an extra post to frame the opening.
  5. Set Rails per section. Taller privacy fences commonly use three horizontal rails, while shorter picket fences often use two. If your style uses solid panels that hang on brackets, check how many rails or brackets the manufacturer requires.
  6. Run the calculation and read the four outputs: Fence sections, Posts needed, Rails needed, and Concrete bags. The Posts needed line is highlighted because it drives the other numbers.
  7. Check the section count against your tape. Divide the fence length by the section count to find your true spacing, and confirm it is no wider than your rails and panels allow.
  8. Add the items the tool does not cover, such as pickets or panels, fasteners, gate hardware, and a few spare posts, then take the full list to your supplier.

Understanding Your Results

Fence sections is the length divided by your post spacing, rounded up to the next whole number. Divide your real length by that number to see the actual spacing you will build. For example, 85 ft at an 8 ft target gives 11 sections, which means each span is about 7.7 ft rather than 8. If that real spacing is longer than your rail stock or panels, lower the Post spacing input and run it again.

Posts needed is the section count plus one, plus one more for each gate. Rails needed is the section count times your rails per section, and it counts rails as one piece per span, so confirm your rail lumber is cut or sold to fit your spacing. The concrete line simply doubles the post count, treating each hole as taking two 60 lb bags. Heavy gate posts, corner posts, and posts in loose or sandy soil often take more than that.

As a sanity check, the post count should be a little more than the fence length divided by the spacing. A 100 ft fence at 8 ft spacing lands in the low teens, not the twenties. If the number looks far off, recheck that you entered feet in the U.S. mode and meters in Metric mode. Before you order, add a small allowance for mistakes and for posts you may want to set a bit deeper than planned.

More Worked Examples

Six-foot privacy fence with two gates

Scenario: A 240 ft boundary in U.S. units, posts every 6 ft, 2 gates, 3 rails per section.

Sections = 240 divided by 6 = 40, which is already a whole number so nothing rounds. Posts = 40 + 1 + 2 gates = 43. Rails = 40 sections times 3 = 120 rails. Concrete = 43 posts times 2 = 86 bags. The tool reports exactly those four figures. Because the close 6 ft spacing keeps spans short, this layout resists wind well but needs 43 posts, roughly 30 percent more than the same line built at 8 ft spacing.

Garden fence with a single gate

Scenario: An 85 ft vegetable garden enclosure, posts every 8 ft, 1 gate, 2 rails per section.

Sections = 85 divided by 8 = 10.6, rounded up to 11. Posts = 11 + 1 + 1 gate = 13. Rails = 11 times 2 = 22. Concrete = 13 times 2 = 26 bags. The real spacing becomes 85 divided by 11, about 7.7 ft, so every span is a little shorter than the 8 ft target. If the gate opening takes 4 ft, you could subtract it from the length first for a tighter count.

Paddock boundary measured in meters

Scenario: Metric mode, 52 m of fence, posts every 2.4 m, 1 gate, 3 rails per section.

Sections = 52 divided by 2.4 = 21.7, rounded up to 22. Posts = 22 + 1 + 1 gate = 24. Rails = 22 times 3 = 66. Concrete = 24 times 2 = 48 bags. The real spacing works out to 52 divided by 22, about 2.36 m. The counts are whole numbers, so they can go straight onto a timber supplier's order sheet.

Tips for Better Results

  • Measure the fence line along the actual path with a tape or measuring wheel, because estimating from a satellite image or a property plan often misses small jogs that add up to a few extra feet.
  • Subtract the width of each gate opening from the total length before you enter it. The tool already adds a post for every gate, so deducting the opening width keeps you from buying an extra section of rails you will not use.
  • If your fence has several corners or runs that stop at a building, run the calculation per straight leg and add the results. Each separate run rounds its section count up on its own, so this can give a slightly higher and more realistic total.
  • Set your posts first and check the spacing against the rails you can actually buy. Lumber is sold in standard lengths, and picking a spacing that matches a standard length avoids cutting waste.
  • Order a few extra posts and a couple of extra rails. Some pieces arrive bowed or split, and finding a matching replacement later is harder than carrying a small spare stock.
  • Treat the concrete number as a minimum for corners, ends, and gate posts. Those posts carry the most load and lean first if they are underbuilt, so set them deeper and with extra concrete.

Common Mistakes to Avoid

  • Forgetting that posts always outnumber sections by one. Count posts, not spans, when you buy, or you will arrive at the site one post short.
  • Entering the straight-line distance between the fence ends rather than the length of the path the fence follows. Walk the route and add up every leg.
  • Using the same spacing for every part of the fence. Gate posts, long spans, and windy corners often need closer spacing than the main line, so size those areas more conservatively.
  • Treating the concrete estimate as exact. Hole diameter, post size, and depth change the real amount a lot, so check the bag yield printed on the concrete you actually buy.
  • Leaving out materials the calculator does not count, such as pickets, panels, brackets, screws, and gate hardware, and then budgeting only for posts and rails.

Assumptions and Limits

  • The calculator treats every post the same, so it does not separate corner, end, line, and gate posts, which may need different sizes or depths in a real build.
  • The concrete figure is a flat two bags per post hole, based on a 60 lb bag and a typical residential hole. Taller fences, wider posts, and loose soil can easily push that to three bags or more.
  • Gate openings are not subtracted from the fence length, so the section and rail counts include the span the gate will fill. Deduct the opening yourself if you want a tighter rail count.
  • Local rules vary. Many areas set maximum fence heights, setbacks from the property line, and permit requirements, and utility lines may run through the area. Confirm those items with your local authority before digging, and have a contractor review structural plans for tall, retaining, or pool fences.

Key Terms

Section (bay)
One span of fence between two neighboring posts. The number of sections is the fence length divided by the post spacing, rounded up.
Post spacing
The distance from the center of one post to the center of the next. Closer spacing makes a stiffer fence and uses more posts and concrete.
Rail
A horizontal board or tube that connects posts and carries the pickets or panels. Taller fences normally use more rails to hold boards flat.
Line post
An ordinary post set along a straight stretch of fence. Corner, end, and gate posts carry more load and are usually larger or set deeper.
Frost line
The depth to which ground freezes in winter. Posts in cold climates are usually set below it so frost heave does not push them upward.
Setback
The required distance between a fence and a property line, street, or structure. Setback rules are set locally and vary widely.
Read the guideHow much fencing do you need?Work out how much fencing you need: perimeter, post spacing, and a worked 320-ft example (100x60 ft yard) with exact post and section counts. Estimates only.

Frequently Asked Questions

How far apart should fence posts be?+

Most residential fences use 6–8 ft (about 1.8–2.4 m) post spacing. Taller or heavier fence panels may need closer spacing for stability.

How much concrete per fence post?+

A typical post hole takes about 2 bags of 60 lb (27 kg) concrete, though larger posts or deeper holes may need more.

Can I enter fence length in meters?+

Yes — switch the unit toggle to Metric and enter your fence length and post spacing in meters. Post, rail, and concrete counts are unaffected by the unit choice.

Does this include the gate itself?+

No, this estimates structural posts and rails only. Gate hardware and the gate panel should be purchased separately based on the gate width.

Why do I get one more post than the number of sections?+

Posts sit at both ends of every section, so a fence line always needs one more post than it has sections — 13 sections require 14 posts. Each gate opening adds one additional post beyond that to frame the gate.

What happens if my fence length doesn't divide evenly by the post spacing?+

The calculator rounds the section count up to the next whole number rather than leaving a leftover gap, which slightly shortens your real spacing. For example, 100 ft at an 8 ft target becomes 13 sections of about 7.7 ft each instead of 12 full sections plus a 4 ft remainder.

Do corner posts change how many posts I need?+

Not in the tool's math, because corners are counted among the posts already. In practice, a fence with corners is several straight runs, and each run rounds its own section count up. Adding the totals of each leg can come out a post or two higher than one combined length, and that difference is usually the more accurate figure. Corner posts also deserve extra depth and concrete, since they resist the pull of two directions.

How deep should fence posts be buried?+

A commonly quoted rule is to bury about one third of the post's total length, with a minimum depth that suits your frost depth. A six-foot fence post is often eight feet long, so roughly two and a half feet goes in the ground. In cold climates, posts below the frost line are less likely to heave. Local building guidance and soil conditions can change this, so confirm with your supplier or a local contractor.

Do I need a permit or to call before I dig?+

Many cities and counties require a permit above a certain fence height, and homeowner associations often have their own style and height rules. Before digging post holes, contact your local utility locating service so buried lines are marked. In the United States that is done by dialing 811. Check your property survey as well, because building a fence a few inches over the line can cause a dispute with a neighbor.

How do I figure out how many pickets or boards to buy?+

Convert the fence length to inches, then divide by the picket width plus the gap you want between boards, and round up. For example, 100 ft is 1,200 inches, and with 3.5 inch pickets spaced 2 inches apart, each picket uses 5.5 inches, so you need about 219 pickets. This tool does not count pickets, so run that sum separately and add a few extras for cutting mistakes.

Does the type of fence change the post spacing I should use?+

Yes. Prefabricated vinyl and metal panels come in set widths, often six or eight feet, so the panel width decides your spacing and you should enter that figure. Chain link and wire fencing are generally stretched between posts set farther apart. Wood fences are the most flexible, because the rail length and the weight of the boards decide the limit. Always follow the manufacturer's installation guide if you have one.

Found this useful? Share it

Help someone else out — or link to it from your own site.

Link to this tool

Writing about fence calculator? Paste this on your site to link here.

<a href="https://everyfix.net/tools/fence-calculator/">Fence Calculator</a> by <a href="https://everyfix.net">EveryFix</a>