Fence Calculator
Calculate the posts, rails and pickets needed for a fence run.
Last updated · View algorithm, constants and default inputs (JSON)
About this calculator
Estimate fence sections, posts, rails and pickets from the run and spacing. Post length uses a rough 1.5× above-ground height allowance; soil, frost depth, wind and local requirements affect the needed embedment. Confirm post and footing specifications for your site.
Worked example
calculated with the default values below
Fence run length 100 ft · Fence height 6 ft · Post spacing 8 ft · Picket width 5.5 in · Gap between pickets 0.25 in · Rails per section 2 Posts needed 14 · Sections 13 · Pickets needed 209 · Rails needed 26 · Approx. post length incl. embedment 9.0 ft
General background references
Disclaimer
These calculators provide planning estimates only. Building codes, wiring regulations and safety requirements differ by country and change over time, and nothing here replaces a licensed professional or a permit. For structural, electrical or gas work, follow local code and have the installation inspected.
Implementation source
This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.
Formula and variables
Post count = ceil(length ÷ spacing) + 1; sections = posts − 1; pickets = ceil(length × 12 ÷ (picket width + gap)); rails = sections × rails per section; post length estimate = fence height × 1.5. The post length is a rough allowance only; footing depth and concrete volume depend on site and hole dimensions.
- L
- fence length (ft)
- p
- post spacing (ft)
- S
- sections
- P
- posts
- Q
- pickets
- w
- picket width (in)
- d
- picket gap (in)
Post count = ceil(length ÷ spacing) + 1; sections = posts − 1; pickets = ceil(length × 12 ÷ (picket width + gap)); rails = sections × rails per section; post length estimate = fence height × 1.5. The post length is a rough allowance only; footing depth and concrete volume depend on site and hole dimensions.
Frequently asked questions
What does the fence estimate include?
Estimate fence sections, posts, rails and pickets from the run and spacing. Post length uses a rough 1.5× above-ground height allowance; soil, frost depth, wind and local requirements affect the needed embedment. Confirm post and footing specifications for your site.