Free Fence Calculator – Posts, Rails & Pickets

Calculate fence posts, rails, and pickets for any fence project. Supports custom post spacing and picket width with waste factor.

Fence Calculator Guide: Posts, Rails & Pickets

The Fence Calculator turns a fence run into a parts list of posts, rails, and pickets. Start with the total fence length in feet, measured along the line the fence will follow; for a multi-sided yard, run the calculation once per straight segment so corners are counted correctly. Set the post spacing, the center-to-center distance between posts, commonly 6 or 8 feet, balancing material cost against rigidity and wind load. For picket fences, enter the picket face width in inches (a nominal 1x4 board is about 3.5 inches wide) and the gap between pickets, where zero gap means a solid privacy fence and a larger gap gives a spaced picket look. Add a waste percentage, with 10% a reasonable default to cover off-cuts, splits, and crowned boards you will reject. The tool reports posts, the number of sections between them, rail count, and total pickets, and draws a spacing diagram so you can sanity-check the layout before buying.

Posts = floor(length / spacing) + 1, because a run needs one more post than the gaps between them; waste is then applied and rounded up. Sections = posts - 1, and rails = sections x 2 for a standard two-rail fence (use three rails for tall privacy panels). Pickets = ceil((length x 12 + gap) / (picket width + gap) x (1 + waste/100)); adding one gap in the numerator removes the phantom trailing gap. Worked example: a 100 ft run at 8 ft spacing. Posts = floor(100/8) + 1 = 12 + 1 = 13 exact; with 10% waste, 13 x 1.10 = 14.3, rounded to 15. Sections = 12, rails = 24. Pickets with 3.5 in width and a 0.5 in gap: (100 x 12 + 0.5) / (3.5 + 0.5) = 1,200.5 / 4 = 300.1, times 1.10 = 330 pickets. In metric, 100 ft is about 30.5 m.

Waste matters most for pickets, where 1x4 boards routinely warp, split, or crown; 10-15% spare keeps the run uniform. Posts need spares too, since concrete can crack a footing or a drill can wander. The most common mistake is forgetting the extra end post, which the +1 in the formula handles, and another is ignoring gate openings, a gate replaces a fence section and needs its own hinge and latch posts set to the gate's hardware spacing. Set line posts to roughly one-third of their length in the ground for stability, deeper in soft soil. The single biggest code item is frost depth: footings must extend below the local frost line, per the IRC, so they are not heaved by freeze-thaw. Many jurisdictions also cap fence height (often 6 ft for rear yards, lower at front setbacks) and require a permit, so confirm setbacks, height limits, and the property line before digging.