Skip to content
Calcora

Fence Calculator

Posts, rails, and pickets for a fence run of any length.

Input sheet

Example
Read the DIY guideStep-by-step: How to Build a Wood Fence

DIY at your own risk. Calcora's calculators and guides are general estimates and information only — not professional, engineering, legal, or safety advice. Always verify local building codes and permit requirements, and hire a licensed pro for electrical, gas, plumbing, structural, or any work you're not fully comfortable doing yourself.

A fence is posts, rails, and pickets — three different counts that all flow from one number, the post spacing. This calculator turns a run length into a full materials list so nothing gets forgotten at the lumber yard.

How it works

Length divided by post spacing gives sections; posts are sections plus one. Rails are sections times rails per section; 6 in pickets cover the run.

Length divided by post spacing gives the number of sections; posts are always sections plus one because a run needs a post on both ends. Rails are sections times the rails per section, and pickets are figured at 6-inch widths across the whole run.

Eight-foot spacing is the common default for wood fences — wider sags, tighter costs more. Choose two rails for a short fence and three for taller privacy fences that need the extra rigidity.

Sections = length ÷ spacing, rounded up; posts = sections + 1; rails = sections × rails per section; pickets = (length × 12) ÷ 6.

Worked examples

Tips & gotchas

FAQ

How far apart should fence posts be?

Eight feet is standard for wood fences and balances cost against sag. Go to 6 feet for tall privacy fences or windy sites where you want extra rigidity.

How deep should I set the posts?

About one-third of the post's above-ground height, or below your local frost line — whichever is deeper. For a 6-foot fence that usually means a 2-foot-plus hole.

How many rails do I need?

Two rails suit fences up to about 4 feet; three rails are standard for 6-foot privacy fences to keep the pickets from warping and the panel from racking.

Related calculators

Concrete Calculator · Paint Calculator · Flooring Calculator · Mulch Calculator · Gravel & Driveway Calculator