Skip to content
Popular Calculators
Browse Construction calculators

Fence Calculator

Posts, rails, boards and post-hole concrete for a wooden fence, from its length, height, post spacing, gates and board size.

Units (optional)

Feet or metres.

Feet or metres.

Maximum, centre to centre. Feet or metres.

Each adds a post.

Actual size: 3.5 in for a 4×4. Inches or mm.

Inches or mm.

0 for a closed privacy fence. Inches or mm.

About the Fence Calculator

A wooden fence is one of the most common outdoor building projects, and it is straightforward once the materials are clear. Most fences share the same structure: posts set in concrete at regular intervals, horizontal rails between them, and vertical boards or pickets fixed to the rails. Panel fences replace the rails and boards with ready-made panels, but the posts and concrete are the same.

The quantities all follow from the fence's length, its height and the spacing of the posts. This fence calculator works out the posts (including gate posts), the rails, the boards or pickets, the length of post to buy, and the concrete needed to set them.

How to Use the Fence Calculator

Choose imperial or metric.

Enter the fence length — the total run, including any gates.

Enter the height and the post spacing. 8 ft (2.4 m) is common; closer spacing makes a stiffer fence.

Enter the number of gates. Each adds a post, because a gate needs a post on both sides.

Enter the actual post width, the board width and the gap between boards — zero for a closed privacy fence.

How the Materials Are Worked Out

  bays        =  length ÷ post spacing, rounded up
  posts       =  bays + 1 + gates
  rails       =  bays × (2, or 3 if taller than about 5 ft / 1.5 m)
  boards      =  length ÷ (board width + gap), rounded up
  hole        =  3 × post width across, max(height ÷ 3, 24 in / 600 mm) deep
  concrete    =  posts × (hole volume − buried post)

Step-by-Step Example

A 100 ft fence, 6 ft high, posts at 8 ft, no gates, 4×4 posts (3½ in), 5½ in boards with ½ in gaps.

  Bays:       100 ÷ 8 = 12.5           →  13 bays
  Posts:      13 + 1                   =  14 posts, 8 ft long
  Rails:      13 × 3                   =  39 rails
  Boards:     1200 in ÷ 6 in           =  200 boards
  Holes:      10.5 in wide × 24 in deep
  Concrete:   14 × 1.03 ft³            =  14.5 ft³  →  25 × 80 lb bags

Posts: Length and Depth

A common rule is to bury a third of the post's height above ground, with a minimum of about 2 ft (600 mm). A 6 ft fence therefore needs posts about 8 ft long, set 2 ft deep. In frost-prone areas, the bottom of the hole should reach below the frost line so the posts are not heaved out of the ground.

Holes are typically about three times the post's width across — 10 to 12 in for a 4×4 — so there is a good collar of concrete all round. A few inches of gravel in the bottom helps drainage, and sloping the concrete away from the post at the top sheds water.

Rails and Boards

Fences up to about 5 ft (1.5 m) usually have two rails per bay; taller fences need three to stop the boards bowing. Rails are typically 2×4s (38 × 89 mm) laid flat or on edge between the posts.

Boards can be spaced for a picket fence, butted tight for a privacy fence, or overlapped in a shadowbox or board-on-board style, which needs about half as many boards again because each one overlaps its neighbours. For a board-on-board fence, run the calculator with a gap of zero and add about 50% to the boards.

Gates

Each gate needs a post on each side, and gate posts take more load than the others, so they are often a size larger and set deeper. Gates also need hinges, a latch and often a diagonal brace running up from the bottom hinge side to stop them sagging.

Planning and Permission

Before building, check where the boundary is — ideally from the deeds or a survey — and whether your neighbour needs to agree. Many areas limit fence heights without permission: in England, 1 m next to a road and 2 m elsewhere; many US towns allow about 4 ft at the front and 6 ft at the back. Always have buried services located before digging post holes.

Panels Instead of Boards

Panel fencing, common in the UK, uses ready-made panels — usually 6 ft (1.83 m) wide — slotted between concrete or timber posts. The posts are one per panel plus one, so the count is the same as above with a post spacing equal to the panel width plus the post; concrete gravel boards along the bottom keep the panels off the soil. For a panel fence, ignore the rails and boards and use the number of bays as the number of panels.

Treating and Finishing

Use posts rated for ground contact, whatever the rest of the fence is made of, because the buried section is where rot starts. Cut ends of treated timber should be re-treated with an end-grain preservative. A stain or paint applied once the wood has dried out protects it from the weather and can be renewed every few years.

Setting Posts Straight

Run a string line between the end posts first, and set every post to it, checking each one for plumb on two adjacent faces with a level. Brace the posts while the concrete sets — usually a day for ordinary mixes — before hanging rails or boards.

Understanding Your Result

Materials gives the posts, rails and boards.

Posts gives the bays, post length and burial depth.

Rails gives the rails per bay.

Post concrete gives the hole size, volume and bags.

Worth knowing covers permission and buried services.

When Should You Use This Calculator?

Planning a new fence or replacing an old one.

Comparing post spacings or fence heights.

Ordering concrete for setting posts.

Pricing a fencing job.

Common Mistakes

Forgetting gate posts. Each gate adds one.

Posts too short. Bury a third of the height.

Two rails on a tall fence. Use three above about 5 ft.

Ignoring the frost line. Posts can heave.

Digging without locating services. Call before you dig.

Frequently Asked Questions

How many fence posts do I need?

Divide the fence length by the post spacing and round up to get the bays, then add one post to close the run and one more for each gate. A 100 foot fence with posts at 8 foot centres has 13 bays and 14 posts, before any gates are added.

How deep should fence posts be?

A common rule is to bury a third of the post’s height above ground, and at least 2 feet or 600 millimetres, deeper in frost-prone areas. A 6 foot fence therefore needs posts about 8 feet long, set 2 feet into holes about three times the post’s width across.

How much concrete do fence posts need?

Each hole holds a cylinder of concrete less the buried post. A 10½ inch hole 24 inches deep around a 4 by 4 post takes about 1 cubic foot, so 14 posts need about 14.5 cubic feet, roughly twenty-five 80 pound bags of concrete.

How many rails does a fence need?

Two rails per bay are usual for fences up to about 5 feet, or 1.5 metres, high, one near the top and one near the bottom. Taller fences use three rails, the extra one in the middle, to stop the boards bowing and to stiffen each bay.

How many pickets or fence boards do I need?

Divide the fence length by the board width plus the gap between boards. With 5½ inch boards and a half inch gap, each board covers 6 inches, so a 100 foot fence takes 200 boards. For a closed privacy fence, set the gap to zero.

Last reviewed September 24, 2026 by the CalculatorPeak editorial team.