YepCalc

Fence Calculator

Find how many posts, rails, and boards a wood fence needs, or how many posts and panels for a panel fence, and how many bags of concrete to set the posts. Enter each straight side and each gate, and the calculator places a post at every corner, end, and gate.

Fence type

Fence line

Side 1

Enter Length to include this side.

Add each straight side in order. Where a gate is, split the side and add the gate between the two parts.

Check this when the last side ends where the first side starts, such as a fence all the way around a yard.

Posts

Default: 8 ft. Posts are set at most this far apart, center to center.

Use the actual width. A 4x4 wood post is 3 1/2 in wide.

Height above the ground.

Boards and rails

Use the actual width. A 1x6 board is 5 1/2 in wide.

Leave blank for boards that touch. Choose Overlap for boards that overlap, such as featheredge or board-on-board.

Horizontal rails between two posts, such as 3 for a 6 ft privacy fence.

Concrete

Leave blank to use 3 × the post width (10 1/2 in).

Measured from the ground to the bottom of the post. Leave blank to use half the fence height.

%

Recommended for concrete: 10%

For a bag size not listed, enter the yield printed on the bag.

Cost

Result

Enter the length of a side to see the materials.

How to calculate fence materials

Each side gets a post at both ends and posts in between, no farther apart than the max post spacing:

Sections per side = side length ÷ max post spacing, rounded up

Posts = sections of all sides + gates + 1

A gate is an opening between two posts, so it counts as one section. In a fence that closes into a loop, the last post is the first one, so leave out the + 1. Corner posts are shared by the two sides that meet there, which is why the calculator counts each side on its own: three sides of 50, 100, and 50 ft at 8 ft spacing need 7 + 13 + 7 = 27 sections, while 200 ft divided at once gives only 25.

For boards on rails and for panels:

Rails = rails per section × sections

Boards per side = (side length + gap) ÷ (board width + gap), rounded up

Panels = sections

For boards that overlap, the gap is negative: (side length − overlap) ÷ (board width − overlap). Boards run along the rails from one end of a side to the other and cover the posts, so the post width is not taken off.

The 8 ft default follows Millard Lumber's guide to building wood fences, which sets posts about 6 to 8 ft apart, and decks.com, which notes that keeping sections just under 8 ft lets you use 8 ft rails. Set posts closer in windy places or for heavy boards. Whether you divide a side evenly or leave a shorter section at a corner or gate, as Master Halco's PostMaster installation guide suggests, the number of posts is the same.

For panels, Freedom's vinyl fence instructions measure the post spacing as the panel width plus one post width. Use the spacing in your panel's instructions when it gives one. Panel names such as 6x6 are nominal sizes, so measure the actual panel.

Concrete for fence posts

The calculator treats each post hole as a cylinder filled with concrete around a square post:

Concrete per hole = (π × hole diameter² ÷ 4 − post width²) × hole depth

Bags = concrete per hole × posts × (1 + waste % ÷ 100) ÷ yield per bag, rounded up

If you leave the hole size blank, the calculator uses:

The hole depth is measured to the bottom of the post. Quikrete, UFP, and Freedom all put about 6 in of gravel under the post, so dig that much deeper. Post length = fence height + hole depth.

Fast-setting mix for posts comes in the same bag sizes as regular concrete mix: Quikrete's data sheet gives about 0.375 ft³ for a 50 lb bag and 0.45 ft³ for a 60 lb bag, the same yields as the Concrete Calculator uses. For a size that is not listed, such as the 25 kg bag sold in Canada (about 11.6 L), enter its yield as a custom bag. Yields differ between products, so check the label on the bag you buy. The 10% waste allowance follows Sakrete's advice for bagged concrete and covers holes that come out wider than planned. It applies to the concrete only.

Examples

A 100 ft privacy fence

One straight side of 100 ft with posts at most 8 ft apart needs 100 ÷ 8 = 12.5, rounded up to 13 sections, so 14 posts. With 3 rails per section, that is 39 rails, and boards 5 1/2 in wide need 1,200 ÷ 5.5 = 218.18, rounded up to 219 boards. For a 6 ft fence, the holes are 10 1/2 in across and 36 in deep, the posts are 9 ft long, and the 14 holes take 23.85 ft³ of concrete with 10% added, or 64 bags of 50 lb mix.

A yard with a gate

Sides of 50, 100, and 30 ft, a 4 ft gate, and a last side of 16 ft need 7 + 13 + 4 + 2 = 26 sections. Adding 1 for the gate and 1 for the end of the fence makes 28 posts, with 78 rails and 430 boards for the 196 ft of fence.

Metric panels

Panels 1.83 m wide on 100 mm posts are spaced 1.93 m apart. A 20 m side needs 20 ÷ 1.93 = 10.36, rounded up to 11 panels and 12 posts. For a 1.8 m fence, the holes are 300 mm across and 900 mm deep, and they take 0.72 m³ of concrete with 10% added, which is 52 bags of 30 kg or 78 bags of 20 kg.

FAQ