Construction

Fence Post Calculator

Estimate posts, rails and pickets for the remaining fence sections. Enter their combined length, excluding gate openings; each gate adds two posts.

Last updated · View algorithm, constants and default inputs (JSON)

Enter your values

Posts 16
Results

About this calculator

Enter the combined length of fence sections, excluding gate openings. Sections are spaced as evenly as possible; each gate adds two posts, but gate widths and positions are not inputs.

Worked example

calculated with the default values below

Fence-section length (exclude gate openings) 100 ft · Post spacing 8 ft · Gates 1 · Rails per section 2 rails · Picket width 5.5 in · Gap between pickets 0.5 in Posts 16 · Sections 13 · Rails 26 · Pickets 200 · Actual length per section 7.69 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.

Maintained by: CalcDelta

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.

View algorithm, constants and default inputs (JSON)

Formula and variables

S = max(1, ceil(L ÷ p)); P = S + 1 + 2g; Q = ceil(12L ÷ (w + d))

L
fence length (ft)
p
post spacing (ft)
g
gates
S
fence sections
P
posts
Q
pickets
w
picket width (in)
d
picket gap (in)

Rails = S × rails per section (2 or 3); enter L without gate openings when estimating rails and pickets. w and d are in inches; the 12 converts feet to inches.

Embed this calculator

Copy the iframe snippet to place this calculator on your site. No account required. The snippet stays in sync with the inputs currently shown.

Frequently asked questions

How are gate posts counted?

The calculator makes one post at each section boundary, so sections + 1 includes both ends of the fence run. It then adds two dedicated posts for every gate. Gate width is not an input: enter the fence length excluding gate openings if you want the rail and picket counts for the remaining fence only. Gate hardware and heavier footings are not estimated.

How do gates affect the estimate?

Gate width and position are not inputs. Enter the fence length excluding gate openings when you want rails and pickets estimated only for the remaining fence. The section count plus one includes both end posts, and each gate adds two posts.

Should fence length include gate openings?

No. Enter the combined fence-section length in feet, excluding gate openings. Sections are rounded up from length ÷ post spacing; the model counts sections + 1 posts, plus 2 per gate. This is a simplified quantity estimate, not a detailed site layout.