Fence Calculator
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
i
2. Your fence layout
i
i
i
i
i
i
3. Gates
i
i
i
i
4. Boards and rails
i
i
i
i
i
i
i
i
i
5. Posts and concrete
i
i
i
i
i
i
i
i
6. Prices (examples you can edit)
i
i
i
i
i
i
i
i
i
i
i
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 length | Posts at 6 ft | Posts at 8 ft | Posts at 10 ft | Posts at 12 ft |
|---|---|---|---|---|
| 25 ft | 6 | 5 | 4 | 4 |
| 50 ft | 10 | 8 | 6 | 6 |
| 100 ft | 18 | 14 | 11 | 10 |
| 150 ft | 26 | 20 | 16 | 14 |
| 200 ft | 35 | 26 | 21 | 18 |
| 300 ft | 51 | 39 | 31 | 26 |
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 width | Privacy, no gap | Picket, 2 in gap | Board-on-board, 24% overlap |
|---|---|---|---|
| 3.5 in | 343 | 219 | 451 |
| 5.5 in | 219 | 160 | 287 |
| 7.25 in | 166 | 130 | 218 |
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.
- Fence length: 100 − 4 = 96 feet of fence.
- Sections: 96 ÷ 8 = 12 sections, plus the gate section, makes 13.
- 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.
- Boards: 96 feet is 1,152 inches, and 1,152 ÷ 5.5 rounds up to 210 boards. With 10% extra you buy 231.
- Rails: 3 rails in each of 12 fence sections is 36, and 10% extra takes it to 40 rails of 8 feet.
- 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.
- Inch Calculator, fence calculator (post spacing and count, picket count, rails by height, 10% extra, burial)
- Omni Calculator, board-on-board fence (board count formula and the 24% overlap rule)
- Hunker, how to calculate picket spacing (even gap method and the 4 inch limit)
- Chain Link Fittings, post spacing guide (10 foot limit and hole sizes)
- Angi, how deep should a fence post be, and Bob Vila, how much concrete per fence post (burial depth, gate posts and hole width)
Products, lengths and local rules vary, so check them with your supplier or building department.
Plan the rest of the project
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.