Skip to content

Fence Calculator

Posts, panels, rails and pickets for a fence of any length.

The panel width: 1.83 m (6 ft) for UK panels, 8 ft for most US wood fences.
Each corner starts a new run, which needs its own end post.
2 for fences up to about 1.2 m (4 ft), 3 for taller ones.
0 for a closed privacy fence.

Posts

18

Sections or panels
17
Rails
34
Pickets or boards
300

Good to know. A fence always has one more post than panels. Forgetting it is a classic trip back to the shop.

Approximate. Real-world values vary.

How it works

In plain words

Divide the fence length by the post spacing and round up for the number of sections. There is one more post than sections, and each corner or separate run adds another. Pickets are the length divided by one picket’s width plus its gap.

The formula

sections = ⌈length ÷ spacing⌉ (+1 per corner)
posts = sections + 1
rails = sections × rails per section
pickets = ⌈length ÷ (picket width + gap)⌉

Worked example

30 m ÷ 1.83 m is 16.4, so 17 sections and 18 posts. Two rails a section is 34 rails, and 3,000 cm ÷ (9 + 1) cm is 300 pickets.

Sources

No outside data or rates: this is plain arithmetic.

4 automated tests check its answers on every change.

About the fence calculator

Planning a fence starts with three numbers: the total length, the spacing between posts and how many corners there are. From those, the calculator works out the posts, the sections between them, the rails that hold the pickets or boards, and the number of pickets.

Posts are usually 1.8 to 2.4 metres apart: 1.83 m (6 ft) for standard UK panels and 8 ft (2.44 m) for most US wood fences. Closer spacing makes a sturdier fence in windy places. Every run of fence needs a post at each end, so a fence has one more post than sections, and each corner, gate or separate run adds one more.

For picket or board fences, divide the length by the width of one picket plus the gap you want. A privacy fence has no gap, or overlapping boards; a traditional picket fence leaves a gap about a third of the picket width. Most fences need two rails per section up to about 1.2 m (4 ft) high and three for taller ones.

Buy a few extra pickets for cuts and knots, and check local rules on height and boundaries before you start. Each post also needs concrete or a spike; the concrete calculator works out post holes. A post is usually set a quarter to a third of its length in the ground.

Questions people ask

How many fence posts do I need?

The length divided by the post spacing, rounded up, plus one, plus one more for each corner. 30 m at 1.83 m spacing needs 18 posts.

How far apart should fence posts be?

Usually 1.8 to 2.4 m (6 to 8 ft). Standard UK panels are 1.83 m wide; US wood fences typically use 8 ft sections.

How deep should fence posts go?

About a third of the post’s above-ground height, and at least 60 cm (2 ft), deeper in frost-prone or windy places.

Put this calculator on your site

Paste this where you want it. It fits the width of the page, grows with the answer and follows your readers’ dark mode. Free, with no ads inside.

<a href="https://99solved.com/fence-calculator" data-99solved>Fence Calculator</a>
<script async src="https://99solved.com/embed.js"></script>