Fence Calculator

By Shivam · Last updated November 14, 2026

This fence calculator works out the posts, boards or pickets, rails, panels or chain link fabric, gates and concrete bags for a wood, panel or chain link fence. Enter the length of your fence line, choose the style and add your gates. It then lists what to buy, draws your layout from above and from the side, and compares post spacings and bag sizes. Tap the i button beside any field for an explanation.

Quick answer: posts = fence length ÷ post spacing, rounded up, plus one for an open run. Boards = fence length in inches ÷ (board width + gap). Wood fence posts are typically 8 feet apart, so a 100 foot run needs about 14 posts and, with 5.5 inch boards and no gap, about 219 boards before extra.

Fence calculator: posts, boards, rails and concrete

Example values are loaded so you can see a result straight away. Change any field and the numbers, the drawings and the charts update.

1. Units and currency

i
Choose how you enter sizes. US uses feet, inches, cubic feet and pounds. Metric uses meters, centimeters and litres. Switching resets the fields to example values in that system.
i
Only the symbol changes. Prices are not converted, so type your own price in your own currency.

2. Your fence layout

i
A single run is one straight length of fence. A rectangle is a fenced yard. You can leave one long side open (a house wall or existing fence) or fence only an L-shape.
i
The fence length in total for a single run, or the long side of the rectangle. Measure along the ground where the posts will stand.
i
The short side of the rectangle.
i
The height of the fence above the ground. It sets the number of rails and how deep the posts go.
i
Privacy has solid boards with no gap. Board-on-board overlaps the boards. Picket leaves gaps. Panels are pre-built sections. Chain link is mesh on a top rail. Switching style loads typical starting values for that style.
i
The distance from the center of one post to the next. Inch Calculator gives 8 feet as typical for wood, and a chain link supplier says never more than 10 feet.

3. Gates

i
How many walk gates, usually about 3 to 4 feet wide. Each gate adds two gate posts. Leave at 0 for none.
i
The width of the opening for one walk gate.
i
How many wide gates for vehicles or equipment. Each adds two gate posts.
i
The width of the opening for one drive gate.

4. Boards and rails

i
Pick the real width of the board. A 1×4 is about 3.5 inches wide, a 1×6 about 5.5 and a 1×8 about 7.25. Choose custom to type your own.
i
The actual width of one board or picket. Use the real size, which is smaller than the name.
i
Space between neighboring boards. Solid privacy fences use 0. The Inch Calculator picket example uses 2 inches, and Hunker advises keeping gaps under 4 inches if the fence must keep children in or out.
i
Board-on-board boards overlap. Omni Calculator suggests about 24% of the board width as a rule of thumb. Choose custom to type your own.
i
How far each board overlaps its neighbor.
i
Automatic uses one rail for every 24 inches of height, rounded up, with a minimum of 2. Choose a number to override it.
i
The length of the rail boards you buy. It must be at least as long as the post spacing. A longer rail can be cut for more than one section.
i
The length of one roll of chain link fabric. Rolls vary by supplier, so enter yours.
i
The length of one piece of top rail. It varies by supplier, so enter yours.

5. Posts and concrete

i
Pick your post. Wood posts use their real size, so a 4×4 is 3.5 inches. Choosing a size sets a typical hole width, which you can change. A chain link supplier gives a 10 inch hole for posts 3 to 5 feet tall and 12 inches for 6 to 12 feet.
i
The width of a custom square post or the diameter of a custom round post.
i
The diameter of the round hole you dig. Bob Vila and Angi give about three times the post width.
i
Inch Calculator says at least one third of the height, and Angi gives one third to one half. Gate posts are always set at one half.
i
Optional. The depth your ground freezes to. The calculator uses whichever is deeper, the fraction or the frost depth. Leave at 0 if you do not know.
i
The bag you plan to buy. Selecting one fills in a typical yield, which you can change.
i
How much concrete one bag makes. The presets are typical, but brands differ, so use the figure on your bag.
i
Extra for cutoffs, waste and spills, as a percentage, on boards, rails, fabric, top rail and concrete. Inch Calculator recommends about 10% extra lumber.

6. Prices (examples you can edit)

i
Price of one board or picket. This and the other prices are examples, not quotes.
i
Price of one rail.
i
Price of one post.
i
Price of one pre-built panel.
i
Price of one roll of chain link fabric.
i
Price of one top rail piece.
i
Price of one line post.
i
Price of one end, corner or gate post.
i
Price of one walk gate with its hardware.
i
Price of one drive gate with its hardware.
i
Price of one bag of concrete.
Your fence materials

Your fence layout from above

The sketch redraws as you change the layout, the spacing and the gates. Gate posts are orange.

Your fence from the side

Two sections drawn from your height, spacing, board size and rails. The posts show the concrete at your burial depth.

Checks against published guidance

    Estimated cost by item

    Posts needed at different spacings

    Concrete bags by bag size

      Estimates for planning only. Post spacing, board counts and depths come from published guides and vary with the design, the soil, the climate and local code, so follow your plans, your building department and your supplier. Prices are examples you can edit, not quotes. See our Disclaimer.

      How this fence calculator works

      A fence looks like one job, but when you go to buy it you are really buying five or six different things: posts, rails, boards or panels or mesh, concrete, and gates. Each one is counted a different way, and a mistake in the first count, the number of posts, carries into all the others. This fence calculator does the counting for you from one measured length, so the list you take to the store matches the fence you plan to build.

      Pick the layout first. A single run is one straight line of fence. A rectangle is a yard fenced on four sides, and you can leave one side open for a house wall or an existing fence, or fence only an L-shape. Then choose the style: a solid privacy fence, a board-on-board fence, a picket fence, pre-built panels or chain link. The page loads example values so you see a result straight away, and every number, drawing and chart updates as you change a field. Tap the i button beside any field to see what it means and where the rule comes from.

      The same page works as a wood fence calculator, a fence material calculator for panels, and a chain link fence calculator, because the only thing that really changes between them is how the middle of the fence is filled in. If you only need a price, the fence cost calculator is built for that. This page is for the quantities.

      How to measure your fence line

      Measure along the line where the posts will stand, not along a property plan, and add the sides up. Pull the tape on the ground, stake each corner and note where a gate will go. Use the real length of every side.

      Gates come out of the fence length, because you do not build boards across them. Enter the walk gates and drive gates separately with their widths, and the calculator takes them off the longest side, then adds two gate posts for each one. That keeps the board count honest and still gives the gate posts the extra depth they need.

      How many fence posts do you need?

      This is the fence post calculator part of the page, and it is the count everything else depends on. The method is the one Inch Calculator publishes: divide the fence length by the post spacing, round up, then add one post for an open run. The same source says wood fence posts are typically 8 feet apart, and gives 14 posts for a 100 foot fence. For a closed rectangle the corners are shared, so the number of posts equals the number of sections.

      This page rounds up for each side separately, because a post has to sit at every corner. A 60 foot side at 8 feet apart needs 8 sections, not 7.5, and the half section is real: you either shorten the last bay or add a post. Gates are treated as sections of their own between two gate posts.

      Spacing depends on the fence. A chain link supplier guide says posts should never be placed further than 10 feet apart and are typically 7 to 10 feet apart. The chart in the results shows how many posts your layout needs at spacings from 6 to 12 feet, so you can see what stretching or tightening the spacing costs.

      Fence lengthPosts at 6 ftPosts at 8 ftPosts at 10 ftPosts at 12 ft
      25 ft6544
      50 ft10866
      100 ft18141110
      150 ft26201614
      200 ft35262118
      300 ft51393126

      The table counts posts for a single straight run with no gates.

      How many boards or pickets do you need?

      For a privacy or picket fence, a fence picket calculator needs three numbers: the fence length, the width of one board and the gap between boards. Divide the length in inches by the width plus the gap and round up. Inch Calculator’s example is a 100 foot fence with 5.5 inch pickets and 2 inch gaps: 1,200 ÷ 7.5 = 160 pickets. A solid privacy fence uses a gap of zero.

      A board-on-board fence is different, because each board overlaps its neighbor and hides the gap behind it. Omni Calculator gives the count as (fence length − board width) ÷ (board width − overlap) + 1, and suggests an overlap of about 24% of the board width as a rule of thumb. Its 8 foot section example needs 24 boards of 5.5 inches with a 1.5 inch overlap. That is why a board-on-board fence takes noticeably more lumber than a plain privacy fence of the same length. The calculator uses 24% by default and lets you type your own overlap.

      This table shows how the board width changes the count for a 100 foot run, before any extra allowance.

      Board widthPrivacy, no gapPicket, 2 in gapBoard-on-board, 24% overlap
      3.5 in343219451
      5.5 in219160287
      7.25 in166130218

      If your pickets are meant to keep children in or out, Hunker advises keeping every gap under 4 inches. Its method for spacing pickets evenly is to work out how many fit in one section, add up their width and share the leftover space across the gaps. The calculator reports that even gap for a picket fence so you can mark your first section before you commit to a full run.

      Rails: how many per section

      Rails are the horizontal pieces that boards and pickets are fixed to. Inch Calculator’s rule of thumb is one rail for every 24 inches of fence height, which gives 3 rails for a 6 foot fence and 2 for a 4 foot fence. The calculator uses that rule when the rails setting is on automatic, and you can force 2, 3 or 4.

      The number of rail pieces depends on the rail length you buy. If your rails are as long as the post spacing, you need one piece for each rail in each section. If a rail is long enough to cut into two sections, the calculator counts how many fit in one piece, so a 16 foot board covers two 8 foot bays. It will warn you if the rail is shorter than the spacing.

      Chain link fence materials

      A chain link fence is counted differently, so the page switches its fields when you choose it. Fabric comes in rolls, so the calculator divides the fence length by the roll length and rounds up. The top rail runs along the top, so it is counted the same way from its own length. The post count changes too: end posts, corner posts and gate posts are terminal posts, which take the pull of the mesh, and the rest are line posts.

      A chain link supplier guide gives the post hole size as 10 inches across and 30 inches deep for fences 3 to 5 feet tall, and 12 inches across and 36 inches deep for fences 6 to 12 feet tall. The calculator fills in a 10 inch hole for the round post preset, and you can change it. Roll length and top rail length are editable because suppliers sell different lengths, so enter what your supplier sells. Fittings such as tension bands, tension bars, rail ends and ties are sold by kit or by the piece, so they are not counted here.

      Pre-built panels

      A panel fence is the simplest count. Each section between two posts takes one panel, so the number of panels equals the number of sections, and the panel width is the post spacing. In practice the gap between posts is a little different from the panel width because of the post thickness, so measure your panel before you set the first post.

      Gates and gate posts

      A gate needs more support than a section of fence, because it swings and carries its own weight on one post. Angi says to set gate posts at one half of the above-ground height, rather than one third. The calculator does exactly that: line posts use your chosen rule, and every gate post is set at half the height, which also increases its concrete. Inch Calculator does not count gates at all and says to plan the gate lumber, extra posts and hardware separately, so this page prices the gates as separate items you can edit.

      Concrete for the posts

      Concrete per post is the volume of the hole around the post, down to the depth you bury it. Inch Calculator says a post should be set at least one third of the fence height in the ground, and Angi gives one third to one half. Bob Vila and Angi both give a hole about three times the post width, which leaves a ring of concrete about one post width thick. For a 6 foot fence with 4×4 posts that works out to a 24 inch burial in a 12 inch round hole.

      The result is a bag count that includes your extra allowance, in the bag size you choose, with a chart that compares 40, 50, 60 and 80 pound bags. For the gravel base, frost depth and hole shapes, use the post hole concrete calculator, which goes into that in detail. In this calculator a 4×4 line post in a 12 inch hole buried 24 inches takes about 1.4 cubic feet, or 3.7 bags of 50 pound concrete.

      Worked example: a 100 foot privacy fence

      Take a 100 foot straight run of 6 foot privacy fence with one 4 foot walk gate, 5.5 inch boards with no gap, posts 8 feet apart, 4×4 posts and 10% extra. These are the same values the calculator loads.

      1. Fence length: 100 − 4 = 96 feet of fence.
      2. Sections: 96 ÷ 8 = 12 sections, plus the gate section, makes 13.
      3. Posts: 13 sections plus one post at the end of the run gives 14 posts, of which 2 are gate posts and 12 are line posts.
      4. Boards: 96 feet is 1,152 inches, and 1,152 ÷ 5.5 rounds up to 210 boards. With 10% extra you buy 231.
      5. Rails: 3 rails in each of 12 fence sections is 36, and 10% extra takes it to 40 rails of 8 feet.
      6. Concrete: the line posts need 24 inches of concrete and the gate posts 36 inches, which comes to about 23.1 cubic feet including the extra, or 62 bags of 50 pound concrete.

      The page adds an example price to each item and totals it, so you can see which line is the biggest part of the bill. The prices are placeholders you replace with your local ones.

      How much extra should you order?

      Inch Calculator recommends ordering about 10% extra lumber for cutoffs and waste, and the calculator uses 10% as its default for boards, rails, fabric and concrete. A fence with many corners, a slope or a lot of cut boards wastes more, so raise the figure. Posts and gates are not increased, because you count those exactly.

      Common mistakes

      • Counting posts as length divided by spacing. You need one more post at the end of an open run.
      • Forgetting the gate posts. Each gate adds two heavy posts set deeper than the rest.
      • Using the board’s name as its width. A 1×6 is about 5.5 inches wide, so enter the real size.
      • Stretching the post spacing to save money. Wider spans put more load on every rail.
      • Buying concrete by the post. Add the whole job, then round up once.

      Fence calculator FAQ

      How do I calculate how much fence I need?

      Measure the length of every side along the ground where the posts will stand, add them up, and subtract the width of any gates. Enter that, the post spacing and the style, and the calculator works out posts, boards, rails and concrete.

      How many fence posts do I need for 100 feet?

      At the usual 8 foot spacing, a straight 100 foot run needs 14 posts, which matches Inch Calculator. Wider spacing needs fewer posts and closer spacing needs more, and each gate adds two posts.

      How many pickets do I need per foot of fence?

      Divide 12 inches by the picket width plus the gap. A 3.5 inch picket with a 2 inch gap takes about 2.2 pickets per foot, so a 100 foot fence needs roughly 218 before waste.

      How do you calculate a board-on-board fence?

      Use (fence length − board width) ÷ (board width − overlap) + 1, rounded up. Omni Calculator suggests an overlap of about 24% of the board width, which is the default here.

      How many rails do I need for a 6 foot fence?

      Three per section, using the rule of one rail for every 24 inches of height. A 4 foot fence takes two. You can override the setting if your design differs.

      How far apart should fence posts be?

      Inch Calculator says wood fence posts are typically 8 feet apart, and a chain link supplier says never more than 10 feet. The chart in the results shows how the post count changes at other spacings.

      How many bags of concrete do I need for fence posts?

      It depends on the post size, the hole and the burial depth. The concrete section above gives a worked figure for one post, and the calculator totals every post and rounds up once.

      Does this work as a chain link fence calculator?

      Yes. Choose chain link and it counts fabric rolls, top rail pieces, line posts and terminal posts. Fittings are not counted, so buy those with the kit you choose.

      Do gates count in the fence length?

      No. The calculator subtracts gate widths from the fence length, so you do not buy boards for the opening, then adds two gate posts for each gate.

      How much extra should I order?

      Inch Calculator recommends about 10% extra lumber for cutoffs and waste. That is the default here, and you can raise it for corners, slopes and lots of cuts.

      Sources and further reading

      The post count, board count, rail rule and overlap come from the published guides below, which I read when writing this page. Where they differ from your plans or your supplier, follow those.

      Products, lengths and local rules vary, so check them with your supplier or building department.

      Once you know the quantities, the fence cost calculator prices the job and the post hole concrete calculator goes deeper on the posts. If the fence has a deck, see the deck board calculator, the deck joist calculator and the deck stair calculator. The concrete calculators hub and the landscaping calculators hub list the other tools for the yard around the fence.

      About the author

      Shivam · Software engineer and founder of Calctoolz

      I build the calculators on Calctoolz. For each tool I read the original formula or published guidance, write the logic to match it, and check the results against hand calculations before publishing. I am not a fence contractor or a structural engineer, so this page is for planning, and your plans, your local building code and your supplier come first. If you spot a number that looks wrong, please tell me.

      How this page was checked: the post count and spacing, the picket and rail rules and the 10% allowance follow Inch Calculator. The board-on-board formula and the 24% overlap follow Omni Calculator, the even picket gap and 4 inch limit follow Hunker, and the chain link spacing limit and hole sizes follow a chain link supplier guide. Burial depth and gate posts follow Angi and Bob Vila. The counting maths was checked against hand calculations and an independent calculation. Prices, roll lengths and bag yields are editable assumptions. Last reviewed November 14, 2026. This page is not engineering or construction advice.

      Rate this calculator