Privacy Fence Calculator
A privacy fence calculator counts posts as perimeter ÷ spacing, rounded up: a 40 × 30 ft yard with posts every 8 ft needs 18 posts, or $270 at $15 each.
Privacy fence calculator: counting posts
A privacy fence calculator finds how many posts you need by taking the distance around the yard and dividing it by the post spacing. Fences that close a loop have as many posts as sections, because the last section ends at the first post. The count rounds up, since you cannot buy part of a post.
Perimeter = 2 × (length + width). Posts = perimeter ÷ spacing, rounded up. Cost = posts × price per post.
The depth field in this tool holds the spacing in feet. If it is left blank, the tool uses 8 ft.
Worked examples
Example 1, the default yard. 40 ft × 30 ft, posts 8 ft apart, $15 per post.
- Perimeter: 2 × (40 + 30) = 140 ft
- Posts: 140 ÷ 8 = 17.5, rounded up to 18
- Cost: 18 × $15 = $270
Example 2, a bigger yard with tighter spacing. 60 ft × 40 ft, posts 6 ft apart.
- Perimeter: 200 ft
- Posts: 200 ÷ 6 = 33.33, rounded up to 34
- Cost: 34 × $15 = $510
Example 3, wider spacing. The 40 × 30 ft yard with posts 10 ft apart.
- Posts: 140 ÷ 10 = 14
- Cost: $210
Posts by spacing for a 140 ft fence
| Spacing | Posts |
|---|---|
| 6 ft | 24 |
| 8 ft | 18 |
| 10 ft | 14 |
| 12 ft | 12 |
Closer spacing makes a stiffer fence, and wider spacing saves posts. The right choice depends on your panels and rails.
A fence that does not close a loop
The calculator assumes the fence goes all the way around. If your fence is a single line from one corner to another, it needs one more post than sections. A 100 ft run at 8 ft spacing has 100 ÷ 8 = 12.5, which rounds up to 13 sections and 14 posts. Run the numbers by hand for each open side, or treat each side as its own line.
What else goes into a privacy fence
- Rails. Most 6 ft fences use two or three horizontal rails between posts.
- Pickets or panels. Count them from the fence length, not from the posts.
- Gate hardware. Heavy hinges and a latch, plus gate posts that are braced.
- Concrete or gravel. Each post hole needs fill, and the fence post concrete calculator estimates the bags.
- Caps and trim. Optional but common.
Measuring your yard
Measure along the actual fence line with a tape or a measuring wheel. Do not use the lot dimensions from the survey, because the fence is often set inside the property line. Mark the corners with stakes and a string. Count the gates and decide where they go, since they change the post positions.
Matching the fence to the post count
Once you have the post count, work out the rest in the same order. Rails come first, usually two or three per section, so a fence with 18 sections needs 36 to 54 rails if they run post to post. Then count the panels or pickets from the fence length. Last, add fasteners, gate hardware, and the concrete or gravel for the holes. Building from the post count outward keeps the shopping list from drifting. If a section is shorter than the rest because the yard does not divide evenly, put the short section where it is least visible, such as behind a shed.
Before you build
Check the rules where you live. Height limits, setbacks from the property line, and permit requirements vary by town, and some neighborhoods have additional rules. Call your utility locating service before digging, because buried lines are common along fence lines.
Common mistakes
- Setting the spacing in inches in the field that expects feet.
- Using the lot size instead of the fence line.
- Skipping the extra gate posts.
- Rounding down. Even a small remainder needs one more post.
- Setting posts too shallow for a solid fence that catches wind.
Related calculators
The fence picket calculator counts boards, the fence post calculator gives another post count, and the fence post depth calculator helps with the hole.
Frequently asked questions
What post spacing works for a 6 ft privacy fence?
Most privacy fences use 8 ft spacing between posts, because prefabricated panels and many rail lengths are 8 ft. Six-foot spacing is stiffer and suits windy sites. Check the panel width or rail length you plan to use.
How do I figure out how many pickets I need once I know my post count?
Pickets are counted by the length of the fence, not by the posts. Divide the fence length in inches by the picket width plus any gap. A 5.5 in picket on a 140 ft fence takes about 1,680 ÷ 5.5 = 306 pickets. The fence picket calculator does this.
Does a taller privacy fence need closer post spacing for wind load?
Often yes. A solid fence catches the wind like a sail, so the posts and their footings carry more load. Tighter spacing, deeper holes, and concrete help. Local codes may also set a maximum height, so check before you build.
Do gate openings change the post count?
Yes. A gate needs a post on each side, and those posts are larger or braced because the gate swings on them. Count the gate posts by hand and adjust the total this tool gives you.
How deep should privacy fence posts be set?
A common rule is at least one third of the post's total length in the ground, and below the frost line where the ground freezes. A 6 ft fence on an 8 ft post is about 2 ft 8 in deep. Your local code and frost depth decide the final number.
Estimates only. Verify quantities with your supplier before purchasing.