Fence Calculator
Enter your fence line’s total length and type below to calculate posts, rails, and pickets. Post spacing is the number that determines almost everything else on this page. Get that right first.
Typical post spacing for wood privacy fencing is 6–8 ft. Post spacing is what drives everything else below, so start there.
- Posts needed
- 14
- Fence sections
- 13
- Rail pieces
- 39
- Pickets (incl. waste)
- 240
Based on 3 rails per section for a 6 ft tall fence, and 218 pickets before the 10% waste buffer for damaged boards and end cuts.
Step 1: Post Spacing Sets the Post Count
Number of posts = (Fence Length ÷ Post Spacing) + 1
| Fence Type | Typical Post Spacing |
|---|---|
| Wood privacy fence | 6–8 ft |
| Picket fence | 6–8 ft |
| Chain link | 8–10 ft |
| Vinyl privacy | 6–8 ft (panel widths vary, so check manufacturer specs) |
Example: 100 linear feet of wood privacy fence, posts every 8 feet.
100 ÷ 8 + 1 = 13.5 → round up to 14 posts
The “+1” matters. A fence line of any length always needs one more post than the number of sections, since posts sit at both ends as well as between each section.
Step 2: Rails
Horizontal rails run between posts and support the pickets or panels. Most privacy and picket fences use 2 rails for fences up to 4 feet tall, and 3 rails for taller fences (5–6 feet) to keep pickets from bowing.
Continuing the example: 14 posts means 13 sections, 3-rail fence at 6 ft tall.
13 sections × 3 rails = 39 rail pieces (typically 8-foot rail boards, matching your post spacing)
Step 3: Pickets
Pickets needed = Fence Length (inches) ÷ Picket Spacing
A standard picket is 5.5 inches wide; add roughly a 0.25–0.5 inch gap between pickets for a privacy fence, or a wider gap for a picket-style (non-privacy) fence.
Continuing the example: 100 ft = 1,200 inches, standard 5.5“ picket with no gap (typical for privacy fencing):
1,200 ÷ 5.5 ≈ 218 pickets
Add 5–10% waste for damaged boards and end cuts: 218 × 1.10 ≈ 240 pickets
Real Fence Lines Aren’t One Straight Run
The arithmetic above assumes a single straight length. Almost no property does that, and the ways a real fence line departs from it all add posts.
Every corner is its own post, and it cannot be shared between two runs the way an in-line post can. Calculate each straight run separately, add one post per corner, then add the runs together. Do not measure the total perimeter and divide once, which will leave you a post short at each turn.
Gates need two posts and both should be oversized. A gate post carries a swinging load that in-line posts never see, which is why gates sag. Use the next size up (6×6 where the line uses 4×4), set them deeper, and treat the gate opening as a fixed dimension you build the rest of the run around rather than something absorbed by the last section.
Sections rarely divide evenly. A 100 ft run at 8 ft spacing gives 12.5 sections, so one section ends up short. Distributing the difference across all sections looks better than leaving a single stub bay at one end, but it means every section is a slightly different width. That is worth deciding before you set any post, because moving one afterwards is a concrete-digging job.
Slopes change the picket length, not the post count. On sloping ground a fence is either racked (rails follow the slope, pickets stay vertical, panels become parallelograms) or stepped, where each section stays level and drops at the post. Racking works with board-by-board fences and needs longer pickets to keep the bottom line consistent. Stepping suits pre-built panels and leaves triangular gaps under each section. Pre-assembled panels usually cannot rack at all, so a sloped run either steps or needs custom sections.
Setting the Posts
Post depth follows the same rule as any other footing: at least one-third of the post’s above-ground height, and below the local frost line, whichever is deeper. A 6 ft fence therefore wants a minimum 2 ft hole on the height rule alone, and considerably more in a cold climate. Frost depth is published by your local building department and is not something to estimate.
Hole diameter should be about three times the post width. A 4×4 wants a 12-inch hole. That sounds generous and is what gives the concrete enough surrounding bearing to resist the lever action of wind against a tall fence.
For concrete, a 4×4 in a 12-inch hole at 2.5 ft deep takes roughly two 50 lb bags per post. Multiply that across 14 posts and it is around 1,400 lb of concrete for a modest run, a real material line rather than an afterthought. Our concrete calculator will size it from your actual hole dimensions.
Two placement points that cost money if missed:
- Confirm the property line before digging. A fence built even a few inches over is a legal problem, not a construction one, and surveys are cheaper than moving a finished fence.
- Call for utility locates. In the US, dialing 811 is free and marks buried services before you dig. A post hole is exactly deep enough to find a gas line or a service cable.
Which Boards Go Where
Fence lumber is not interchangeable, and using the wrong grade in the wrong position is the usual reason a fence fails early.
- Posts must be rated for ground contact. This is a different pressure-treatment retention level from above-ground lumber, labelled on the tag, and it is the single most important material choice on a fence. A post rated only for above-ground use will rot at the soil line within a few years.
- Rails and pickets can be above-ground rated, or a naturally durable species such as cedar or redwood.
- Fasteners need to be hot-dip galvanised or stainless, for the same corrosion reason that applies to treated deck lumber.
Keep the bottom of the pickets clear of the soil, usually a couple of inches. Pickets in contact with the ground wick moisture continuously and will fail long before the rest of the fence, regardless of treatment.
Frequently Asked Questions
- How many posts do I need for 100 feet of fence?
- At the standard 8-foot spacing, 100 feet needs 14 posts (13 sections plus one extra post to close both ends). At 6-foot spacing, that climbs to about 18 posts.
- Why do taller fences need 3 rails instead of 2?
- Taller pickets have more unsupported length between rails, and without a third rail near the middle, they tend to bow outward over time, especially with wood, which moves more with humidity than vinyl.
- How deep should fence post holes be?
- A common rule of thumb is one-third of the post's above-ground height, with a minimum of 24 inches for most residential fences, though frost line depth in your area may require going deeper. Check local code, since frost heave can push shallow posts out of the ground over time.
- How do I calculate posts for a fence with corners?
- Calculate each straight run separately, add one post per corner, then total them. A corner post cannot be shared between two runs the way an in-line post can, so measuring the whole perimeter and dividing once leaves you a post short at every turn.
- How much concrete does a fence post need?
- About two 50 lb bags for a 4×4 in a 12-inch hole at 2.5 ft deep. Across 14 posts that is roughly 1,400 lb of concrete, which is a real material line rather than an afterthought. Hole diameter should be about three times the post width, which gives the concrete enough surrounding bearing to resist wind loading on a tall fence.
- How do I build a fence on a slope?
- Either rack it or step it. Racking lets the rails follow the slope while pickets stay vertical, which needs longer pickets and only works with board-by-board construction. Stepping keeps each section level and drops at every post, which suits pre-built panels but leaves triangular gaps underneath. Most pre-assembled panels cannot rack at all.
- Do I need a permit to build a fence?
- Often, yes. That is especially true for fences over a certain height (commonly 6 feet) or anything near a property line. Requirements vary significantly by municipality, so check with your local building department before starting.
Estimates on this page are for planning purposes. Post depth and spacing requirements vary by soil type, frost line, and local code. Confirm with your local building department before installation.
Written by: The CubedCalc Team. We research and fact-check every calculator using manufacturer specs, building codes, and industry references. We are not licensed contractors or engineers; always verify structural or code-critical numbers with a qualified professional.