All calculators

Fence Calculator

Fence material is mostly posts, and the post count depends on something the tape measure does not tell you: whether the ends of the fence meet. Enter the run to see posts, rails, pickets, and what the gates take out.

How this calculator works

Take the gate openings out of the total length first. A gate is a gap in the fence, not a section of it, so a 200 foot run with one 4 foot gate is 196 feet of actual fence.

Divide the fenced length by the post spacing and round up. A part bay is still a bay: 196 feet at 8 foot spacing is 24.5, which means 25 sections, the last one short.

Then count posts, which is where fences are most often ordered wrong. A straight run needs one more post than it has sections, because both ends need one. A fence that closes a loop does not, because the last post is the one it started from. Same length, same spacing, one post different, decided only by whether the ends meet.

Gates add posts beyond the line. Each gate hangs on a hinge post and latches to another, and gate posts are usually heavier and set deeper than line posts because a gate is a lever that works on them every time it swings.

Worked example: 200 feet with one gate

A 200 foot straight run, posts every 8 feet, one 4 foot gate, three rails a section, and nominal 1x6 pickets at 5.5 inches.

Fenced length196 ft, after the gate
Sections25
Line and end posts26
Gate posts2
Posts, total28
Rails75
Pickets428

Run the same 200 feet as a closed perimeter instead and the line posts drop from 26 to 25. One post, decided by nothing except whether the fence returns to where it started.

Where the numbers come from

Post spacing, fence height limits, permit thresholds, and what may be built on or near a property line come from the local zoning ordinance and building code, and vary by district. Material dimensions here are nominal US lumber sizes. Confirm the line with a survey rather than a fence that is already there, because an existing fence is not evidence of a boundary.

Questions investors ask

How many posts do I need for a fence?

Divide the fenced length by the post spacing and round up to get the number of sections, then add one if the fence is a straight run. A run needs a post at both ends; a fence that closes a loop does not, because its last post is its first. Each gate adds two more.

How far apart should fence posts be?

Six to eight feet is usual, and the material usually decides it: preassembled panels and rail stock come in fixed lengths, so the spacing follows the panel rather than the other way round. Wind load, fence height, and soil all argue for the shorter end of that range.

Do I count the gate as part of the fence?

No. A gate is an opening, so take its width out of the length before you work out sections, or you will buy pickets and rails for a span that is a gate. The gate does add posts: one to hang on and one to latch to, and both are normally set deeper than a line post.

How many pickets do I need?

Multiply the fenced length by twelve and divide by the picket width in inches, for pickets set tight against each other. A nominal 1x6 is 5.5 inches wide, not 6. If the pickets are spaced apart, the count falls in proportion to the gap you leave.

Does a fence need a permit?

Often, and height is the usual trigger. Ordinances commonly hold a front yard fence to a lower height than one behind the house, treat corner lots separately for sight lines, and regulate materials in some districts. Check the ordinance and locate the property line before setting a post on it.

Related calculators

Screening a real property? Pull its appraised value, assessed value, acreage, land use, and last recorded sale off the JB PARCEL parcel map and drop the real numbers into this calculator instead of guessing. Coverage runs across every county we carry.