↑↓ to move ↵ to open Esc to close Browse all tools

Fence Calculator

Enter the length of each side of your fence and any gates to see how many posts, rails, pickets or panels and bags of concrete to buy, and what the materials cost.

Embed

Your fence

Fence style

Runs and gates

A run is one straight side of the fence, from corner to corner. Put each gate in the run it belongs to.

How the runs meet

Fence

ft For example 4 ft picket, 6 ft privacy
ft Check your fence kit, for example 6 or 8 ft
ft From the panel label
ft Width of the gate opening
in 3.5 in picket, 5.5 in for a 1×6
in 0 for privacy, about 2.5 in for pickets
Rails per section

Auto picks 2 rails up to about 4 ft, 3 up to about 6 ft and 4 above that.

Posts and concrete

in 3.5 in for a 4×4, 5.5 in for a 6×6
in Quikrete: about 3 times the post width
ft Quikrete: one third of the post height

Prices optional

$
$
$
$
$
Total fence length
0 linear ft

Runs on your device. Nothing you enter is sent to a server.

Saved you time? Buy me a coffee

Free printablePrintable Garden PlannerA bed layout grid, planting log and yearly garden task calendar.

Fence Calculator by Freebiefy, free online tools · Privacy · Legal notice

Embed this tool on your site

Paste this code into your page. The tool runs in the visitor's browser, free and without signup. The height adjusts to the content. All tools you can embed

How many fence posts you need

Measure the fence in runs. A run is one straight line between two corners or ends, and the total of all runs is the length in linear feet that fence suppliers ask for. Each run gets its own sections between posts. Rounding up matters here: a run of 50 ft at an 8 ft post spacing is 6.25 sections, so it needs 7 sections and 8 posts, with the posts sitting a little closer than 8 ft apart.

Sections in a run
⌈(run − gate widths) ÷ post spacing⌉ + gates
Posts in a run
sections + 1 + gates
Total posts
sum of runs − shared corners

Runs joined in a line share a corner post at every turn, so a fence of 3 runs shares 2 posts. A closed loop around a yard shares one more, because the last run ends on the first post. A gate opening takes no boards, but it needs a sturdy post on both sides. One of the two gate posts takes the place of a line post, so in practice each gate adds one post. Gate posts carry the weight of the gate, so check what your gate hardware asks for. A gate also splits its run in two pieces, and each piece rounds up to whole sections on its own, so the calculator adds one section per gate. That is the most you can need wherever the gate sits; if both pieces happen to divide evenly by the post spacing, you need one section and one post fewer.

Example: a privacy fence 6 ft high along three sides of a yard, with runs of 50, 100 and 50 ft and one 4 ft gate in the 100 ft run. The side runs get 7 sections and 8 posts each. The long run has 96 ft of fence, which is 12 sections, plus one section because the gate splits the run: with the gate after 50 ft, the pieces of 50 and 46 ft take 7 + 6 = 13 sections. With the gate that makes 13 + 1 + 1 = 15 posts. Together that is 8 + 15 + 8 − 2 = 29 posts, 2 of them gate posts, and 27 sections.

Pickets, privacy boards, rails and panels

For a picket fence or a privacy fence built from single boards, divide the length of fence in each run by the width of one board plus the gap. Gate openings are left out. A 1×6 board is 5.5 in wide under the US lumber standard, and the calculator starts pickets at 3.5 in. The lumber calculator lists nominal and actual sizes for other boards. Privacy fences have no gap, while pickets sit apart by a gap you choose. Rails run from post to post; on Auto the calculator uses 2 per section up to about 4 ft, 3 up to about 6 ft and 4 above, so follow your fence plan if it says otherwise. Buy rails at least as long as the post spacing. For a panel fence, every section is one panel, and the posts sit at the panel joints, so the panel width is the post spacing. Panels come with their rails built in.

Pickets or boards per run
⌈fence length ÷ (board + gap)⌉
Rails
rails per section × sections
Panels per run
⌈fence length ÷ panel width⌉

In the example, the 196 ft of fence takes 430 boards of 1×6 (110 + 210 + 110, counted run by run) and 81 rails, 3 for each of the 27 sections. The table below shows a single straight run with no gate, posts 8 ft apart and no spare boards added.

LengthPostsRails (3 per section)1×6 boardsPickets 3.5 in, 2.5 in gap80 lb bags
50 ft82111010013
100 ft143921920022
150 ft205732830031
200 ft267543740040
300 ft3911465560060

Post depth and concrete bags

Quikrete’s post-setting instructions call for a hole one third of the overall post height deep and about three times the diameter of the post, which is about 10 to 11 in for a 4×4. In cold areas your local code may ask for holes below the frost line. The post length to buy is the fence height plus that depth, so a 6 ft fence with 2 ft in the ground needs 8 ft posts. The concrete fills the round hole around the square post.

Concrete per post
(π × (hole ÷ 2)² − post²) × depth
Bags
⌈posts × concrete per post ÷ bag yield⌉

A 10 in hole 2 ft deep around a 4×4 (3.5 in wide) takes 0.92 cubic feet. Quikrete lists about 0.60 cu ft for an 80 lb bag and 0.45 for 60 lb of its Concrete Mix, and 0.375 for a 50 lb bag of its Fast-Setting Concrete Mix. In metric, a 25 kg bag at the same yield per kilogram makes about 0.012 m³. The 29 posts of the example need 26.7 cubic feet, which is 45 bags of 80 lb. For footings and slabs, the concrete calculator works out the volume of other shapes.

How to use the fence calculator

  1. 1Choose US units or metric and pick the style: picket, privacy boards or ready-made panels.
  2. 2Enter the length of each straight run and the number of gates in it, and add a run for every side. Then choose whether the runs are joined in a line, close a loop or stand apart.
  3. 3Set the fence height, post spacing or panel width, gate width and board size. Check the post size, hole and depth for the concrete.
  4. 4Read the posts, rails, pickets or panels and concrete bags. Enter the price of each item to see the cost of the materials, then copy the list or a link for the store.

Frequently asked questions

How many fence posts do I need?

Divide each straight run by the post spacing, round up and add one. A 100 ft run with posts 8 ft apart has 13 sections and needs 14 posts. Where two runs meet at a corner they share one post, so a U-shaped fence with sides of 50, 100 and 50 ft needs 8 + 14 + 8 − 2 = 28 posts. Each gate opening needs a post on both sides, which adds one post per gate in the calculator. A gate also splits its run in two pieces that each round up, so the calculator adds one section per gate to be safe.

How far apart should fence posts be?

Check the instructions of your fence kit or panels and any local rules. The calculator starts at 8 ft (2.5 m in metric), and a closer spacing makes a stiffer fence with shorter rails. For panel fences the panel sets the spacing, so enter the panel width from the label.

How many pickets do I need for 100 feet of fence?

With 3.5 in pickets and a 2.5 in gap, each picket takes 6 in, so 100 linear feet needs 200 pickets. A privacy fence of 1×6 boards, which are 5.5 in wide, with no gap needs 1,200 in ÷ 5.5 in = 218.2, so 219 boards. Gate openings need none. Buy a few spare boards for ones that are split or warped.

How much concrete do I need per fence post?

A 10 in hole that is 2 ft deep around a 4×4 post takes about 0.92 cubic feet of concrete. With the yields Quikrete prints for its Concrete Mix and Fast-Setting Concrete Mix, that is about 1.5 bags of 80 lb (0.60 cu ft each), 2 bags of 60 lb or 2.5 bags of 50 lb fast-setting mix (0.375 cu ft each). A 12 in hole 3 ft deep takes about 2.1 cubic feet, or 3.5 bags of 80 lb.

How deep should fence posts be set?

Quikrete’s post-setting instructions say the hole should be one third of the overall post height deep. A 9 ft post for a 6 ft fence then goes 3 ft into the ground. In cold areas the hole may need to reach below the frost line, and your local building department knows the depth for your area.