CCalcBarn

Fencing Calculator

Find out how many posts, rails and pickets you need to build your fence.

Result
  • Fence posts
    15 posts
  • Rails24 rails
  • Pickets330 pickets
  • Sections12 sections

How to use

  1. Enter the total fence length in feet.
  2. Enter the post spacing in feet (6–8 ft is standard).
  3. Enter the number of gate openings, rails per section, and picket width.

About this calculator

This fencing calculator works out the posts, rails and pickets for a standard wooden privacy or picket fence. Posts are spaced at equal intervals along the fence run; sections = posts − 1. Each section gets the specified number of rails. Pickets are spaced at the given width with a small gap (about 0.25 in). For gates, each opening needs two gate posts. Always add 10% extra pickets for cuts and waste.

🧮 How it's calculated

  1. 1Step 1 — Number of sections: Sections = ⌊Total length ÷ Post spacing⌋
  2. 2Step 2 — Number of posts: Posts = Sections + 1 + (Gates × 2) extra gate posts
  3. 3Step 3 — Rails: Total rails = Sections × Rails per section
  4. 4Step 4 — Pickets per section: Pickets = ⌈Post spacing ÷ Picket width⌉
  5. 5Step 5 — Total pickets: Total = Pickets per section × Sections

Posts = floor(Length / Spacing) + 1; Pickets per section = ceil(Spacing / Picket width); Total pickets = Pickets per section × Sections.

Frequently asked questions

How far apart should fence posts be?+

6 to 8 feet is the standard spacing. Closer spacing (6 ft) is stronger; 8 ft spacing works with heavier lumber.

How deep should fence posts be set?+

One-third of the post's total length should be in the ground. For a 6 ft fence use 9 ft posts set 3 ft deep.

How many rails does a fence need?+

Two rails (top and bottom) is standard for fences up to 4 ft. Use three rails for 6 ft privacy fences.

Related calculators