Fence Calculator
Using length and post spacing, this fence calculator returns posts, rails, and pickets for a wood fence, plus the actual post spacing. Posts are the length divided by spacing, rounded up to whole sections, plus one to close the ends. Rails equal sections times rails per section. Pickets come from run length divided by picket pitch, with waste added.
Last reviewed September 2026Method & sourcesReport an error
Fence Calculator
Showing numbers from a shared link.
Posts Needed
14
Shopping list
-
Posts14 posts
-
Rails26 rails
-
Pickets230 pickets
| Posts Needed | 14 |
|---|---|
| Rails Needed | 26 |
| Pickets Needed | 230 |
| Actual Post Spacing | 7.69 ft |
How to Calculate Fence
Fence length divided by post spacing, rounded up, gives the number of sections. Add one more post than sections to close both ends (`posts = sections + 1`). Dividing the fence length evenly across that many sections gives the actual on-center spacing, which comes out at or tighter than your target spacing since the section count was rounded up. Each section needs one rail per rail row, so total rails is `sections × rails per section`. Pickets are spaced by pitch (picket width plus gap) across the fence's total length in inches, with a waste allowance added for cuts, then rounded up to a whole picket.
Example: 100 ft of fence, 8 ft post spacing, 5.5 in. pickets (1x6) with no gap
100 ft of fence, 8 ft post spacing, 5.5 in. pickets (1x6) with no gap, 2 rails per section, 5% picket waste: 1. Sections: 100 ÷ 8 = 12.5, rounded up to 13 2. Posts: 13 + 1 = 14 3. Actual post spacing: 100 ÷ 13 = 7.69 ft 4. Rails: 13 × 2 = 26 5. Raw pickets: (100 × 12) ÷ 5.5 = 218.18 6. With 5% waste: 218.18 × 1.05 = 229.09, rounded up to 230 pickets 14 posts, 26 rails, and 230 pickets for this run.
Fence: Compare Scenarios
| Scenario | Posts Needed | Rails Needed | Pickets Needed | Actual Post Spacing |
|---|---|---|---|---|
| Small (50 ft run) | 8 | 14 | 115 | 7.14 ft |
| Medium (100 ft run) | 14 | 26 | 230 | 7.69 ft |
| Large (300 ft run) | 39 | 76 | 688 | 7.89 ft |
What Is Fence?
A fence calculator converts a fence run's total length into posts, rails, and pickets together, as one connected estimate. The actual post spacing depends on rounding the section count up. That spacing affects how many pickets fit between posts and how many rails each section needs. It's built around a standard wood picket fence with evenly spaced posts and horizontal rails.
Fence: Pros and Cons
Pros
- Computes posts, rails, and pickets together from one set of measurements, rather than requiring three separate calculations that could disagree on actual post spacing
- Shows the actual achieved post spacing (always at or tighter than your target), so you know exactly how the section count was rounded before ordering rail stock
- Works for both a tight-gap privacy fence and a spaced picket fence, since picket gap is a direct adjustable input
Cons
- Doesn't include post-hole concrete. Use the Post Hole Concrete Calculator alongside this one for that part of the material list
- Assumes a straight fence run. A fence with corners or gates needs each straight run calculated separately and the results added together, since a corner post is shared between two runs
- Doesn't account for a gate opening. Subtract the gate's width from the total fence length before entering it, and add the gate itself separately
Fence: What a Pro Checks
- Calculate each straight run separately if the fence has corners or gates. A corner post is shared between two runs, and this calculator assumes a single straight run.
- Subtract the gate opening's width from the total fence length before running the estimate, then plan the gate hardware and posts separately.
- Taller fences (5-6 ft) commonly use 3 rails per section instead of 2, for added rigidity.
- This calculator doesn't include post-hole concrete. Pair it with the Post Hole Concrete calculator to complete the material list.
Frequently Asked Questions
How far apart should fence posts be?
8 ft on-center is the most common spacing for a wood fence, largely because standard rail stock is sold in 8 ft lengths. Spacing can range from about 6 to 10 ft depending on fence height, wind exposure, and local practice. Taller or more wind-exposed fences often use tighter spacing for stability.
How many fence posts do I need for 100 feet?
At the standard 8 ft spacing, 100 ft of fence needs 14 posts. That is 13 sections (100 ÷ 8 rounded up) plus one extra post to close both ends. The actual spacing comes out to about 7.69 ft on-center instead of exactly 8.
How many rails does a fence need?
Most residential wood fences up to about 4 ft use 2 rails per section (top and bottom), while taller fences (5-6 ft) commonly use 3 rails for added rigidity. Multiply your section count by the rails-per-section to get the total.
How much picket waste should I plan for?
5% is a reasonable default for straight cuts and the occasional split or defective picket. A fence with a lot of height variation (following sloped ground) or a decorative top cut needs more allowance, since each picket may need trimming.
Does this calculator include the gate?
No. Subtract the gate opening's width from your total fence length before running this calculator. That section doesn't need posts, rails, or pickets at the same spacing as the rest of the fence. Gate hardware and the gate frame itself should be planned separately.
Related Calculators
Post Hole Concrete Calculator
Use this post hole concrete calculator to count bags for fence or deck posts. Set hole diameter, depth, post size and bag size to subtract the post's volume.
FenceVinyl Fence Calculator
Use this vinyl fence calculator to count 6 ft or 8 ft panels and posts for a run, plus the length the fence will actually cover once panels are whole.
FenceFence Stain Calculator
Use this fence stain calculator for gallons of stain or sealer, based on sides stained and number of coats. Add a price per gallon to see the estimated cost.
Deck & PatioBaluster Calculator
Use this baluster calculator to count balusters for a railing section and see the even spacing and actual gap that keep every opening under your maximum.
FenceChain Link Fence Calculator
Use this chain link fence calculator for fabric rolls, top rail, line and terminal posts, and tension wire. Enter length, post spacing, and gate count.
FenceFence Post Depth Calculator
Use this fence post depth calculator to find hole depth from post height, a 24 in. minimum and frost depth. Total post length to buy is included.