A fence protects a garden from rabbits, deer, dogs and wandering children, but buying the materials without a plan leads to wasted money and extra trips to the store. This garden fence material calculator works out how much fencing, how many posts and how many rolls you need to enclose a rectangular garden, with an opening for a gate. Enter the garden length and width, the gate width, the post spacing and the roll length, and it gives the totals.
How to use the garden fence material calculator
- Measure the garden length and width in feet, along the line where the fence will stand.
- Enter the gate width. Four feet fits a wheelbarrow comfortably. Use zero if you have no gate.
- Set the post spacing. Six to ten feet is common. Closer posts suit heavy wire or windy sites.
- Enter the fencing roll length and fence height from the product you plan to buy.
- Read the list: fencing length, posts, brace posts and rolls.
How the totals are worked out
The perimeter is twice the length plus the width, and the fencing length is the perimeter minus the gate. Posts are counted side by side by dividing each side by the post spacing and rounding up, which also gives you the corner posts. An extra post is added to frame the gate opening. Brace posts or brace kits go at the four corners and either side of the gate, because those are the points that take the pull when the fence is stretched.
Choosing fencing for the job
| Fencing | Good for | Notes |
|---|---|---|
| Welded wire or hardware cloth | Rabbits and small animals | Small openings stop small animals, and the fabric is easy to attach to posts |
| Woven wire | Larger animals and general use | Strong, but usually needs tensioning and good braces |
| Plastic or mesh fencing | Light protection | Cheaper, but it can be chewed through or pushed over |
| Wood panels or pickets | Appearance and privacy | Cost more and need maintenance |
Some animals dig under fences. If digging is a problem where you live, bury the bottom of the fence a few inches or bend it outward along the ground. Your local Cooperative Extension office can advise on what works for the animals in your area.
Before you build
- Call 811. In the US, calling 811 before you dig is free and gets buried utilities marked.
- Check local rules. Cities, counties and homeowners’ associations may limit fence height, materials or distance from the property line.
- Know your boundary. Build on your own land and confirm where the line is.
- Set posts deep and brace them. The trellis post and wire calculator has useful guidance on post length and bracing.
- Add netting over the top for birds with the garden netting calculator.
- Budget the project with the garden cost estimator.
Limits of this tool
These are estimates for a rectangular garden on level ground. Slopes, corners that do not meet at right angles and extra gates change the count. Posts also need extra length for the part buried in the ground. Buy a few spare posts and some extra fencing.
Frequently asked questions
How many fence posts do I need for a 40 by 20 foot garden?
With 8-foot spacing and a gate, about 17 posts, plus brace posts or kits at the corners and gate. Use the calculator above for your own sizes.
How far apart should fence posts be?
Six to ten feet is common, depending on the fencing and the load.
How wide should a garden gate be?
Three to four feet suits most gardens. Choose four if you will push a wheelbarrow through.
Do I need a permit for a garden fence?
It depends on where you live. Check your city or county rules and any homeowners’ association rules before building.
How deep should fence posts go?
Deep enough to stay firm, often about a third of the post length, with corner and gate posts set deeper.