Fence Calculator

Please fill in the required fields with values greater than 0.
–posts
–rails
–pickets
–estimated cost

Estimate only. Gate hardware, concrete, nails and local building rules are not included.

How to use this calculator

Enter the total fence length, post spacing, fence height and the picket size. Add the number of gates and press Calculate to see the posts, rails and pickets you need.

The formula

Sections = length ÷ post spacing (rounded up)
Posts = sections + 1 + one extra post for each gate
Rails = sections × 3 (2 for fences under 5 ft)
Pickets = length × 12 ÷ (picket width + gap)

Example: A 100 ft fence, 6 ft high, with posts 8 ft apart and one gate has 13 sections, 15 posts, 39 rails and 200 pickets.

Planning your fence materials and budget

The calculator gives you the posts, rails and pickets for a standard wood picket or privacy fence. Use the counts as your material list, then add the hardware, concrete and gates that the estimate leaves out.

A second worked example

Say you need a 150 ft fence that is 4 ft high, with posts 6 ft apart and two gates. That gives 25 sections. You need 28 posts: 25 plus 1, plus 1 for each gate. Since the fence is under 5 ft, it uses 2 rails per section, for 50 rails. With 3.5 inch pickets and a 2 inch gap, you need 150 ร— 12 รท 5.5, or about 328 pickets.

What changes your material list

  • Post spacing: 8 ft spacing uses fewer posts. 6 ft spacing is stronger in wind and for heavy gates.
  • Height: Taller fences need a third rail and longer, deeper posts.
  • Picket gap: A privacy fence with no gap needs more pickets than a spaced picket fence.
  • Corners and slopes: Each corner and change in direction needs its own post. Slopes may need stepped or racked sections.

Before you dig

  • Confirm your property line. A survey or the plat map can prevent disputes with neighbors.
  • Call 811 a few days before digging so utility lines can be marked for free.
  • Check local height limits, setback rules and HOA rules, and get a permit if one is required.
  • Talk with neighbors about the fence line and which side faces them.

Common mistakes

  • Forgetting extra posts for gates and corners.
  • Setting posts too shallow, which leads to leaning sections.
  • Using untreated wood for posts in the ground.
  • Buying exactly the counted pickets, with no spares for split or warped boards.

Budgeting the full job

If you enter a price per linear foot, the estimate multiplies it by the length. At $30 per foot, for example, a 100 ft fence comes to about $3,000. Get that price from a local quote or by adding up material prices. Then add gate kits, hinges and latches, concrete or gravel for posts, screws or nails, and stain or sealer. Buy about 5 to 10 percent extra pickets and a spare rail or two.

If you hire a contractor, ask whether the quote includes old fence removal, hauling, permits and gates. Get at least three written quotes before you decide.

Frequently asked questions

How many fence posts do I need?
Divide the fence length by the post spacing, round up and add one more post. Add an extra post for each gate.
How far apart should fence posts be?
6 to 8 feet apart is standard. Use 6 feet for heavy gates and in windy areas.
How many pickets do I need for a fence?
Multiply the length in feet by 12 and divide by the picket width plus the gap between pickets.
How deep should fence posts be?
Bury about one third of the post length, or at least 2 feet, and deeper where frost occurs.
Do I need a permit for a fence?
Many areas require one, and have height rules. Check with your local authority.
Which side of the fence should face the neighbor?
The finished, smooth side usually faces outward toward the neighbor or street, with posts and rails on your side. Many local rules and HOAs require this. It also tends to look better from the street. Check your local ordinance before you build, since some areas set specific rules.
How much concrete do I need per fence post?
It depends on the hole size. A 10 inch wide, 30 inch deep hole for a 4×4 post needs about 1.15 cubic feet of concrete. That is about two 80 lb bags or three 50 lb bags. Multiply by your number of posts and buy one or two spare bags.
What is the best wood for a fence?
Pressure-treated pine is a common, lower-cost choice and resists rot well for posts. Cedar and redwood cost more but resist decay naturally and look good with less treatment. Many builders use treated posts with cedar pickets. Seal or stain any wood fence every few years to extend its life.