Fencing guide

How to Calculate Fence Materials: Posts, Rails, and Pickets

Turn a measured fence line into estimated sections, posts, rails, pickets, and initial concrete planning quantities.

Updated May 24, 2026 6 min read

Cedar privacy fence installation showing finished boards, rails, and posts.

Short answer

Measure the fence line and gate openings, divide the run by intended post spacing to estimate sections, add end and gate posts, then calculate rails and pickets for the boarded length. Confirm property, utility, footing, and local-rule requirements before digging.

Use the Fence Calculator

The formula

  1. Fence sections = total fence length / intended post spacing, rounded up
  2. Posts = sections + 1 + additional gate support posts
  3. Boarded length = total fence length - gate openings
  4. Pickets = boarded length / ((picket width + gap) / 12), rounded up

Worked example

A 160 ft fence line with one 4 ft gate

  1. At 8 ft post spacing: 160 / 8 = 20 sections.
  2. Posts with one gate support position: 20 + 1 + 1 = 22 posts.
  3. At two rails per section: 20 x 2 = 40 rails.
  4. Boarded length: 160 - 4 = 156 linear ft.
  5. With 5.5 in pickets and 0.5 in gaps: 156 / 0.5 = 312 pickets.

Start planning around 22 posts, 40 rails, 312 pickets, and the calculator's preliminary concrete allowance.

Lay out the line and gates first

Measure each straight run separately and identify ends, corners, and gate openings. Gate dimensions and hardware can change the post layout, and corners may require a different count than one straight run.

Before planning a hole location, confirm boundaries, easements, setback or height requirements, and any homeowner or municipal requirements that apply to the property.

Spacing drives the material list

This calculator divides total length by intended spacing and rounds up to avoid an overlong final section. Rails are tied to sections; pickets use only the boarded length after gate openings are removed.

Wind exposure, fence height, material, soil, slope, and gate weight affect appropriate post spacing and construction. The estimate is a shopping starting point, not a fence design approval.

  • Measure gate openings instead of assuming they match a fence section.
  • Check picket width and intentional gap before calculating board count.
  • Determine post size, depth, footing quantity, bracing, and fasteners for the actual fence system.

Contact 811 before any post holes

811 states that installing a fence is a digging project that requires contacting the state 811 center before digging, waiting the required time, and confirming all utility responses. Marked lines and local instructions must be respected before work begins.

The calculator starts concrete at two bags per post only as a planning assumption. Hole diameter, hole depth, bag yield, soil, frost, gate loads, and local rules determine the real footing requirement.

References and verification

Use these references together with the instructions and coverage or yield information on the product you select.