Fence Post Spacing Calculator

Accurate fence post spacing is the foundation of a straight, durable fence. Space posts too far apart and the fence will sag and flex; space them too close and you waste material and money. The most common post spacing for residential wood privacy fences in the United States is 8 feet on center, matching the standard length of pre-made fence panels and rails. Chain-link fences typically run 10 feet between posts, while decorative picket fences often use 6-foot spacing for a more refined appearance. To calculate how many posts you need, divide your total fence length by your desired spacing and round up to the nearest whole section, then add one post for the final end post. The actual spacing is then your total length divided by the number of sections, which will be equal to or slightly less than your target spacing. This calculator handles that arithmetic automatically and also tells you how many fence rails you need based on your preferred number of rails per section (2, 3, or 4). Enter your fence length, desired post spacing, whether end posts are already in place (for example, corner posts in an existing structure), and how many rails per section you want.

Posts needed: -- | Sections: -- | Actual spacing: -- ft

Total rail length needed: -- ft

Total run of fence in feet
Distance between post centers
Choose No if terminal posts are already installed
Horizontal rails per fence section
Number of sections--
Number of posts--
Actual post spacing-- ft
Total fence section length-- ft
Total rail length needed--

How fence post spacing is calculated

Dividing your total fence length by your desired spacing gives you the number of sections. Because you cannot have a fraction of a section, you round up to the nearest whole number. The actual spacing is then the total length divided by the rounded-up number of sections, which will be equal to or slightly less than your target.

If you include end posts (the standard case for a new fence), the number of posts equals the number of sections plus one. For a fence with 12 sections, you need 13 posts: one at the very start, one between each pair of sections (11 intermediate), and one at the very end. If corner posts are already in place and you only need the intermediate line posts, subtract two from that total.

Rail material calculation

Each fence section requires a set number of horizontal rails running between posts. A standard 6-foot privacy fence uses 3 rails: one near the top, one in the middle, and one near the bottom. A shorter 4-foot fence can often get by with 2 rails. For fences taller than 7 feet, or in high-wind areas, 4 rails provide extra rigidity. Multiply the number of sections by your actual spacing by the number of rails to get the total linear feet of rail needed. Add 10% for waste and cutting.

Fence post spacing: frequently asked questions

What is the standard fence post spacing?

Most residential fences use post spacing of 6 to 8 feet on center. Eight feet is the most common spacing for wood privacy fences because standard fence panels and rails come in 8-foot lengths, minimising waste. For chain-link fences, 10-foot spacing is typical. Picket fences often use 6-foot spacing for a more finished look. Always check local building codes, which may specify maximum post spacing for certain fence types.

How deep should fence posts be set?

A common rule of thumb is to bury one-third of the total post length underground. For a 6-foot-tall fence, use 9-foot posts and bury 3 feet. In areas with frost, the bottom of the post should extend below the local frost line to prevent heaving. Most US regions require posts to be set 3 to 4 feet deep. Check your local frost depth data from the National Oceanic and Atmospheric Administration (NOAA) for your area.

What is the difference between line posts and end posts?

End posts (also called terminal posts) are placed at the start, end, and corners of a fence run. They must support the lateral tension of the fence and are typically set deeper and may be larger in diameter. Line posts are the intermediate posts that run between terminal posts. They carry less load and are usually smaller. Gate posts are a special category: they must be extra-sturdy to support the weight of the gate.

How many rails does a fence need?

Most wood fences use 2 or 3 horizontal rails between posts. A 4-foot fence typically uses 2 rails; a 6-foot privacy fence uses 3 rails. Taller fences (8 feet or more) often need 4 rails for adequate support. Rails keep the fence boards aligned and carry the lateral load. This calculator defaults to 3 rails but lets you select 2 or 4 instead.

What type of wood is best for fence posts?

Pressure-treated pine (rated for ground contact, marked UC4B or UC4C) is the most widely used material in the United States because it resists rot and insects. Cedar and redwood are naturally rot-resistant and popular for their appearance. Black locust is exceptionally durable but less widely available. Untreated pine or fir posts will rot quickly in ground contact and are not recommended for fence posts.

References

  • US Department of Agriculture Forest Products Laboratory: Wood Handbook (post durability guidance)
  • International Residential Code (IRC) Section R407: fence and post requirements
  • NOAA National Centers for Environmental Information: frost depth maps (post depth guidance)

Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. Always check local building codes and HOA requirements before installing a fence. See our methodology.