Skip to content
2xKit

Fence Calculator

Calculate how many fence posts and rails you need for a given length.

Formula v1.0.0GlobalMethodologyReport an issuefence-calculator-v1
How this is calculated
Sections = ⌈Fence length ÷ Post spacing⌉; Posts = Sections + 1; Rails = Sections × Rails per section

Assumptions used in this calculation

  • Straight-line fence: Assumes one continuous straight run, corners, gates, and changes in direction need extra posts beyond what this formula accounts for.
  • Even post spacing: Assumes post spacing divides evenly, actual layouts round the last section to fit the site, which can slightly change true spacing.

About this calculator

It's a common mistake to divide fence length by post spacing and stop there, undercounting posts by one, since a fence has a post at both ends of every section and adjacent sections share a post. This calculator divides your total fence length by post spacing and rounds up to find the number of sections, adds one to get the true post count (sections + 1), then multiplies sections by rails-per-section to find total rail count. Enter fence length, post spacing and rails per section, and get a materials-ready post and rail count instead of working through the off-by-one section-versus-post logic yourself. It assumes one continuous straight run, so corners, gates and changes in direction each need an additional post beyond what this formula accounts for, factor those in separately before finalizing your materials order.

Worked example

100ft fence, 8ft spacing, 3 rails/section

Result: 14 posts, 39 rails

Was this helpful?

Frequently asked questions