Skip to content

Fence Calculator: Posts, Rails and Pickets

Fence posts, rail length and pickets for a run of fence from its length and spacing.

Inputs

Fence posts
18

Use this calculator on your own site

Free embed

  • Two lines of HTML, unlimited views
  • Shows a small CalculateEveryday bar, with a credit link under the calculator

What each Fence input means

Fence perimeter
The length of fence, in metres or feet. For several straight runs, enter each separately or add the lengths and then add a post for every corner.
Post spacing
Centre-to-centre distance between posts. Decks.com gives 6–8 ft (1.8–2.4 m) for wood and composite and 8–10 ft for vinyl; matching your rail length avoids cutting.
Horizontal rails
Horizontal rails per section: two for a low fence, three for a typical 6 ft privacy fence.
Picket spacing, centre to centre
Centre-to-centre picket spacing, in cm or inches: the picket's width plus the gap. Butt-jointed privacy pickets have no gap, so it is just their width.
Waste allowance
Extra rail length for cuts and joins.
Units
Metric (metres, m², litres) or US units (feet, square feet, gallons). The run length and spacings switch with it, so post spacing in feet or metres both work.

Fence formula

sections = length ÷ post spacing, rounded up · posts = sections + 1 · rail = length × rails × (1 + waste %) · pickets = length ÷ picket spacing

s=⌈Ld⌉,p=s+1s = \left\lceil \frac{L}{d} \right\rceil, \quad p = s + 1

A straight fence is a row of sections, each spanning post to post. Divide the length by the post spacing and round up to get the sections; there is always one more post than sections, because both ends need one. Most residential wood and composite privacy fences set posts 6–8 ft (1.8–2.4 m) apart and vinyl 8–10 ft, per Decks.com — the rail length available often decides, since an 8 ft post spacing uses 8 ft rails without cutting. Each horizontal rail runs the full length, so the rail stock is the length times the number of rails, plus waste. Pickets are the length divided by their centre-to-centre spacing: picket width plus the gap.

Fence worked example

A 40 m run with posts every 2.4 m: 40 ÷ 2.4 = 16.7, so 17 sections and 18 posts. Three rails along 40 m is 120 m of rail, 126 m with 5% waste, and pickets at 10 cm centres need 400. In feet, a 130 ft run at 8 ft spacing is 16.25 sections — 17 — so 18 posts.

More Fence examples

A 100 ft run with posts 8 ft apart: 12.5 sections round up to 13, so 14 fence posts. Two rails make 210 ft of rail lumber with 5%, and 4-inch pickets with no gap need 300.

A 30 m garden boundary with posts every 1.8 m: 16.67 sections round up to 17, so 18 posts, and three rails come to 94.5 m with 5%.

Where the Fence calculator can give the wrong answer

  • Corners and gates: each corner is a post that may not fall on the spacing, and each gate needs its own pair of heavier posts. Add them.
  • A closed loop (a fenced square with no gaps) has as many posts as sections, not one more.
  • On a slope the spacing is measured along the ground for stepped panels; posts get longer, not more numerous.
  • Post depth and concrete are set by the fence height and local practice and are not calculated here.

Spotted a mistake? Tell us

Fence reference table

Posts for a straight run of fence
Fence lengthPosts at 6 ft spacingPosts at 8 ft spacing
50 ft108
100 ft1814
150 ft2620
200 ft3526
300 ft5139
Source: Arithmetic: sections = length ÷ spacing, rounded up; posts = sections + 1. Add corner and gate posts

Fence FAQ

Most residential privacy fences use 6–8 ft (1.8–2.4 m) for wood and composite and 8–10 ft for vinyl, according to Decks.com. Matching the spacing to standard rail lengths (8 ft) saves cutting.