Fence Calculator

Enter the fence length, height, corners and gates to get the number of posts, rails, pickets or panels, post length and the concrete for each post hole.

Free · No sign-up · Runs in your browser

How to use the fence calculator

A timber fence is posts set in the ground, rails running between them and boards, pickets or ready-made panels fixed to the rails. Once you know the length, height and post spacing, everything else follows. This calculator works through the count for each part, the post length to buy and the concrete for the holes, so you can price the fence or write up a materials list.

  1. Choose units. US mode takes feet for the fence and inches for the parts; metric mode takes metres and millimetres.
  2. Enter the total length of all runs, including gate openings, plus the height above ground and the post spacing.
  3. Count corners and gates. Each corner and each gate adds a post; gate openings are taken out of the fenced length.
  4. Pick the infill. For pickets or boards, enter the width and gap (zero for a solid privacy fence). For panels, one panel fills each section.
  5. Set the rails and the post hole, then read the results.

Fence material formulas

Fenced length = total length − gates × gate width
Sections = ⌈fenced length ÷ post spacing⌉
Posts = sections + 1 + corners + gates
Rails = sections × rails per section × (1 + extra %)
Pickets = ⌈fenced length ÷ (picket width + gap)⌉ × (1 + extra %)
Post length = height + hole depth, rounded up to stock
Concrete per post = π × (hole diameter ÷ 2)² × depth − post area × depth

The post count assumes each corner and gate breaks the run, which matches most layouts. A fence that closes on itself in a full loop needs one post fewer. Bag yields are typical: about 0.375 ft³ for 50 lb, 0.45 ft³ for 60 lb and 0.60 ft³ for 80 lb bags, and about 0.012 m³ for a 25 kg bag. Check the bag you buy.

Fence heightTypical post spacingTypical railsTypical post set depth
3–4 ft (0.9–1.2 m)6–8 ft (1.8–2.4 m)22 ft (600 mm)
5 ft (1.5 m)6–8 ft (1.8–2.4 m)32–2.5 ft (600–750 mm)
6 ft (1.8 m)6–8 ft (1.8–2.4 m)32–3 ft (600–900 mm)

These are common rules of thumb. Frost depth, soil, wind exposure and local rules can call for deeper or closer posts.

Worked examples

A 6 ft privacy fence

A 100 ft fence, 6 ft high, with one corner and one 4 ft gate, posts at 8 ft and 5.5 in boards butted tight. The fenced length is 96 ft, so there are 12 sections and 15 posts. Three rails per section is 36 rails, 38 with 5% extra. The boards are ⌈1,152 ÷ 5.5⌉ = 210, or 221 with extra. Set 24 in deep, each post is 8 ft long. A 10 in hole 24 in deep, less a 3.5 in post, holds about 0.92 ft³ of concrete, two 80 lb bags per post. Across 15 posts that is 13.8 ft³, or 31 bags of 60 lb if you mix by the barrow rather than bag by bag.

A metric panel fence

A 30 m garden fence, 1.8 m high, with posts at 1.83 m for standard panels, two corners and no gate. That is ⌈30 ÷ 1.83⌉ = 17 panels and 17 + 1 + 2 = 20 posts. With 600 mm deep holes, 2.4 m posts work. A 300 mm hole 600 mm deep around a 100 mm post holds about 0.036 m³ of concrete, so 0.73 m³ for all 20 posts, or about 61 bags of 25 kg.

Who this calculator helps

  • Landscape architects and garden designers scheduling boundary fences and screens on a site plan.
  • Architects adding early quantities for boundary treatments to a cost plan.
  • Fencing contractors putting together a quick materials list for a quote.
  • Homeowners pricing a new fence or a replacement before visiting the lumber yard.

Practical tips

  • Confirm the boundary line, and call your utility locating service before digging any holes.
  • Put a few inches of gravel in the bottom of each hole for drainage, and slope the top of the concrete away from the post.
  • Brace gate posts well and consider larger posts for gates wider than about 4 ft.
  • Get more accurate concrete figures with the concrete calculator, price the lumber with the board foot calculator, and check setbacks with the setback calculator.

Want to see the new fence before you build it? Try it on a photo of the house and garden with Exterior Redesign.

From numbers to pictures

See the space before it's built.

Once the plan works on paper, BasedFrame turns a sketch, a massing model or a site photo into a photoreal render in seconds. Try Sketch to Render or Room Redesign with free credits.

Try BasedFrame free

FAQ

Fence Calculator FAQ

How many fence posts do I need?

Divide the fence length (without gate openings) by the post spacing and round up to get the number of sections, then add one end post, one post for each corner and one for each gate. A 100 ft run with one corner and one 4 ft gate at 8 ft spacing has 96 ft of fence, 12 sections and 12 + 1 + 1 + 1 = 15 posts. It is an estimate: lay the run out on site to fix exact positions.

How far apart should fence posts be?

Wood fence posts are usually set 6–8 ft (1.8–2.4 m) apart on centres, and 8 ft is the common maximum for wood rails. Panel fences use the panel width, often 6 or 8 ft in the US and 1.83 m (6 ft) in the UK. Windy sites, tall privacy fences and heavy boards call for closer spacing.

How deep should fence posts be?

A common rule is to bury about one-third to one-half of the post's above-ground height, and at least 2 ft (600 mm), so a 6 ft fence usually gets posts set 2–3 ft deep on 8–9 ft posts. In cold climates, set posts below the frost line, and set gate posts deeper because they carry more load. Check local practice and any code or HOA rules.

How much concrete do I need per fence post?

Work out the volume of the hole and subtract the post. A 10 in diameter hole 2 ft deep holds about 1.09 ft³; a 4 × 4 post (3.5 in actual) takes up 0.17 ft³ of it, leaving about 0.92 ft³: two 80 lb bags (0.60 ft³ each), or just over two 60 lb bags (0.45 ft³ each). The calculator does this for your hole size and gives bags for 50, 60 and 80 lb or 20 and 25 kg.

How wide should a fence post hole be?

A common guide is about three times the width of the post, so roughly 10–12 in (250–300 mm) for a 4 × 4 or 100 mm post and about 16 in for a 6 × 6. Wider holes use more concrete but resist leaning and wind better.

How many pickets do I need for a fence?

Divide the fence length by the picket width plus the gap. With 3.5 in pickets and a 2.5 in gap, each picket takes 6 in, so 96 ft of fence needs 96 × 12 ÷ 6 = 192 pickets, plus 5–10% for culls and cuts. For a solid privacy fence, set the gap to zero, or allow for overlap if you build board-on-board.

How many rails does a fence need?

Fences up to about 4 ft high usually get two horizontal rails per section, and 5–6 ft privacy fences usually get three so the boards don't warp in the middle. Each section takes one rail per row when the post spacing is no longer than the rail stock, typically 8 ft.

Does a fence need a permit?

Many towns require a permit or set rules for fence height, setbacks and materials, often around 3–4 ft in front yards and 6 ft in back yards, and pool fences have their own rules. HOAs may add more. Check before you dig, and call your local utility locating service so you don't hit buried lines.

Keep exploring

More free tools for architects

Turn any listing
into rooms that sell

Start with a Zillow link or a single photo. Redesign, stage, relight and walk buyers through every room, ready to list today.