Quick answer: Posts = fence length ÷ post spacing, rounded up, plus one. A 100 ft fence with posts 8 ft apart has 13 sections and needs 14 posts, plus extra posts for corners and gates.
How to use the fence calculator
- Enter the length of one straight run of fence, and its height above ground.
- Enter the post spacing and the number of rails per section.
- Enter the picket width and the gap between pickets (0 for a privacy fence).
- Read the posts, pickets and rails. Repeat for each straight run, and add gate posts.
Post spacing and depth
| Fence height | Rails (one per 2 ft) | Post length if 1/3 is buried |
|---|---|---|
| 4 ft (1.2 m) | 2 | 6 ft (1.8 m) |
| 5 ft (1.5 m) | 2 to 3 | 7.5 ft (2.3 m) |
| 6 ft (1.8 m) | 3 | 9 ft (2.7 m) |
These are common guide figures, not rules. Frost depth, soil, wind and local codes can require deeper posts.
Before you build
- Check your property line, local height limits and whether a permit is needed.
- Call your local utility-locating service before digging post holes.
- Use the Concrete Calculator (round column or post hole) to estimate concrete for each post.
How do you calculate fence posts, rails and pickets?
Sections and posts
Sections = fence length ÷ post spacing, rounded up; posts = sections + 1
A straight run needs one more post than sections. Fence guides suggest posts about 6 to 8 ft apart.
Rails and pickets
Rails = sections × rails per section; pickets = fence length ÷ (picket width + gap), rounded up
A Lowe’s guide suggests one rail for each 2 ft of post height.
Post length
Post length ≈ fence height × 3 ÷ 2 (about 1/3 of the post buried)
If one third of the post is in the ground, the part above ground is two thirds of its length.
Worked examples
A 100 ft privacy fence, 6 ft high, posts 8 ft apart, 5½ in pickets
- Sections: 100 ÷ 8 = 12.5, rounded up to 13. Posts: 13 + 1 = 14.
- Rails: 13 × 3 = 39.
- Pickets: 1,200 in ÷ 5.5 in = 218.2, rounded up to 219.
- Post length: 6 × 3 ÷ 2 = 9 ft, with 3 ft in the ground.
A 30 m fence, 1.8 m high, posts 2.4 m apart, 140 mm boards (metric)
- Sections: 30 ÷ 2.4 = 12.5, rounded up to 13. Posts: 14.
- Rails: 13 × 3 = 39.
- Pickets: 30,000 mm ÷ 140 mm = 214.3, rounded up to 215.
- Post length: 1.8 × 3 ÷ 2 = 2.7 m, with 0.9 m in the ground.
Assumptions and limitations
This calculator assumes
- One straight run with posts at equal spacing; pickets run the full length.
What it does not cover
- Corners, gates and changes of direction need extra posts and hardware.
- Post depth also depends on frost depth, soil and wind; local rules may require deeper posts or permits.
- Concrete for posts is not included; use the Concrete Calculator (column) for each post hole.
Not professional advice
Questions and answers
How many fence posts do I need?
Divide the fence length by the post spacing, round up to get the number of sections, and add one post. A 100 ft fence with posts 8 ft apart has 100 ÷ 8 = 12.5, so 13 sections and 14 posts. Add posts for corners and gates.
How far apart should fence posts be?
Wood fence guides commonly suggest about 6 to 8 ft (1.8 to 2.4 m). Closer spacing makes a stronger fence, especially in windy places. Match the spacing to the length of your rails or panels.
How many pickets do I need?
Divide the fence length by the picket width plus any gap. For a 100 ft privacy fence with 5½ in pickets and no gap: 1,200 in ÷ 5.5 in = 218.2, so 219 pickets.
How deep should fence posts be?
A common rule in fence guides is to bury about one third of the post. For a 6 ft fence that means a 9 ft post with 3 ft in the ground. In cold climates posts often need to go below the frost line, so check local practice.
How many rails does a fence need?
A Lowe’s fence guide suggests one rail for each 2 ft of post height. Many 4 ft fences use 2 rails and many 6 ft fences use 3.
Guides that explain this
Concrete & Masonry
How Much Concrete for Fence Posts and Sonotubes
Concrete per post hole and per foot of tube form, with size charts and bag counts.
7 min read
Sources and review
Review status: Checked against the sources below, with a hand-calculated example. Last reviewed .
- Standard geometry (area and volume formulas). Rectangle area = length × width; circle area = π × (diameter ÷ 2)²; triangle area = base × height ÷ 2; rectangular prism volume = length × width × depth; cylinder volume = π × r² × height; right-angle trigonometry: angle = arctan(rise ÷ run), sloped length = √(rise² + run²). Accessed 2026-12-02.
- Millard Lumber: Building Wood Fences (PDF guide). Set fence posts about 6 to 8 ft apart; bury about 1/3 of the post’s total length; keep the bottom rail at least 2 in above the ground. Accessed 2026-12-02.
- Lowe’s: Wood Fence Installation Tips, Installing Posts and Pickets (PDF). Use one rail (stringer) for each 2 ft of post height, with the bottom stringer at least 6 in above the ground. Accessed 2026-12-02.