Fence calculator

Type the length of the fence, the gates and the post spacing, and see how many posts, rails and pickets it takes, or how many panels, with the cost of each part as you type.

The working shows each count and why, so you can check it against the line on the ground.

The fence

Length of fence
Gate width

The whole length, gates included. Gate width left empty counts as 4 ft1.2 m.

Pickets or panels

Post spacing
Rails per section
Picket width
Gap between pickets

Center to center of the posts. Left empty: posts 8 ft2.4 m apart and pickets 5.5 in14 cm wide, set close with no gap. Use your own.

Optional. Extra pickets for splits and knots, added before the pickets are counted.

Prices

Optional. Each price makes a line of the cost.

Free for your own website, with no account and no ads.

Put the fence calculator on your website

Paste this code into an HTML or embed block on any page. Your visitors use the calculator right there, the same as here: free, no sign-up, no ads, and nothing they type is sent anywhere.

Preview it

It fits any width from a phone up to 640 px and grows to the calculator's height. The line under it links to this page, so your visitors can see where it comes from. Every calculator you can embed

Free calculator by Billsmith

Posts14 posts
Pickets210 pickets206 pickets
See the working

Fences, worked out

Sections first

Take the gates off the length to get the fence itself: 100 ft less one 4 ft gate is 96 ft. Divide by the post spacing, center to center, and round up: 96 ÷ 8 = 12 sections. A part section at the end is still a section.

Posts

A straight line of 12 sections has 13 posts, one more than the sections. Each gate is another span with its own post, and each corner needs a post of its own: 12 + 1 gate + 0 corners + 1 = 14 posts.

Rails and pickets

Rails run between the posts, two or three to a section: 12 × 2 = 24 rails. Pickets cover the fence: 96 ft is 1,152 in, and 1,152 ÷ (5.5 in picket + 0 gap) = 209.45, so 210 pickets. A gap of 0.5 in makes it 1,152 ÷ 6 = 192.

Panels

With panels the post spacing is the panel width: 96 ft in 8 ft panels is 12 panels on 14 posts. Measure the panel you will buy; panels sold as one width can differ by a little.

Gates

Gates are counted as their own line, at their own price. Their posts are already in the count, so do not add them again.

Then quote it

Press "Put this on an estimate" and the posts, rails, pickets or panels, and gates land on the estimate template, one line each at your prices. Fencing a yard as well? The sod calculator works out the lawn.

Questions

How do I calculate how many fence posts I need?

Take the gates off the length, divide by the post spacing and round up to whole sections; then add one post for each gate, one for each corner, and one to finish the line. A 100 ft fence with one 4 ft gate is 96 ft of fence; 96 ÷ 8 = 12 sections, so 12 + 1 + 1 = 14 posts.

How many pickets do I need for a fence?

Divide the length of fence by the width of a picket plus the gap between pickets, and round up. 96 ft is 1,152 in; with 5.5 in pickets and no gap that is 1,152 ÷ 5.5 = 209.45, so 210 pickets. With a 0.5 in gap it is 1,152 ÷ 6 = 192.

How many rails does a fence need?

Two or three per section, between each pair of posts. Twelve sections with two rails each is 24 rails; with three it is 36. Each rail spans one section, so it is about as long as the post spacing.

How many fence panels do I need?

Divide the length of fence by the width of a panel and round up: 96 ft of fence in 8 ft panels is 12 panels, on 14 posts with one gate. A panel cut short at the end still counts as a panel to buy.

Does the post count work for a fence with corners?

Each corner adds a post. The calculator treats the fence as one line, so a corner or a gate that falls part way through a section can need one post more than the count. Walk the line, or work out each straight side on its own. A fence that closes all the way round on itself needs one post fewer.