Fence Calculator
Estimate posts, equal intervals, and horizontal rail length for one or more independent straight fence runs.
Content updated August 6, 2026
Quantity geometry only. Corner, brace, terminal, gate, shared, intermediate, and line posts can require different specifications; wire, panels, pickets, concrete, hardware, terrain, utilities, loads, permits, boundaries, safety, and local rules are not modeled.
Estimate line posts and horizontal rail length for one or more equal independent straight fence runs. Enter the fenced length between endpoints, excluding gate openings, and the maximum spacing permitted by the selected design.
The calculator rounds the number of intervals upward so the equalized interval never exceeds the entered maximum. Each independent run owns both endpoint posts, making the counting convention visible instead of silently merging corners or gate posts.
The Fence formula
Intervals per run = ceiling(run length ÷ maximum spacing) · posts per run = intervals + 1 · actual interval = run length ÷ intervalsOrder rail length = run length × run count × rail rows × (1 + waste% ÷ 100).
Worked example
A 100 ft independent run with an 8 ft maximum spacing needs ceiling(12.5) = 13 intervals and 14 posts. Equalized spacing is about 7.692 ft. Three rail rows plus 10% waste require 330 ft of rail.
Assumptions, rounding, and limitations
Assumptions
- Every entered run is straight, equal in length, and independent.
- Both endpoint posts are counted for each run.
- Post intervals are equalized and may be shorter than the entered maximum.
- Rail rows span the full entered fenced length and share one waste percentage.
Rounding: Intervals round upward to keep spacing at or below the maximum; posts and intervals are whole counts. Length calculations retain full precision and displays use up to three decimals.
Limitations
- Does not distinguish line, corner, brace, terminal, gate, or shared posts; model gate-separated or unequal runs individually and reconcile physical overlaps.
- Does not calculate panels, pickets, wire, concrete, hardware, loads, footing depth, slopes, setbacks, surveyed boundaries, utilities, permits, livestock or wildlife needs, or local compliance.
Sources
- Fence (Ft.) (382) Conservation Practice Standard — USDA Natural Resources Conservation Service
- NIST Guide to the SI, Appendix B.9: Conversion Factors — National Institute of Standards and Technology
Post count depends on endpoints and interval convention
A straight run is divided into the smallest whole number of equal intervals that keeps spacing at or below the entered maximum. One more post than intervals is needed because posts sit at both endpoints.
Independent runs are counted separately. If two modeled runs physically share a corner, terminal, brace, or gate post, reconcile that overlap in the field plan rather than assuming the two posts are interchangeable.
Spacing is a design input, not a universal recommendation
USDA NRCS fence guidance requires plans to state layout, gates, post spacing, bracing, material quantities, and maintenance. It also directs users to localized standards because soils, loads, animals, wildlife, terrain, and regulations vary.
The tool therefore does not recommend 8 feet or any other spacing. Use the value supported by the fence system, manufacturer, structural design, site, utility checks, boundaries, permits, and current local requirements.
Frequently asked questions
▶How is the number of fence posts calculated?
Each run uses ceiling(run length ÷ maximum spacing) equal intervals, then adds one endpoint post. The result is multiplied by the number of independent runs.
▶Why is actual spacing sometimes smaller than my input?
The input is treated as a maximum. Intervals are rounded upward, then the run is divided evenly so no interval exceeds that value.
▶How should I handle gates?
Exclude gate openings from the entered fenced runs and model the straight runs on either side separately. Gate and brace posts require the field design.
▶Are corner posts shared automatically?
No. Every independent run includes both endpoints. Deduplicate or specify shared posts only when the actual layout and post design support it.
▶What does horizontal rail length include?
It multiplies total fence length by the entered number of rail rows, then applies the explicit rail waste percentage.
Related calculators
Calculate board-foot lumber volume from thickness, width, length, equal-piece count, units, and explicit waste.
Open calculator →Estimate rectangular slab volume, ready-mix allowance, and whole bags from package-specific yield.
Open calculator →Calculate the total square footage of one or more equal rectangles with exact metric conversions.
Open calculator →Disclaimer: Fence Calculator results are estimates for general information and education only, and are not financial, tax, legal or medical advice. Verify important decisions with a qualified professional.