A fence looks simple, but three things trip people up when they count materials: corner posts that belong to two sides, gates that add posts, and sections that must be rounded up on every side. This guide walks through a fence around a yard so the numbers you take to the store are right.
Start with a top-down sketch
- Draw the fence line as seen from above and mark every corner, every gate and anything the line has to go around.
- Measure each straight run along the line and write its length on the sketch. Use stakes and string to keep the line straight on a large yard.
- Decide how far apart the posts will be. Use the spacing in your plan or in your fence maker's instructions; it depends on the product.
- Treat each straight run as its own piece. A change of direction starts a new run.
The three rules
- Sections are rounded up on each run. A 30 ft run with posts 8 ft apart needs 30 ÷ 8 = 3.75, so 4 sections. You cannot buy three-quarters of a section.
- A straight run has one more post than sections. Four sections need five posts, because both ends have a post.
- A corner post is shared. It is the last post of one run and the first of the next, so count it once. For a closed fence around a yard, the number of posts equals the number of sections.
Because sections are rounded up and then spaced evenly, the real distance between posts is a little less than the maximum you chose. A 30 ft run in 4 sections has posts 7.5 ft apart.
Worked example: a 40 × 30 ft yard
Posts 8 ft apart, so each side is rounded up on its own: the 40 ft sides need 5 sections each and the 30 ft sides need 4. That is 5 + 4 + 5 + 4 = 18 sections.
Counting each side with its own end posts gives 6 + 5 + 6 + 5 = 22 posts, but the four corner posts were each counted twice. Subtract 4 and you get 18 posts, the same as the number of sections.
With two rails per section that is 36 rails. With 5½ in pickets, a ½ in gap and 5 % extra, adding up each side gives 294 pickets.
Adding a gate
A gate needs a post on each side of its opening. Put a 4 ft gate at the end of a 40 ft side: the fence on that side is 36 ft, which is 5 sections and 7 posts, and the whole yard becomes 18 sections and 19 posts with 286 pickets. The opening itself needs no pickets, but you still need to buy the gate and its hardware.
Common mistakes
- Dividing the whole perimeter by the spacing. The perimeter here is 140 ft and 140 ÷ 8 = 17.5, which rounds to 18 sections. That happens to match, but in other yards rounding each side up separately gives more.
- Counting corner posts twice. For a closed fence, posts and sections are equal.
- Forgetting the gate posts. Each gate adds a post.
- Forgetting what is not in the count. Post caps, gate hardware, concrete or gravel for the post holes and fasteners are separate.
- Skipping the rules. Many places limit fence height and some require a permit. Ask your local building department first, and know where buried utilities run before you dig; in the U.S. you can call 811.
Frequently asked questions
How far apart should fence posts be?
It depends on the fence style and the manufacturer, so use the spacing in your plan or the product instructions. The calculators take whatever spacing you enter.
Do I count the gate as a section?
No. The gate opening is not part of the fenced length. The fence on each side of it is, and each side of the opening needs a post.
How do I estimate the concrete for the posts?
Take the number of posts and the size of the hole from your plan, find the volume of one hole in cubic feet and multiply. The cubic yards guide explains the conversions.