This fence calculator works out the posts, rails, pickets or panels, concrete and cost for a wood, vinyl, aluminum or chain link fence. Enter each side of your fence, add gates, and get a full shopping list with a price estimate.
Pick your fence type and enter the sides. The starting values describe a 100 ft, 6 ft tall wood privacy fence, so you can press Calculate to see an example.
Fence layout
Include the gate openings in your side lengths. The calculator takes them out of the fence run and adds the gate posts.
Fence style
Post footing
Depth follows your fence height (about one third of it, never under 24 in). Enter your local frost depth if it is deeper.
Cost and extras
Edit prices (typical US store prices, replace with yours)
- Call 811 (US) or your local utility-locating service a few days before digging. It is free and the lines are marked for you.
- Check permits, height limits, setbacks and any HOA rules, and confirm where your property line is before you set posts.
- Mark every post position with a string line and stakes, then re-check the spacing before you dig the first hole.
Need a quick number? Jump to the fence materials chart by length.
Fence Materials Chart: Posts, Pickets and Concrete by Fence Length
Look up your fence length for a quick count. Every chart uses the same rules as the calculator above, for a straight fence with a post at each end, no gates and no extra for waste. For corners, gates or your own sizes, use the calculator.
How many posts, rails and pickets for a fence, by length (6 ft wood privacy fence)
| Fence Length | Sections | Posts | Rails (2×4, 8 ft) | Pickets (5.5 in) | Concrete (80 lb bags) |
|---|---|---|---|---|---|
| 25 ft | 4 | 5 | 12 | 50 | 6 |
| 50 ft | 7 | 8 | 21 | 100 | 10 |
| 75 ft | 10 | 11 | 30 | 150 | 13 |
| 100 ft | 13 | 14 | 39 | 200 | 17 |
| 125 ft | 16 | 17 | 48 | 250 | 20 |
| 150 ft | 19 | 20 | 57 | 300 | 24 |
| 200 ft | 25 | 26 | 75 | 400 | 30 |
| 250 ft | 32 | 33 | 96 | 500 | 38 |
| 300 ft | 38 | 39 | 114 | 600 | 45 |
Based on 8 ft post spacing, 3 rails per section, 5.5 in pickets with a 0.5 in gap, and a 10 in hole 24 in deep with a 6 in gravel base. Add about 10% to pickets and rails for cuts.
How many fence posts do you need for a length of fence, by post spacing
| Fence Length | 4 ft Spacing | 6 ft Spacing | 8 ft Spacing | 10 ft Spacing | 12 ft Spacing |
|---|---|---|---|---|---|
| 20 ft | 6 | 5 | 4 | 3 | 3 |
| 25 ft | 8 | 6 | 5 | 4 | 4 |
| 30 ft | 9 | 6 | 5 | 4 | 4 |
| 40 ft | 11 | 8 | 6 | 5 | 5 |
| 50 ft | 14 | 10 | 8 | 6 | 6 |
| 75 ft | 20 | 14 | 11 | 9 | 8 |
| 100 ft | 26 | 18 | 14 | 11 | 10 |
| 150 ft | 39 | 26 | 20 | 16 | 14 |
| 200 ft | 51 | 35 | 26 | 21 | 18 |
| 250 ft | 64 | 43 | 33 | 26 | 22 |
| 300 ft | 76 | 51 | 39 | 31 | 26 |
| 500 ft | 126 | 85 | 64 | 51 | 43 |
Posts = fence length divided by spacing, rounded up, plus one. Wood privacy and picket fences use 6 to 8 ft spacing, most vinyl and wood panels are 6 or 8 ft wide, and chain link line posts go every 10 ft.
How much concrete per fence post: bags by hole size
| Post | Hole (diameter x depth) | Concrete (cu ft) | 50 lb Bags | 60 lb Bags | 80 lb Bags |
|---|---|---|---|---|---|
| 4×4 post | 8 in x 24 in | 0.40 | 1.1 | 0.9 | 0.7 |
| 4×4 post | 10 in x 24 in | 0.69 | 1.8 | 1.5 | 1.2 |
| 4×4 post | 10 in x 30 in | 0.92 | 2.5 | 2.0 | 1.5 |
| 4×4 post | 12 in x 30 in | 1.40 | 3.7 | 3.1 | 2.3 |
| 4×4 post | 12 in x 36 in | 1.75 | 4.7 | 3.9 | 2.9 |
| 6×6 post | 12 in x 30 in | 1.15 | 3.1 | 2.6 | 1.9 |
| 6×6 post | 12 in x 36 in | 1.44 | 3.8 | 3.2 | 2.4 |
| 6×6 post | 14 in x 36 in | 2.15 | 5.7 | 4.8 | 3.6 |
| 6×6 post | 16 in x 42 in | 3.56 | 9.5 | 7.9 | 5.9 |
Bags per post for one hole, with the volume of the post taken out and a 6 in gravel base under it. An 80 lb bag makes about 0.6 cu ft, a 60 lb bag 0.45 cu ft and a 50 lb bag 0.375 cu ft. Round the total up when you buy for the whole fence. Without a gravel base, a 4×4 in a 10 in by 24 in hole takes about 1.5 bags of 80 lb.
How deep should fence posts be, and how long should they be, by fence height
| Fence Height | Hole Depth | Post Length Needed | Standard Post to Buy | Rails per Section |
|---|---|---|---|---|
| 3 ft | 24 in | 5 ft | 6 ft | 2 |
| 4 ft | 24 in | 6 ft | 6 ft | 2 |
| 5 ft | 24 in | 7 ft | 8 ft | 3 |
| 6 ft | 24 in | 8 ft | 8 ft | 3 |
| 8 ft | 36 in | 11 ft | 12 ft | 4 |
Depth is about one third of the fence height and never under 24 in. Post length is the fence height plus the hole depth. In cold climates set the depth below your local frost line. Standard lengths are the nearest size sold for wood posts.
Fence cost by length and type (materials only, 6 ft tall)
| Fence Length | Wood picket | Wood panel | Vinyl | Aluminum | Chain link |
|---|---|---|---|---|---|
| 50 ft | $726 | $856 | $1,374 | $1,330 | $539 |
| 100 ft | $1,369 | $1,557 | $2,491 | $2,470 | $985 |
| 150 ft | $2,013 | $2,259 | $3,613 | $3,611 | $1,429 |
| 200 ft | $2,655 | $2,959 | $4,736 | $4,900 | $1,873 |
| 250 ft | $3,339 | $3,773 | $6,044 | $6,041 | $2,310 |
| 300 ft | $3,988 | $4,480 | $7,167 | $7,176 | $2,749 |
Materials only, for a straight fence with no gates, using the default prices in the calculator (typical US store prices, so real prices will differ by region and season). Labor is not included. Enter your own prices in the calculator for a local estimate.
Fence materials by length for metric fences (1.8 m wood privacy fence)
| Fence Length | Sections | Posts | Rails (3 per section) | Pickets (14 cm) | Concrete (25 kg bags) |
|---|---|---|---|---|---|
| 10 m | 5 | 6 | 15 | 67 | 9 |
| 20 m | 9 | 10 | 27 | 134 | 15 |
| 30 m | 13 | 14 | 39 | 200 | 21 |
| 40 m | 17 | 18 | 51 | 267 | 27 |
| 50 m | 21 | 22 | 63 | 334 | 33 |
| 75 m | 32 | 33 | 96 | 500 | 50 |
| 100 m | 42 | 43 | 126 | 667 | 65 |
Based on 2.4 m post spacing, 100 x 100 mm posts, 14 cm pickets with a 1 cm gap, and a 25 cm hole 60 cm deep with a 15 cm gravel base.
How This Fence Calculator Counts Materials
- Sections. Each side of the fence is divided by the post spacing and rounded up to whole sections, so a 100 ft side at 8 ft spacing is 12.5, which becomes 13 sections. Gate openings are taken out of the longest sides first.
- Posts. A fence that does not close a loop needs one more post than it has sections. A closed loop needs exactly one post per section. Every gate adds two gate posts, and an end fixed to a wall needs no post.
- Post length and depth. Hole depth is about one third of the fence height and never under 24 in. Post length is the fence height plus that depth, rounded up to the next standard length.
- Pickets and rails. Pickets are the fence length minus the gates, divided by the picket width plus the gap, rounded up. Rails are the rails per section times the sections.
- Concrete. Each hole is a cylinder, and the volume of the post is taken out. A gravel base takes the bottom 6 in of the hole, so the concrete fills the rest. Bags are rounded up for the whole fence.
- Cost. Every quantity is multiplied by the price you see in the price editor, and labor per foot is added if you enter it.
Fence Calculator FAQs
Shape matters because every side rounds up to whole sections on its own. A straight 100 ft fence at 8 ft spacing needs 14 posts, but the same 100 ft built as a closed 25 ft by 25 ft square needs 16. Enter each side separately in the calculator, and tick the loop box if the fence comes back to where it started.
Corner, end and gate posts should always be set in concrete because they carry the pull of the fence or the swing of a gate. Line posts in firm, well-drained soil can be set in tamped gravel, but concrete is the safer choice in sandy or soft soil, on tall solid privacy fences that catch the wind, and for vinyl and chain link terminal posts. The calculator prices every post in concrete, so it gives the higher figure.
Set them below the local frost line, which ranges from a few inches in the far south to 4 ft or more in northern states. Frost that grips a shallow post lifts it a little every winter. Enter your frost depth in the hole depth box, and keep the 6 in gravel base so water drains away from the bottom of the post. Your building department can tell you the frost depth.
The calculator shows materials at the prices in the price editor, so enter what your local store charges for posts, pickets or panels and concrete. Add a labor rate per foot if you have a quote. A contractor’s price can also cover permits, removing an old fence, hauling, and extra work on sloped or rocky ground, which this estimate does not include.
For a solid privacy fence leave 1/4 to 1/2 in, because wet lumber shrinks as it dries and opens the gaps. A classic spaced picket fence uses a gap of about 1.5 to 3.5 in. For a board-on-board fence, choose that layout in the calculator, which assumes each board overlaps its neighbour by 1 in. A pool barrier must not have openings of 4 in or more.
Measure each side along the ground with a tape, not across the air. Then choose one of two methods. Racking lets the panels follow the slope, and stepping holds each panel level and leaves a wedge gap under the high side. For a steep slope, pick the 15% waste option, and buy posts one length longer for the downhill end because the gap to the ground grows there.
Line posts hold the fence between other posts. Corner and end posts take the pull from the fence on one side, so they need the deepest footing, and on chain link they are heavier terminal posts. Gate posts carry the gate’s weight and swing. For a gate wider than 4 ft, use a 6×6 or steel post, and set it in extra concrete to stop it from sagging.
Most codes follow the 2021 International Residential Code and International Swimming Pool and Spa Code. They require a barrier at least 48 in high, with openings smaller than 4 in and a gap under the fence of no more than 2 in, and no toeholds or climbable features. The gate must be self-closing, self-latching and open away from the pool. Some areas require more, so confirm with your local building department. Tick the pool box for a reminder with your result.
In the US, call 811 before you dig, at least a few business days ahead in most states. It is free and buried utilities are marked for you. Many towns also require a fence permit and set height limits, and many limit front-yard fences to about 4 ft and back-yard fences to about 6 ft, but the rules vary widely. Check setbacks and your HOA, and confirm your property line before you set posts.