A fence is one of the easier jobs to picture and one of the easier ones to under-buy for. People pace off the yard, divide by eight, and head to the store, then come up short on posts because the gate needed two of its own, short on rails because the corner run ended in a half section, and way short on concrete. This guide counts a wood fence the way an estimator does: sections first, then posts, rails, pickets, fasteners and the concrete and gravel under each post.
The example is 100 feet of 6 foot tall picket fence in a straight line, with one 4 foot gate. The free Fence Calculator uses the same steps and the same starting numbers, so you can check each result against it and then change anything that doesn't match your yard.
Before you count: walk the line
Four things decide the whole list, and all four come from a walk along the property line with a tape or a measuring wheel.
- Total length in feet, including the space where the gate will go.
- Corners: every place the fence turns. A straight fence has none. An L has one, a U has two.
- Ends: every place the fence stops, usually at a house, a garage or another fence. A straight fence has 2 ends. A fence that goes all the way around a yard and closes on itself has 0 ends and at least 3 corners.
- Gates: how many and how wide. A 4 foot gate is a common size for walking through. Make it wider if a mower or a wheelbarrow has to pass.
Write those down, then pick a post spacing. Eight feet on center is the usual choice for wood fences, because 8 foot rails and 8 foot panels are what stores stock. Six feet is used where the fence needs to be stiffer or where shorter rails are on hand.
One warning before the math. This is a material count, not a property survey or a code review. Confirm where the line actually is, ask about setbacks and height limits, check any homeowners association rules, and have underground utilities marked before anyone digs. In the United States you can call 811 for that marking at no charge.
Step 1: Fenced length and sections
Start by taking the gates out of the length, because a gate hangs on its own posts and gets no rails or pickets of its own (unless you build it from pickets, which Step 4 covers). What's left is the fenced length. Divide it by the post spacing and round up to get the number of full spans.
Then account for the runs. Each straight run of fence usually ends with one short section, because the length of a run is rarely an exact multiple of the spacing. A straight fence is 1 run. Each corner adds a run, and each gate adds one more, because a gate splits the run it sits in. The count of sections is the full spans plus the runs, minus one.
Fenced length = Total length − (Gates × Gate width)
Full spans = Fenced length ÷ Post spacing, rounded up
Runs = Corners + Ends − 1, plus 1 for each gate (a fence that closes on itself: Corners, plus 1 for each gate)
Sections = Full spans + Runs − 1
Worked example: 100 ft straight fence, 2 ends, one 4 ft gate, posts 8 ft apart
- Fenced length: 100 − 4 = 96 feet
- Full spans: 96 ÷ 8 = 12 spans, no rounding needed
- Runs: 0 corners + 2 ends − 1 = 1, plus 1 gate = 2 runs
- Sections: 12 + 2 − 1 = 13 sections
Why 13 and not 12? The gate sits somewhere along the 100 feet, say 40 feet from one end. That leaves 40 feet of fence on one side of it and 56 feet on the other. The 40 foot side is five 8 foot sections. The 56 foot side is seven. That is 12, and the 4 foot gate takes the rest. But move the gate to 37 feet from the end, and the first side is four full sections plus a 5 foot piece, while the other side is 59 feet, seven full sections plus a 3 foot piece. Now it is 13 sections. The method counts the extra short section every time, so you never run out when the gate doesn't land on an 8 foot mark. If it does land exactly, you have a few spare boards.
Step 2: Posts
Posts come in three kinds. Line posts stand between the full spans: one fewer than the number of spans. Corner and end posts are one per corner and one per end. Gate posts are two per gate, and they are often set deeper or made heavier than the rest because the gate's weight hangs on them.
Line posts = Full spans − 1
Posts = Line posts + Corners + Ends + (2 × Gates)
Post length = Fence height + Depth in the ground
Worked example, continued: 6 ft fence, posts set 24 in deep
- Line posts: 12 − 1 = 11
- End posts: 2. Gate posts: 2 × 1 = 2
- Posts: 11 + 2 + 2 = 15 posts
- Post length: 6 ft + 24 in = 8 feet, so buy 8 ft posts
The 24 inch depth is a rule of thumb: bury about one third of the height above ground, and more in soft soil, in high wind or for the gate posts. Set them 30 inches instead and the posts have to be 8.5 feet long, which usually means buying 10 footers and cutting them down. A fence that closes on itself has as many posts as it has sections, because every post stands between two sections.
Step 3: Rails
Rails are the horizontal boards the pickets fasten to. Two rails are common on fences under 6 feet, three on fences 6 feet and taller, since a tall picket with only two rails tends to cup and bow. Each section gets its own rails, and they are cut to fit between the posts, so an 8 foot rail serves an 8 foot section with a little trimmed off. Add waste for the short sections, bad boards and cuts.
Rails = Sections × Rails per section, then × (1 + Waste), rounded up
Worked example, continued: 3 rails per section, 10% waste
- Rails before waste: 13 × 3 = 39
- With waste: 39 × 1.10 = 42.9, so 43 rails, each 8 feet or longer
Step 4: Pickets
Pickets are counted along the fenced length, not by section. Each picket takes up its own width plus the gap you leave to the next one. Turn the fenced length into inches, divide by that total, round up, then add waste. A 1 by 6 picket is actually about 5.5 inches wide. A privacy fence sets them tight, with no gap, because the boards shrink a little as they dry and open small gaps on their own. A spaced picket fence might leave 1/2 inch to 2 inches, and that changes the count a lot.
Pickets = Fenced length in inches ÷ (Picket width + Gap), rounded up, then × (1 + Waste), rounded up
Worked example, continued: 5.5 in pickets set tight, 10% waste
- Fenced length in inches: 96 × 12 = 1,152 inches
- Pickets before waste: 1,152 ÷ 5.5 = 209.45, so 210
- With waste: 210 × 1.10 = 231 pickets, 6 feet tall
Two choices move this number.
- The gap. Leave 1/2 inch between pickets and each one takes 6 inches of fence: 1,152 ÷ 6 = 192 before waste, and 192 × 1.10 = 211.2, so 212 pickets. That is 19 fewer boards than the tight fence. Decide on the gap before you buy, not at the fence.
- Building the gate yourself. A gate made from matching pickets uses the same boards as the fence. Add the gate width back in: 100 × 12 = 1,200 inches, 1,200 ÷ 5.5 = 218.18, so 219 before waste and 241 pickets after. The gate frame, hinges and latch are extra. A bought gate needs none of this.
Step 5: Fasteners
Each picket is fastened to each rail, usually with two screws or two ring-shank nails per crossing. Multiply the pickets before waste by the rails per section and by the fasteners per crossing, then divide by the count on the box.
Fasteners = Pickets × Rails per section × Fasteners per crossing
Worked example, continued: 2 screws per crossing, 150 per box
- Fasteners: 210 × 3 × 2 = 1,260 screws
- Boxes: 1,260 ÷ 150 = 8.4, so 9 boxes
A 1 pound box of #8 by 1-5/8 inch exterior screws holds about 150, but the count is printed on the box and it varies by brand, so change that number to match. Use fasteners rated for treated lumber and for outdoor use, or the heads will streak the boards within a year. Rails fasten to the posts with their own screws or brackets, which are not in this count.
Step 6: Concrete and gravel for the posts
This is where most fence lists fall apart, because the amount per hole looks small until you multiply by 15. The concrete fills the ring between the post and the wall of the hole, from the top of the gravel to the ground. A hole about three times the post width is a common guideline, so a 4x4 post, which is really 3.5 inches square, gets a 10.5 inch hole.
Hole area = 3.1416 × (Hole diameter ÷ 2)², in square inches
Concrete per hole = (Hole area − Post width²) × Depth in inches ÷ 1,728, in cubic feet
Bags per hole = Concrete per hole ÷ Yield of one bag, rounded up
Worked example, continued: 4x4 posts, 10.5 in holes, 24 in of concrete over 6 in of gravel
- Hole area: 3.1416 × 5.25² = 86.59 square inches
- Post: 3.5 × 3.5 = 12.25 square inches, leaving 74.34 square inches of concrete
- Per hole: 74.34 × 24 ÷ 1,728 = 1.03 cubic feet
- All 15 holes: 1.03 × 15 = 15.49 cubic feet
- 80 lb bags at 0.60 cubic foot each: 1.03 ÷ 0.60 = 1.72, so 2 per hole, or 30 bags
- 50 lb fast-setting bags at 0.375 cubic foot each: 1.03 ÷ 0.375 = 2.75, so 3 per hole, or 45 bags
- Gravel: 86.59 × 6 ÷ 1,728 = 0.30 cubic foot per hole, 4.51 cubic feet in all, so 10 bags at 0.5 cubic foot each
- Each hole is dug 24 + 6 = 30 inches deep
Notice that bags are rounded up per hole, not for the whole fence. Fifteen holes at 1.03 cubic feet is 15.49 cubic feet, which would be 26 bags if you could pour it all from one pile. But you can't split a bag between holes neatly, and a hole with 1.2 bags in it is a hole with a weak top. Buying 2 per hole is how it actually goes.
The hole size matters more than the depth. Go to 6x6 posts with 16.5 inch holes and each hole takes 2.55 cubic feet, or 5 bags of 80 lb mix, for 75 bags in all. Keep the 4x4 posts but set them 30 inches deep instead of 24 and it is 1.29 cubic feet per hole, 3 bags each, 45 bags total. The yield printed on your bag is the number to use.
The shopping list for the example fence
| Item | Quantity |
|---|---|
| Posts, 4x4, 8 ft | 15 |
| Rails, 2x4, 8 ft | 43 |
| Pickets, 1x6, 6 ft | 231 |
| Exterior screws, boxes of 150 | 9 |
| Concrete mix, 80 lb bags | 30 |
| Gravel, 0.5 cu ft bags | 10 |
| Gate, 4 ft, with hinges and latch | 1 |
Post caps, rail brackets, string line, stakes and the gate hardware are not counted here, so add them from your plan. Compare what two stores charge for the pickets:
Check today's price:Home DepotLowe's
What changes the list
The same 100 feet can be laid out more than one way. Here is the example next to three changes, with everything else left the same.
| Item | Straight, 8 ft spacing | One corner (L shape) | Straight, 6 ft spacing | Straight, 8 ft panels |
|---|---|---|---|---|
| Sections | 13 | 14 | 17 | 13 panels |
| Posts | 15 | 16 | 19 | 15 |
| Rails | 43 | 47 | 57 | none |
| Pickets | 231 | 231 | 231 | none |
| 80 lb bags | 30 | 32 | 38 | 30 |
A corner adds one post and one run, so one more section and three more rails before waste, but the pickets don't change, because they are counted along the fenced length no matter how it bends. Closer posts cost real money: 6 foot spacing on this fence takes 4 more posts, 14 more rails and 8 more bags, while the picket count stays put. Pre-built panels replace the rails and pickets with one panel per section, and the post count is the same as the picket fence, because panels and sections are the same thing. Check that the panel width matches your post spacing before you set a single post.
Height changes the list in a quieter way. A 4 foot fence usually gets 2 rails instead of 3, so the example drops to 29 rails, and posts buried 16 inches, about a third of the height, need only 0.69 cubic foot of concrete each. That still rounds up to 2 bags of 80 lb mix per hole, so the concrete order barely moves. Rounding up per hole does that.
Common mistakes
- Forgetting the gate posts. A gate needs two posts of its own, and leaving them out is the most common reason a fence comes up two posts short.
- Counting posts as length divided by spacing. That misses the end posts, the corners and the short sections. Count spans, then add one post for each end and corner and two for each gate.
- Figuring concrete for the whole fence instead of per hole. Each hole takes whole bags. Round up at the hole and multiply.
- Using the hole volume as the concrete volume. The post takes up part of the hole. With a 6x6 post the difference is close to a bag per hole.
- Setting the gap at the fence. Decide the picket gap first, because 1/2 inch changes the order by about 20 boards per 100 feet.
- Digging before the utilities are marked. A post hole and a buried line don't mix. Call 811 and wait for the marks.
Questions people ask
How many posts do I need for 100 feet of fence?
With posts 8 feet apart, 2 ends and one 4 foot gate, 15 posts: 11 line posts, 2 end posts and 2 gate posts. Without the gate it is 14, because there are 12 line posts and no gate posts. Each corner adds one more.
How many pickets do I need for 100 feet of fence?
For 96 feet of fence beside a 4 foot gate, with 5.5 inch pickets set tight and 10% waste, 231 pickets. Leave a 1/2 inch gap and it drops to 212. Build the gate from pickets too and it rises to 241.
How many bags of concrete per fence post?
For a 4x4 post in a 10.5 inch hole with 24 inches of concrete, 1.03 cubic feet, which is 2 bags of 80 lb mix or 3 bags of 50 lb fast-setting mix. Fifteen posts take 30 or 45 bags. A bigger hole or a deeper set adds a bag per hole quickly.
Does the calculator include cost?
Yes. The Fence Calculator totals posts, rails, pickets or panels, gates, concrete, gravel and fasteners with the prices you type in, and it never fills a price in for you.
Estimates only. This is a material count, not a survey or a code review, so confirm the property line, height limits, setbacks and post depth with your local building department, your homeowners association or a licensed professional. Found a mistake in this guide? Tell us and it will be fixed first.