Fence calculator

Enter the length and height of your wood fence. You get the posts, rails, pickets, concrete and fasteners to buy, how deep to set the posts, and the cost.

Fence

All sides added together

Height
Style
Pickets

1x6 boards are 5 1/2 in wide, 1x4s 3 1/2 in

Turns in the fence line

Each adds a post

Posts

Posts at most
Post size

6x6 for tall fences, heavy boards and gates

Blank: a third of the post

Blank: 3× the post

Concrete bags

Prices

Sample prices, priced per foot of lumber. Replace them with your supplier's.

Edit prices

0 if you're building it yourself

Your fence

Estimated cost

$2,142.60

$21.43 per ft

7 ft 8 5/16 in6 ft36 in
One section from the inside, to scale.

Materials list

  • 4x4 posts, 10 ft14 posts · $245.00
  • Concrete for posts, 50 lb84 bags · $672.00
  • Gravel for post holes, 0.5 cu ft11 bags · $66.00
  • Rails, 2x4 × 8 ft39 boards · $234.00
  • Pickets, 1x6 × 6 ft241 pickets · $867.60
  • Picket nails, galvanized14 packs of 100 · $42.00
  • Rail screws, 3 in exterior2 packs of 100 · $16.00

How it goes together

  • Sections13 of 7 ft 8 5/16 in
  • Post holes12 in wide, 42 in deep
  • Post depth36 in in concrete, on 6 in of gravel
  • Concrete per post6 bags of 50 lb
  • Rails3 per section
  • Picket nails1,314
  • Rail screws156
Turn this into an estimate

How the fence calculator works

  • Posts. The fence is split into equal sections no longer than the post spacing, with a post at each end of every section, plus one per corner and one per gate. A 100 ft fence with posts at most 8 ft apart has 13 sections of 7.69 ft and 14 posts.
  • Post holes. A third of each post goes in the ground, at least 24 in, in a hole three times as wide as the post, on 6 in of gravel. The rest of the hole is filled with concrete.
  • Rails. One 2x4 rail for every 2 ft of height, at least two, running post to post in each section, cut from the stock length that wastes least.
  • Pickets. The length of the fence divided by the width each picket covers: the board itself for a privacy fence, the board plus the gap for spaced pickets, and the board less a 1 in overlap for board on board. 10% extra for bad boards and cuts.
  • Fasteners. Two nails per picket at every rail, and two screws at each end of every rail.

How deep to set fence posts

Fence height Post depth Post to buy Hole, 4x4 50 lb bags per post
4 ft 24 in 6 ft 12 × 30 in 4
5 ft 30 in 8 ft 12 × 36 in 5
6 ft 36 in 10 ft 12 × 42 in 6
7 ft 42 in 12 ft 12 × 48 in 7
8 ft 48 in 12 ft 12 × 54 in 8

A third of the post in the ground, at least 24 in, on 6 in of gravel. Go below your frost line where the ground freezes, and 6 in deeper for gate, corner and end posts.

Pickets for a 100 ft fence

Style Pickets With 10% extra
Privacy, 1x6 219 241
Privacy, 1x4 343 378
Board on board, 1x6 267 294
Spaced 1x4, 2 in gaps 219 241

Privacy pickets are butted together; wet pressure-treated boards open small gaps as they dry. Board on board overlaps each back board 1 in onto the front boards beside it.

Concrete or gravel?

The retailers' guides set every post in concrete, which is the safe default. Some builders set line posts in tamped gravel and soil, which drains better and makes posts easier to replace, and keep concrete for gate, corner and end posts. Either way, slope the top of the concrete away from the post so water runs off.

Before you build

  • The property line. Find your survey pins, or get a survey, before digging.
  • Utilities. Call 811 a few days before you dig post holes.
  • Height limits and permits. The IRC doesn't require a building permit for fences up to 7 ft (Section R105.2), but zoning often limits fences to 4 ft in front yards and 6 ft behind, and many towns and HOAs want a permit or approval.
  • Pool fences. Barriers around pools must be at least 48 in high with no opening a 4 in ball can pass through, and no more than 2 in of gap under them over grass or gravel (ISPSC Section 305).

Questions

How many pickets do I need for a 100 ft fence?

With 1x6 pickets (5 1/2 in wide) butted together: 1,200 in ÷ 5.5 = 219 pickets, or 241 with 10% extra for bad boards and cuts. With 1x4 pickets it's 378, and board on board takes 294.

How deep should fence posts be for a 6 ft fence?

The usual rule is a third of the post in the ground: a 6 ft fence needs posts 36 in deep, so a 9 ft post (buy 10 ft) in a hole 42 in deep with 6 in of gravel at the bottom. Never less than 24 in, and below the frost line where the ground freezes. Many fences are set 24 in deep with 8 ft posts; that buries only a quarter of the post and suits sheltered spots with firm soil.

How far apart should fence posts be?

No more than 8 ft apart, center to center, so standard 8 ft rails reach from post to post. 6 ft apart makes a stiffer fence and suits windy sites or heavy boards. In hurricane zones, local codes can require posts as close as 4 ft.

How many bags of concrete per fence post?

For a 4x4 in a 12 in hole 36 in deep: about 2.1 cu ft, which is 6 bags of 50 lb fast-setting concrete. A 10 in hole 24 in deep takes 3. The concrete calculator works it out for any hole.

How many rails does a 6 ft fence need?

Three: one about 6 in from the top, one 6 in from the bottom and one in the middle. Fences up to 4 ft need two, and 8 ft fences four. Use 2x4s, and stagger the joints so two rails never end on the same post at the same height.

Do I need a permit for a fence?

Usually not for the building code: the IRC exempts fences up to 7 ft high from a building permit (Section R105.2). But zoning sets maximum heights, often 4 ft in front yards and 6 ft behind, and many towns and HOAs require a fence permit anyway. Pool fences have their own rules.

Rules from the Home Depot and Lowe's fence installation guides and Quikrete's guide to setting posts.

Estimated cost

$2,142.60

See the list