Fence Calculator

Tip: Posts should be spaced 6-8 feet apart. For a 6' privacy fence, use 8' posts (set 2' in ground). Check local codes for height and setback requirements!

Fence Settings

Total Materials Needed
0
Linear Feet
0
Posts
0
Rails (8')
0
Pickets
0
Concrete Bags

Recommended Lumber Sizes

Posts 4x4x8'
Rails 2x4x8'
Pickets 1x6x6'
Concrete 50 lb bags

Installation Tips

  • Call 811 before digging to locate underground utilities
  • Set posts in concrete - 2 bags per post for standard soil
  • Bury about 1/3 of the fence's above-ground height, and always below the frost line โ€” a 6' fence uses an 8' post set 2' deep
  • Use pressure-treated lumber rated for ground contact (AWPA UC4A or better)
  • Leave 2-4" gap at bottom to prevent rot

Ready to buy? Search for fence materials:

๐Ÿ—๏ธ How This Fence Calculator Works

A wood fence is four counts โ€” posts, rails, pickets and the concrete that holds the posts โ€” and each comes off the run length in feet and a few choices about height and style. This calculator works out all four for every section you add and totals them.

Posts divide the run into sections at your chosen spacing; rails span each section; pickets fill the face; and concrete sets the posts. Because a fence is a line rather than an area, the arithmetic is mostly division and rounding up โ€” you cannot buy most of a post.

Formula Reference

Sections = โŒˆ run รท post spacing โŒ‰ Posts = sections + 1 + (gates ร— 2) Rails = โŒˆ run รท 8 โŒ‰ ร— rails-per-section Pickets = โŒˆ (run ร— 12) รท (picket width + gap) โŒ‰ Concrete = posts ร— 2 (50 lb bags) Post len = โŒˆ fence height ร— 1.33 โŒ‰
Rails per section follow the height: two for a 4 ft fence, three from 5 to 7 ft, four at 8 ft. Gap is 0 for a privacy fence, 1 in for semi-privacy, 2 in for a spaced picket. Each gate adds two posts to hang and latch it. Rails are counted in 8 ft lengths.

๐Ÿงฎ A Worked Example

A single 50 ft run of 6 ft privacy fence, posts at 8 ft, 5.5 in pickets, no gates:

Switch the style to a 2-inch spaced picket and each picket now occupies 7.5 in instead of 5.5, dropping the picket count from 110 to about 80 โ€” the same run, fewer boards, more gap.

๐Ÿ“ Where the Numbers Come From

Post length and depth. The tool sizes each post at about 1.33 times the fence height, so a 6 ft fence gets an 8 ft post with about 2 ft below grade. That follows the common fence-building rule of burying roughly one-third of the fence's above-ground height. The binding requirement, though, is depth: a post footing must reach below your local frost line, or freeze-thaw will heave it. In cold regions that frost depth โ€” often 24 to 42 inches โ€” governs, and you set the post to it regardless of the rule of thumb. Check your local frost depth with the building department.

Ground-contact treatment. A post sitting in soil and concrete stays damp, so it must be pressure-treated lumber rated for ground contact โ€” Use Category UC4A ("ground contact, general use") or higher under the AWPA U1 Use Category System, the standard treated wood is labeled against. Above-grade rails and pickets can be a lighter UC3 treatment, but the posts should never be less than UC4A, and cut ends buried in the ground should be field-treated.

Picket spacing. The picket count is the run in inches divided by the space each picket takes up โ€” its own width plus the gap you leave beside it. A privacy fence uses no gap, so 5.5 in pickets sit every 5.5 in; a spaced-picket fence adds the gap to the pitch and uses fewer boards. Widen the picket or the gap and the count falls in direct proportion.

โ“ Common Questions

How deep should fence posts be set?

Deep enough to resist wind and to sit below your local frost line so the ground cannot heave them. A common rule is to bury about one-third of the fence's above-ground height, so a 6-foot fence uses an 8-foot post set about 2 feet deep. In cold climates the frost line, often 24 to 42 inches, can require going deeper than the rule of thumb.

How many fence posts do I need?

One post per section at your chosen spacing, plus one to finish the last run, so a 50-foot line at 8-foot spacing takes about 8 posts, and each gate adds two. Closer spacing makes a stiffer fence but uses more posts and concrete.

What kind of lumber should fence posts be?

Pressure-treated wood rated for ground contact, Use Category UC4A or higher under the AWPA U1 system. Posts stay damp in soil and concrete, so a lighter above-ground treatment will rot early. Use galvanized or stainless fasteners with treated lumber, since the preservative corrodes plain steel.

โš ๏ธ What this estimate is not

This is a materials estimate for a straight, level run of wood fence. It does not design for wind load or soft soil, size gate hardware, follow a slope, or check your property line. Fence height, setback and even style are often restricted by local code or an HOA, and the posts must sit below the frost line โ€” confirm all of that, and call 811 to locate utilities, before you dig.

Ground-contact lumber should be rated to Use Category UC4A ("ground contact, general use") or higher under the American Wood Protection Association's U1 Use Category System, the standard pressure-treated wood is graded and labeled against. Post depth is governed by your local frost line, which the building code requires footings to reach below; the "bury one-third of the height" figure is conventional fence-building practice, not a fixed code number, and the frost-depth requirement overrides it. Post, rail and picket counts are geometry from the run length and your spacing choices. More on post setting and long-lasting fences is in our landscaping guide.