Free tool · Home and DIY
Fence calculator
Type each run of fence and its gates, choose pickets, panels or post and rail, and get the posts, rails, pickets or panels and an optional amount of concrete for the post holes.
- Free
- No sign-up
- Runs in your browser
14 posts27 rails · 212 pickets · 96 ft of fence · 1 gate
- 100 ft in 2 runs
- 1 corner post shared
- 8 ft post spacing
- 10% extra
| Run | Length | Gates | Sections | Posts |
|---|---|---|---|---|
| Run 1 | 60 | 1 | 7 | 9 |
| Run 2 | 40 | 0 | 5 | 6 |
- Total run length
- 100 ft
- Gate openings
- 1 × 4 ft
- Fenced length
- 96 ft
- Sections
- 12
- Posts
- 14
- Rails, 2 per section
- 24 → 27
- Rail length in all
- 192 ft
- Pickets, with 10% extra
- 192 → 212
- Concrete per post hole
- 0.87 ft³ (0.03 yd³)
- Concrete, with 10% extra
- 13.38 ft³ (0.50 yd³)
- Premix bags
- 23 × 80 lb bags
Formula: per run, fenced length = run length − gates × gate width; sections = fenced length ÷ post spacing, rounded up; posts = sections + 1 + gates; runs joined at a corner share one post. Pickets = fenced length ÷ (picket width + gap), rounded up. Rails = sections × rails per section. Extra % is added to rails, pickets and concrete, not to posts. Concrete per hole = π × (hole diameter ÷ 2)² × depth − post size² × depth.
Your numbers: 1: 56.00 ÷ 8 = 7.00 sections → 7, posts 7 + 1 + 1 gate = 9; 2: 40.00 ÷ 8 = 5.00 sections → 5, posts 5 + 1 = 6; 2 runs joined end to end share 1 corner posts = 14 posts in all. Concrete: 12.16 ft³ (0.45 yd³) for 14 holes, × (1 + 10 ÷ 100) = 13.38 ft³ (0.50 yd³); 22.29 bags of 0.6 ft³ rounds up to 23.
This is a materials estimate, not a plan, permit or survey. Fence height, local rules, property lines, post depth for your soil and frost line, and your supplier's lengths and sizes all matter: check them before you buy. Post spacing, rails per section and the picket gap are examples you can change.
How to use the Fence Calculator
- Pick US or Metric under Units, then type the Length of each run and the Gates in this run. Press Add another run for each straight side.
- Choose How the runs meet and the Gate opening width, then pick what goes between the posts and type the Post spacing and Rails per section.
- For pickets, type the Picket width and the Gap between pickets. Set the Extra %.
- Tick Estimate the concrete for the post holes, then read the posts, rails, pickets and bags under Result.
How many fence posts do I need?
Divide the length of fence by the spacing between posts and round up to whole sections, then add one more post, because a straight run of n sections needs n + 1 posts. A 40 ft run with posts 8 ft apart is exactly 5 sections, so it needs 6 posts. A 41 ft run is 5.125 sections, which rounds up to 6 sections and 7 posts. The tool rounds each run separately and ignores float noise, so a run that is exactly 48 ft with 8 ft sections is 6 sections, not 7.
The spacing is an example you can change, because it depends on your rails or panels, the fence height and your local rules. When you choose ready-made panels, the spacing box becomes the panel width, and the number of panels equals the number of sections.
How do I account for gates and corners?
A gate is an opening in the fence, so its width comes off the fenced length, and it needs two posts of its own: one at each side. In the example, a 60 ft run with one 4 ft gate has 56 ft of fence, which is 7 sections and 7 + 1 + 1 = 9 posts. Type the number of gates in each run and the one gate width, and the tool does this for every run.
A corner is shared by the two runs that meet there, so it is counted once. Type each straight side as its own run and keep Connected end to end: the example adds a 40 ft run (5 sections, 6 posts) to the 60 ft run and subtracts the shared corner post, giving 9 + 6 − 1 = 14 posts. For a fence that goes all the way round, choose Closed loop, which also shares the post where the last run meets the first (13 posts here), and Separate runs when the fences do not touch (15 posts).
How do I calculate pickets and rails?
Each picket and the gap beside it take up picket width + gap of the fence, so the pickets for a run are the fenced length divided by that, rounded up. With 5.5 in pickets and a 1/2 in gap that is 6 in per picket, so the 56 ft run needs 112 pickets and the 40 ft run needs 80: 192 in all, or 212 with 10% extra for cuts and splits. Rails are counted per section: 12 sections with 2 rails each are 24 rails, or 27 with the extra. The picket size, the gap, the rails per section and the extra are all editable, and the extra percent is added to rails, pickets or panels and concrete, but not to posts.
Pickets and rails are bought in the lengths and sizes your supplier stocks, so use the result as a shopping count and check that the rail length suits your post spacing. Gates have their own frame and boards, which are not included.
How much concrete do I need for fence posts?
Each hole is a cylinder, π × (hole diameter ÷ 2)² × depth, and the post takes up some of that space, so the concrete is the cylinder minus the post. For a hole 10 in wide and 24 in deep with a 4 in square post, that is 1,885 − 384 = 1,501 cubic inches, or 0.87 cubic feet. Fourteen holes take 12.16 cubic feet, or 13.4 cubic feet with 10% extra, which is 23 bags of an 80 lb mix that yields 0.6 cubic feet. The bag yield is a typical figure, not a fact about any brand, so type the one printed on your bag.
Hole depth depends on the fence height, the soil and local frost depth, so check those before you dig. This calculator is a materials estimate, not a plan, a permit or a boundary survey: check property lines and local rules before you build.
Use it with
- Concrete Calculator: bags or cubic yards for slabs and posts.
- Square Footage Calculator: area of rooms and plots.
- Gravel Calculator: gravel tons and volume.
Questions
How many fence posts do I need?
Divide the fence length by the post spacing, round up, and add one. A 40 ft run with posts 8 ft apart is 5 sections and 6 posts. Gates add posts, and corners shared by two runs are counted once.
How do I calculate pickets for a fence?
Divide the fenced length by the picket width plus the gap, and round up. With 5.5 in pickets and a 1/2 in gap, 56 ft needs 112 pickets before any extra.
How far apart should fence posts be?
It depends on the rails, panels, fence height and your local rules. The tool starts at 8 ft as an example, and when you use panels the spacing is the panel width. Follow your supplier and local guidance.
How do I account for gates and corners?
Give each straight side as its own run, with the number of gates it has. Gates come off the fenced length and add two posts, and corners shared by two runs are counted once.
How much concrete do I need for fence posts?
Work out the volume of each hole, π × (diameter ÷ 2)² × depth, subtract the post, and multiply by the number of posts. A 10 in hole 24 in deep with a 4 in post takes about 0.87 ft³ of concrete.
Does this work out a gate or a fence height?
No. It counts the posts, rails, pickets or panels and concrete for the runs you type. Gate hardware, fence height, permits and property lines are for you to check locally.
How this page was made: the tool's results are computed in your browser by the code on this page; the explanations were drafted with AI help and checked against the tool's own output.