Fence Calculator
Estimate how many posts, rails, and pickets you need for a fence based on its total length and post spacing.
How this is calculated
The fence run is divided into equal sections based on your post spacing, rounded up to the nearest whole section, which means the built fence may run slightly longer than the exact input length. Posts equal the number of sections plus one (for both end posts). Rails are the number of sections multiplied by rails per section. We add your selected waste percentage to the rail count to cover cutting waste and damaged pieces; pickets are not estimated since spacing and width vary widely by style.
The material weights, waste allowances, and rounding rules behind every calculator are documented on our methodology page.
Example calculation
Post spacing by fence type
Spacing is set by the rail or panel length and the load on each section. Use the typical ranges below as a starting point, then follow the manufacturer's installation guide for any pre-made system, because warranties often depend on it.
| Fence type | Typical post spacing | Notes |
|---|---|---|
| Wood privacy (rails and pickets) | 6–8 ft | 8 ft is common with 2×4 rails; 6 ft resists sagging on taller fences |
| Vinyl privacy or picket | 6–8 ft | Set by panel width, which is usually 6 ft or 8 ft |
| Chain link | Up to 10 ft | Line posts between heavier terminal posts at ends, corners, and gates |
| Ornamental aluminum or steel | 6–8 ft | Pre-assembled panels, commonly 6 ft wide |
| Split rail | 8–10 ft | Rails span the full gap and are often 10 ft long |
These are typical ranges, not code requirements. Wind exposure, fence height, and soil type can all justify closer spacing.
Count each straight run separately
The calculator uses the rule posts = sections + 1, which is right for a single straight run with two ends. A fence with corners, gates, or a closed loop around a yard doesn't follow that rule, and measuring the total perimeter in one go can miscount posts and leave you with a post in the wrong place.
Take a 50 × 100 ft yard fenced on all four sides with posts every 8 ft. Entering the 300 ft perimeter into the calculator gives 38 sections. But each side has to land on a post at its corner, so you round each side up separately: 50 ft needs 7 sections and 100 ft needs 13, for 40 sections in total. On a closed loop the number of posts equals the number of sections, so you need 40 posts, not 39.
For an accurate order, sketch the fence, run the calculator for each straight segment, and add the results. Then adjust the post count for gates, corners, and any section where you can reuse an existing post such as a house wall or a neighbor's shared post.
Gates, corners, and end posts
- Gate posts carry the swinging weight of the gate, so use a heavier post (often 6×6 for wide or heavy gates) and set it deeper than line posts.
- A single gate needs two posts, one for the hinges and one for the latch, with the gate opening between them. Subtract the gate width from the run before counting sections.
- Corner and end posts take the tension and pull of the fence, and are usually braced or set in more concrete than line posts.
- A double gate for vehicle access commonly needs 10 to 12 ft of clear opening, so plan the posts first and fit the fence around them.
Setting posts: depth, hole size, and concrete
A common rule is to bury at least one-third of the above-ground height with a 24 in minimum, and deeper where the soil freezes. A 6 ft privacy fence typically uses 8 ft posts set about 2 ft deep, and in cold climates posts should go below the local frost line so heaving doesn't lift them.
A hole roughly three times the post width keeps enough concrete around it to hold the post straight. For a 10 in wide by 24 in deep hole around a 4×4 post, the concrete volume is about 0.9 ft³. A 60 lb bag yields about 0.45 ft³, so plan on two bags per post and multiply by the post count. For larger jobs the concrete calculator will size the order for you.
Put 4 to 6 in of gravel at the bottom of each hole so water drains away from the end of the post, and slope the top of the concrete away from the wood so it sheds water rather than collecting around it.
Estimating pickets and fasteners
The calculator leaves pickets out because width and spacing vary so much by style. To estimate them yourself, divide the fence length in inches by the picket width plus the gap, and round up. The table shows picket counts for 100 ft of fence at several common widths.
| Picket width | Gap | Pickets per 100 ft |
|---|---|---|
| 3.5 in (1×4) | 0 in | 343 |
| 5.5 in (1×6) | 0 in | 219 |
| 5.5 in (1×6) with 1/2 in gaps | 0.5 in | 200 |
| 3.5 in (1×4) with 2 in gaps (picket style) | 2 in | 219 |
Add 5–10% for cuts, defects, and the last picket on each section.
For fasteners, count two nails or screws per rail on every picket. With three rails, that is six fasteners per picket. Galvanized or stainless fasteners last far longer than bare steel, particularly with cedar or treated lumber that can corrode plain nails.
Slopes, property lines, and permits
On sloping ground you can step each section down in level increments or rack the pickets to follow the grade. Stepped fences leave gaps under the pickets that you may need to close, and racked fences usually require flexible rails. Measure the length along the ground when you count rails, and expect more waste on steep runs.
Before you dig, confirm where your property line is. A recent survey or the plat from your closing documents is more reliable than a neighbor's existing fence. Many towns limit fence height, often to about 6 ft in rear yards and lower in front yards, and homeowner associations may add style and color rules. In the United States, call 811 a few days before digging so utilities can mark buried lines.
Related calculators
Frequently asked questions
Wood fence posts are typically spaced 6–8 ft apart. Vinyl and chain-link fences often use manufacturer-specified spacing, commonly 8 ft, based on panel or rail length.
