Fence Calculator

Count the posts, rails, pickets and concrete for a new fence.

Last updated 2026-11-28 · How we calculate this

Enter the Fence

Fence type

Posts, rails and pickets built on site.

Measurement system
The length of one straight run, from end post to end post. Work out each side of a yard separately.
The height above the ground, such as 6 ft or 1.8 m.
From the middle of one post to the middle of the next, usually 6 ft to 8 ft for wood.
rails
Whole number from 1 to 10. Two suit a fence up to about 4 ft high, and three a taller one.
The actual width, not the name: a 1×6 picket is 5.5 in (140 mm) wide.
Enter 0 or leave blank for a privacy fence with no gaps.
The width of one panel, usually 8 ft in the US and 6 ft (1.83 m) in the UK.
At least one third of the fence height and no less than 2 ft (600 mm). Go deeper in soft soil or below the frost line.
About three times the post width: 10 in to 12 in for a 4×4 post.
The actual width of a square post: a 4×4 is 3.5 in (89 mm), a UK fence post 75 mm or 100 mm.
cu ft per bag
From the bag: a 50 lb bag of fast-setting mix makes about 0.375 cu ft. In Metric this is liters per bag.

Fence Materials

Enter the fence length and height to see the materials.

This is a planning estimate for one straight run of fence on level ground. Gates, corners and steps on a slope need extra posts, and gate posts usually need bigger holes and more concrete. It does not design the fence for wind, soil or height, and it does not count screws, nails, brackets or post caps. Check property lines, permits and height rules before you start, and in the US call 811 before digging so buried utility lines can be marked.

Quick Answer

Divide the fence length by the post spacing, round up and add one to get the posts. A 120 ft fence with posts every 8 ft has 120 ÷ 8 = 15 sections and 16 posts. With 5.5 in pickets laid edge to edge it needs 1,440 in ÷ 5.5 in = 261.8, so 262 pickets.

How to Use This Calculator

Choose "Pickets and rails" if you will build the fence on site from posts, rails and pickets, or "Ready-made panels" if you will hang panels between the posts. Enter the length of the fence and its height, then the post spacing, rails and pickets or the panel width. Finally enter the size of the post holes, the width of the posts and how much concrete one bag makes, from the bag. The calculator counts the posts, sections, rails, pickets or panels, the length of post to buy and the bags of concrete to set them.

  1. Choose "Pickets and rails" or "Ready-made panels".
  2. Enter the fence length and height.
  3. Enter the post spacing, rails and pickets, or the panel width.
  4. Enter the hole size, post width and concrete per bag, then read the materials.

The Formula

Posts = fence length ÷ post spacing, rounded up, + 1; Pickets = fence length ÷ (picket width + gap), rounded up; Concrete per post = (3.1416 × hole radius × hole radius − post width × post width) × hole depth; Bags = posts × concrete per post ÷ concrete per bag, rounded up

Posts sit at both ends of the fence and at every spacing in between, so a run divided into sections always has one more post than sections. Each section gets its rails, and the pickets cover the whole length at their width plus any gap. Panels fix the spacing themselves: every panel adds its own width plus one post. Each post hole is a cylinder, the area of its circle, 3.1416 × radius × radius, times its depth, and the square post takes up part of it, so the concrete is the hole less the post. Bags are rounded up once for all the posts together.

Worked Example

A 6 ft privacy fence 120 ft long with posts every 8 ft: 120 ÷ 8 = 15 sections, so 16 posts and 45 rails with three per section. Pickets 5.5 in wide with no gap: 1,440 ÷ 5.5 = 261.8, so 262. Posts 8 ft long go 2 ft into holes 10 in across; each hole takes 0.92 cu ft of concrete, 14.73 cu ft for all 16, which is 40 bags of 0.375 cu ft.

The same 120 ft in 8 ft panels with 3.5 in posts: (1,440 − 3.5) ÷ 99.5 = 14.44, so 15 panels and 16 posts, with the same 40 bags.

UK: a 20 m run of 1.83 m panels with 100 mm posts: (20 − 0.1) ÷ 1.93 = 10.31, so 11 panels and 12 posts. For a 1.8 m fence in holes 600 mm deep the posts are 2.4 m long. Holes 250 mm across take 23.45 L each, 281.43 L in all, which is 29 bags if each bag makes 10 L.

Frequently Asked Questions

How far apart should fence posts be?

Most wood fences have posts 6 ft to 8 ft apart, and never further apart than the rails are long. Closer posts make a stronger fence, which helps on windy sites and with tall privacy fences. Vinyl and metal systems, and ready-made panels, set their own spacing, so follow the maker's instructions.

How deep should fence post holes be?

A common rule is to bury at least one third of the height above ground, and never less than 2 ft (600 mm), so a 6 ft fence needs 2 ft holes and 8 ft posts. Go deeper in loose soil, and in cold areas below the frost line so the posts are not heaved. Many builders put a few inches of gravel in the bottom for drainage.

Does a fence need two or three rails?

A fence up to about 4 ft high usually has two rails, one near the top and one near the bottom. Taller privacy fences usually get a third rail in the middle to stop the pickets bowing. Heavy boards, long sections or a windy site are good reasons to add the extra rail.

How many bags of concrete does each fence post need?

It depends on the hole. A 50 lb bag of Quikrete fast-setting mix makes about 0.375 cu ft, so a 10 in hole 2 ft deep around a 4×4 takes about two and a half bags. In the UK, 20 kg bags of post mix are usual, and Jacksons Fencing suggests two or three per post for panel fences and more for gate posts.

How do I allow for corners and gates?

Work out each straight side separately and add the posts together, then take one off for every corner where two sides share a post. Leave gates out of the fence length and add a post on each side of each gate. Gate posts carry more load, so they are often bigger, set deeper and given extra concrete.

Do I need permission to build a fence?

In the US many towns and homeowner associations need a permit and limit back yard fences to 6 ft or 8 ft, with lower limits at the front. In England, planning permission is usually needed for a fence over 2 m high, or over 1 m next to a road used by vehicles. Check with your local council or building department first.

Sources: The Home Depot, How to Build a Fence (post spacing and picket count); QUIKRETE, Fast-Setting Concrete Mix (yield per 50 lb bag); Jacksons Fencing, Post Fixing Mix (bags per post); Planning Portal, Fences, gates and garden walls (England)