Fence Calculator
Enter a fence run's length, pick post spacing or panel width, and choose 2 or 3 rail sections to get post, panel, and rail counts, plus concrete bag counts for the post holes. Results update as you type. Need the concrete math on its own instead? Try the concrete calculator.
Posts are spaced this far apart, center to center; the calculator works out how many fit.
- Posts needed
- 0
- Panels needed
- 0
- Total rails
- 0
- Concrete per hole (with waste)
- 0 ft³
- Total concrete (all holes)
- 0 ft³
- Cubic yards (all holes)
- 0 yd³
- 40 lb bags (all holes)
- 0
- 60 lb bags (all holes)
- 0
- 80 lb bags (all holes)
- 0
How to plan a fence layout
Measure the total length of the fence run in a straight line, in the same units you plan to use throughout. If the fence has multiple straight sections meeting at corners, measure and calculate each straight section separately, since the post-at-each-end rule applies per straight run, not to the whole perimeter at once.
Decide whether you are setting posts at a spacing you choose, 8 feet is a common default and a common maximum for wood privacy and picket fencing, or buying pre-built panels of a fixed width, which fixes the spacing for you. Switch the "spacing given as" option above to match, and the calculator works out panels from posts or posts from panels accordingly.
For a straight, contiguous run with a post only at each end, the standard construction formula is posts equals the run length divided by the spacing, rounded up to a whole number of gaps, plus one more post for the starting end. Panels for that same run equal posts minus one, since each panel fills the gap between two consecutive posts.
Pick 2-rail or 3-rail sections based on height and wind exposure. A middle rail adds rigidity on taller fences and in windy spots; shorter or more decorative fencing often gets by with just a top and bottom rail. Total rails needed is simply the panel count multiplied by rails per section.
For the concrete, this calculator treats each round post hole as its bounding square, the diameter used as both the length and width of a square, the same simplifying shortcut used by this site's concrete calculator for round footings. It always gives at least as much material as the true cylinder, never less, which is why it is documented here as a safe default rather than the most exact possible number.
Corners and gate ends are not part of the straight-run math above. Every corner where the fence changes direction needs its own post, and every gate opening needs a post on each side of it. This calculator does not know your site's layout, so it reports the straight-run count only; add one post per corner and two posts per gate opening yourself, based on your own plan, rather than trust a guessed number here.
Worked example
A fence run is 100 ft long, with posts spaced 8 ft apart, 3-rail sections, 10 in diameter post holes dug 3 ft deep, and a 10% waste factor on the concrete.
Post spaces = 100 ÷ 8 = 12.5, rounded up to 13 spaces.
Posts = 13 spaces + 1 = 14 posts.
Panels = posts − 1 = 14 − 1 = 13 panels.
Total rails = 13 panels × 3 rails each = 39 rails.
Hole diameter in feet = 10 ÷ 12 = 0.8333 ft.
Volume per hole (bounding square) = 0.8333 × 0.8333 × 3 = 2.0833 cu ft.
With 10% waste: 2.0833 × 1.10 = 2.2917 cu ft per hole.
Total for all 14 holes = 2.2917 × 14 = 32.0833 cu ft.
Cubic yards = 32.0833 ÷ 27 = 1.1883 cu yd.
40 lb bags (0.30 ft³ each) = 32.0833 ÷ 0.30 = 106.94 exact, rounded up to 107 bags.
60 lb bags (0.45 ft³ each) = 32.0833 ÷ 0.45 = 71.30 exact, rounded up to 72 bags.
80 lb bags (0.60 ft³ each) = 32.0833 ÷ 0.60 = 53.47 exact, rounded up to 54 bags.
These are the exact default values shown by the calculator above, so you can check them against your own screen before trusting it with your own numbers.
Related tools and guides
- Concrete calculator. Cubic yards and 40, 60, or 80 lb bags for slabs, footings, and columns, the same bag yields used above.
- How many bags of concrete for a fence post? The true cylinder math side by side with the bounding-square shortcut.
- How many fence panels for 100 feet? The straight-run formula above, worked out in full.
- How far apart should fence posts be? The sourced spacing recommendation behind the 8 ft default above.
- Square footage calculator. For the yard or lot area the fence will enclose.
Frequently asked questions
How many fence posts do I need for a 100 foot fence?
For a 100 foot run with posts spaced 8 feet apart, 100 divided by 8 is 12.5, rounded up to 13 post spaces. A straight run always has one more post than it has spaces, so the total is 13 plus 1, which is 14 posts. That plus one step is easy to miss: 13 gaps between posts means 14 posts, not 13.
How many fence panels does a 100 foot fence need?
With 14 posts set along a contiguous run, the number of panels is posts minus 1, so 14 minus 1 equals 13 panels. That matches dividing the run length by the spacing and rounding up directly: 100 divided by 8 is 12.5, rounded up to 13 panels, the same figure either way.
Should I enter post spacing or panel width?
Use post spacing if you are setting posts yourself and choosing how far apart to place them, 8 feet is a common maximum for wood fencing. Use panel width if you are buying pre-built fence panels of a fixed size, such as 6 or 8 feet, since the panel size fixes the spacing for you. For a 100 foot run with 6 foot panels, 100 divided by 6 is 16.67, rounded up to 17 panels, plus 1 for 18 posts, a different count than the 8 foot spacing example because the unit size changed.
How much concrete do I need per fence post hole?
For a common 10 inch diameter, 3 foot deep hole, using the same bounding-square method as this site's concrete calculator (entering the diameter as both sides of a square, which is a safe overestimate of the true round volume) and a 10 percent waste factor, one hole needs 8 bags of 40 lb mix, 6 bags of 60 lb mix, or 4 bags of 80 lb mix.
Should I use 2-rail or 3-rail fence construction?
2-rail sections (top and bottom rail only) are common for shorter fences, split rail styles, and anywhere the fence is mostly decorative. 3-rail sections add a middle rail for extra rigidity and are more common on taller fences, privacy fencing, and anywhere panels need to resist wind or animal pressure without sagging. Check your fence height and local wind exposure before picking one over the other.
Do corners and gate posts need extra posts?
Yes. The straight-run formula above assumes one continuous line with a post only at each end. Every corner where the fence changes direction needs its own post, and every gate opening needs a post on each side of the opening, in addition to the posts the straight-run math already counts. This calculator does not guess how many corners or gates your layout has, so add one post per corner and two posts per gate opening (one on each side) to the total it gives you, based on your own site plan.