Learn more
Plan a wood or vinyl fence in seconds: enter the length of each side, post spacing and gates, and get the posts, rails, pickets or panels and post-hole concrete you need.
Posts = sections + 1 + 1 per gate
Rails = sections × rails per section
Pickets = fence length ÷ (picket width + gap), plus waste
Concrete per hole = (π × r² − post area) × hole depth
How to use the fence calculator
Type the length of your fence in feet (or meters with the metric switch). If the fence has several straight sides, list each one separated by commas — for example 50, 100, 50 for a back yard that runs down one side, across the back and up the other side. Enter the number of gates and how wide they are, then the post spacing and the fence height. Choose whether you are building with individual pickets or boards, or with pre-made panels.
The optional settings let you change the rails per section, picket width and gap, post size, hole size, concrete bag size and the price of each item. If your fence surrounds an area completely and meets itself (a dog run or pool enclosure, for example), tick the box so the first and last post are not counted twice.
How fence materials are calculated
Posts = sections + 1 + 1 per gate
Rails = sections × rails per section
Pickets = fence length ÷ (picket width + gap), plus waste
Concrete per hole = (π × r² − post area) × hole depth
Every straight side is divided into sections no longer than your post spacing. A run of fence needs one more post than it has sections, because there is a post at each end. Corners share a post, so a fence with three sides in a row still needs only one extra end post. Each gate adds one post: the gate opening splits a run into two runs, and the gate hangs between their end posts. The calculator takes the gate widths out of the longest side before counting sections, so you do not pay for pickets where the gate will go.
Worked example
A 100 ft privacy fence, 6 ft tall, with one 4 ft gate and posts every 8 ft leaves 96 ft of fence. 96 ÷ 8 = 12 sections, so you need 12 + 1 + 1 = 14 posts. With 3 rails per section that is 36 rails, each 8 ft long. Using 5.5 in wide boards with no gap, 96 ft is 1,152 in, and 1,152 ÷ 5.5 = 209.5, rounded up to 210 boards; adding 5% for split or warped boards gives 221 pickets.
For the posts, a 10 in hole 24 in deep holds about 1,885 cubic inches. A 4×4 post takes up 3.5 × 3.5 × 24 = 294 cubic inches, leaving 1,591 in³, or 0.92 ft³ of concrete per hole. Fourteen holes need 12.89 ft³. An 80 lb bag of premix yields about 0.60 ft³, so you need 12.89 ÷ 0.60 = 21.5, rounded up to 22 bags. Each post should be about 8 ft long (6 ft above ground plus 2 ft in the ground). At the example prices, the materials come to about $1,382, or $13.82 per foot.
Post holes and concrete: the rules of thumb
- Depth: bury roughly one third of the post's above-ground height — about 2 ft for a 6 ft fence — and go below the frost line where the ground freezes. Your local building department can tell you the frost depth.
- Width: make the hole about three times the width of the post: 10–12 in for a 4×4, 14–16 in for a 6×6.
- Gravel: a few inches of gravel at the bottom helps water drain away from the end of a wood post.
- Bag yield: a typical 80 lb bag makes about 0.60 ft³, a 60 lb bag about 0.45 ft³ and a 50 lb bag about 0.375 ft³. Check the label, as yields vary by brand. Our concrete calculator handles other shapes.
Common mistakes to avoid
- Forgetting gates. Gate posts take more load and are often a size bigger (6×6) and set deeper.
- Mixing up spacing and panel width. For panel fences, set the post spacing equal to the panel width. If you measure to post centers, the actual panel is slightly narrower.
- Ignoring slopes. On a slope, panels step down and boards may need to be longer. Measure along the ground and add extra material.
- Skipping the rules. Many towns and homeowner associations limit fence height, especially in front yards, and some require a permit. Check before you order.
If you are adding a deck or patio at the same time, try the deck calculator, and use the square footage calculator to measure the yard you are enclosing. These results are material estimates; prices and local requirements vary.
Sources
Concrete yields are typical figures printed on 40–80 lb bags of premixed concrete sold in the US. Post-depth and hole-width guidance follows common fence-building practice; local codes and frost depths take priority.
Cite or link to this page
Using this fence calculator in an article, report or homework? Copy a citation or a ready-made link:
Calcivia. (2026). Fence Calculator. Retrieved November 11, 2026, from https://www.calcivia.com/fence-calculator/"Fence Calculator." Calcivia, 2026, https://www.calcivia.com/fence-calculator/. Accessed 11 Nov. 2026.<a href="https://www.calcivia.com/fence-calculator/">Fence Calculator</a> by Calcivia