Fence Calculator

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.

Units

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)

Before You Dig or Buy
  1. Call 811 (US) or your local utility-locating service a few days before digging. It is free and the lines are marked for you.
  2. Check permits, height limits, setbacks and any HOA rules, and confirm where your property line is before you set posts.
  3. 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 LengthSectionsPostsRails (2×4, 8 ft)Pickets (5.5 in)Concrete (80 lb bags)
25 ft4512506
50 ft782110010
75 ft10113015013
100 ft13143920017
125 ft16174825020
150 ft19205730024
200 ft25267540030
250 ft32339650038
300 ft383911460045

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 Length4 ft Spacing6 ft Spacing8 ft Spacing10 ft Spacing12 ft Spacing
20 ft65433
25 ft86544
30 ft96544
40 ft118655
50 ft1410866
75 ft20141198
100 ft2618141110
150 ft3926201614
200 ft5135262118
250 ft6443332622
300 ft7651393126
500 ft12685645143

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

PostHole (diameter x depth)Concrete (cu ft)50 lb Bags60 lb Bags80 lb Bags
4×4 post8 in x 24 in0.401.10.90.7
4×4 post10 in x 24 in0.691.81.51.2
4×4 post10 in x 30 in0.922.52.01.5
4×4 post12 in x 30 in1.403.73.12.3
4×4 post12 in x 36 in1.754.73.92.9
6×6 post12 in x 30 in1.153.12.61.9
6×6 post12 in x 36 in1.443.83.22.4
6×6 post14 in x 36 in2.155.74.83.6
6×6 post16 in x 42 in3.569.57.95.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 HeightHole DepthPost Length NeededStandard Post to BuyRails per Section
3 ft24 in5 ft6 ft2
4 ft24 in6 ft6 ft2
5 ft24 in7 ft8 ft3
6 ft24 in8 ft8 ft3
8 ft36 in11 ft12 ft4

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 LengthWood picketWood panelVinylAluminumChain 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 LengthSectionsPostsRails (3 per section)Pickets (14 cm)Concrete (25 kg bags)
10 m5615679
20 m9102713415
30 m13143920021
40 m17185126727
50 m21226333433
75 m32339650050
100 m424312666765

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

How do corners and fence shape change the number of posts?

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.

Do all fence posts need concrete?

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.

How deep should fence posts be in cold climates?

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.

How much does a fence cost per foot?

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.

What gap should I leave between fence pickets?

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.

How do I build a fence on a sloped yard?

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.

What is the difference between line, corner, end and gate posts?

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.

What are the requirements for a pool fence?

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.

Do I need a permit, or to call 811, before building a fence?

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.

Was this helpful?
Thank you for your feedback!
Aiper official site

Choose your region

North America
Europe
Oceania
Middle East
Aiper Store

Choose your region

North America
Europe
Oceania
Middle East
Language

Open this page in another language

Menu