CalcArcade.

Fence Calculator

Enter the length of the fence and how far apart the posts go. Add the picket width and gap, the rails per section, and any gates. You get the number of posts, pickets and rails.

Your numbers

Result

How we calculate it

The gates are taken out of the length, so the fenced length is the total length minus the gate openings. The number of fence sections is the fenced length divided by the post spacing, rounded up, plus one section for each gate. An open run needs one more post than sections, and a closed loop needs as many posts as sections.

With n pickets and n − 1 gaps, the pickets cover n × width + (n − 1) × gap, so n = (length + gap) ÷ (picket width + gap), rounded up. Rails are the rails per section times the fence sections. For 100 feet with 8 foot spacing, 5.5 inch pickets, 1/2 inch gaps and one 4 foot gate, the result is 13 sections, 14 posts, 193 pickets and 24 rails.

Assumptions and limits

  • This is an estimate of the main parts. Add some extra pickets and rails for cuts and mistakes. Gates also need their own hinges, latch and framing, and some designs need gate posts that are bigger than the line posts.
  • Corners and changes of height may need extra posts. Count them from your plan.
  • Local rules often limit the height of a fence and how close it can be to a boundary. Check them before you build.

Frequently asked questions

How many fence posts do I need?

Divide the fence length by the post spacing and round up to get the sections, then add one post for an open run of fence. A closed loop needs as many posts as sections.

How many pickets do I need for a fence?

Divide the fence length plus one gap by the picket width plus one gap. For 96 feet with 5.5 inch pickets and half inch gaps that is 193 pickets.

How far apart should fence posts be?

Often 6 to 8 feet, depending on the fence type and the local conditions. Follow the maker’s instructions and your local rules.

Related calculators

Worked example (a fixed example using the starting numbers, it does not change as you type)

Inputs: Layout = A straight or open run of fence; Total fence length (feet) = 100; Post spacing (feet) = 8; Picket width (inches) = 5.5; Gap between pickets (inches) = 0.5; Rails per section (1 to 5) = 2; Number of gates = 1; Width of each gate (feet) = 4.

  • Fence sections 13
  • Posts 14
  • Pickets 193
  • Rails 24
  • Fenced length 96.0 ft

Embed this calculator

Add this calculator to your own page. Paste the code where you want it. The small link keeps credit to the source.

More construction & home calculators

Last reviewed: . Formulas and assumptions are described on our methodology page. For information only; not professional advice.