Fence Calculator

Estimate the posts, rails, pickets and bags of concrete for a wood fence from its length, height, post spacing and gates, with an optional cost per foot

Last updated: November 19, 2026

How to Use the Fence Calculator

How to use the fence calculator

  1. Measure the fence line. Add up the length of every side you plan to fence, in feet. Include the gate openings.
  2. Choose the height, post spacing and rails. 8 ft spacing and 3 rails suit most 6 ft privacy fences. Shorter fences usually need only 2 rails.
  3. Enter the picket size and gap. Use 5½ inches for standard 1 × 6 pickets, and a gap of 0 for a privacy fence.
  4. Add any gates and their width. Each gate removes pickets and adds a post.
  5. Adjust the extras (optional). Set the bags of concrete per post, the waste allowance, and an installed price per foot to estimate the cost.

The results list the posts, pickets, rails and concrete to buy, the post length and hole depth, and a materials list with how each number was worked out.

Check local rules before building. Many towns limit fence height, set back distances from property lines, and require permits, and some homeowners associations have their own rules.

Formula & Methodology

How to calculate fence materials

Sections and posts. Divide the fence length by the post spacing and round up to get the number of sections. You need one more post than sections, plus one extra post for each gate:

Sections = Fence length ÷ Post spacing (rounded up)

Posts = Sections + 1 + Gates

Rails. Multiply the sections by the rails in each section:

Rails = Sections × Rails per section

Pickets. Convert the fence length to inches and divide by the width of one picket plus the gap, then add a little for waste:

Pickets = Fence length (in) ÷ (Picket width + Gap)

Concrete. Multiply the posts by the bags each hole needs, usually 1 to 2 bags of 50 lb concrete for a 4 × 4 post.

Worked example

A 100 ft privacy fence, 6 ft tall, posts 8 ft apart, 3 rails, 5½ inch pickets with no gap and no gates:

  1. Sections: 100 ÷ 8 = 12.5, so 13 sections
  2. Posts: 13 + 1 = 14 posts
  3. Rails: 13 × 3 = 39 rails
  4. Pickets: 1,200 in ÷ 5.5 in = 218.2, so 219 pickets, or 240 with 10% extra
  5. Concrete: 14 × 2 = 28 bags

Post length and depth

A common rule is to bury about one third of the post, and at least 2 feet. For a 6 ft fence that means 8 ft posts set 2 ft deep. Dig holes about three times the post width: roughly 10 to 12 inches across for a 4 × 4. In cold climates, set posts below the frost line. Always call 811 before you dig to have underground lines marked.

Choosing the spacing

8 feet is the standard spacing for wood fences, because rails come in 8 ft lengths. Use 6 feet for extra strength in windy areas or for heavy materials. Vinyl and metal fence panels set their own spacing, usually 6 or 8 feet.

About Fence Calculator

Our fence calculator is a free, easy-to-use tool designed to help youestimate the posts, rails, pickets and bags of concrete for a wood fence from its length, height, post spacing and gates, with an optional cost per foot. For professionals or those who need quick calculations, our calculator provides accurate results instantly.

Frequently Asked Questions

How many fence posts do I need?

Divide the fence length by the post spacing, round up, and add one. A 100 ft fence with posts every 8 ft needs 13 sections and 14 posts. Add one more post for each gate.

How far apart should fence posts be?

For wood fences, 8 feet center to center is standard, because it matches the length of common 2 × 4 rails. Use 6 feet for more strength in windy areas or on heavy fences. Never go beyond 8 feet with wood rails.

How many pickets do I need for a fence?

Divide the fence length in inches by the picket width plus any gap. For 100 ft of privacy fence with 5½ inch pickets, that is 1,200 ÷ 5.5 = 219 pickets. Buy about 10% extra for cuts and split boards.

How much concrete do I need per fence post?

A 4 × 4 post in a 10 inch wide, 2 ft deep hole usually takes about two 50 lb bags of fast-setting concrete. Larger 6 × 6 posts, deeper holes or loose soil can take 3 or 4 bags.

How deep should fence posts be?

Bury about one third of the post length and at least 2 feet. A 6 ft fence uses 8 ft posts set 2 ft deep. In areas with deep frost, set posts below the frost line to stop them heaving.

How many rails does a fence need?

Fences up to 4 ft tall usually need 2 rails per section. Fences from 5 to 8 ft tall need 3 rails, top, middle and bottom, to keep the pickets from warping.

How much does a new fence cost?

Costs vary widely by region and material. Wood privacy fences are often quoted per linear foot installed, while vinyl, aluminum and wrought iron cost more. Enter a local price per foot to estimate your total.

Enter your values
ft

Add up every side you are fencing, including the gate openings

ft

8 ft apart, center to center, is standard for wood fences. 6 ft is stronger in high wind.

Use 2 rails for fences up to 4 ft and 3 rails for 5 to 8 ft fences

in

A "1 × 6" picket is actually 5½ inches wide

in

0 for a privacy fence, or about 2 to 3 inches for a picket fence

ft

Your result will appear here

Loading…