Fence Calculator

Run 1

Sample shape, not to scale.

No result yet. Enter length and post spacing.

Posts, sections and concrete

This counts materials for buying. It does not set post depth for frost, wind or soil, gate hardware, or local fence rules and permits. Ask a fence contractor or your local building department.

How the runs meet

In order: each run or gate starts where the one before it ends, and the two share the post there, as at a corner. Closed loop: the last one also meets the first. Separate: no posts are shared.

Quick choices

Centre to centre of the posts, the longest one section may be. Wood panels sold as 8 ft wide (The Home Depot lists 96 in actual; Lowe's the same nominal size) and chain-link line posts, which Master Halco and Lowe's say should be no more than 10 ft apart. The posts add their own width to a panel, so check your panel's installation guide.

Optional; enter it to get the post length. Quikrete and Sakrete both put about 1/3 of the post's length in the ground, so post length = height ÷ (1 − 1/3). Posts are sold in set lengths: buy the next length up. Frost depth, wind and soil can call for a deeper post; ask your building department.

Optional; enter both to count concrete. Quikrete and Sakrete give the same rule of thumb: a hole about 3 times the width of the post, and about one third of the post's length deep (see the table below the examples). Frost depth, wind and soil can call for more; ask your building department.

Starts at 10%, the top of the 4% to 10% that NRMCA, the ready-mix industry association, says to order over the plan dimensions. That is one source, so treat 10% as a starting value and change it to suit the job.

Bag size

Optional. Common wood pickets are 5.5 in wide, as The Home Depot and Lowe's list them. No usual gap was found in the sources: enter the gap you want, 0 for pickets edge to edge.

Picket style

A style fills in the gap and overlap as a starting point, not a standard: fences differ by product, and no source gives one gap or overlap for all of them. Change both to your design. Overlap is for shadowbox and board-on-board, where pickets alternate sides of the rails and each overlaps the next.

Optional. No source confirmed a rule such as 2 rails for a 4 ft fence and 3 for 6 ft: count the rails on your design or panel.

Optional. Each price is multiplied by its own count.

Embed this calculator

Paste this code into your page. The calculator works inside the frame, with a link back to this page under it.

How the fence materials are counted

Measure each straight run of fence along the ground, from the centre of the first post to the centre of the last, and enter it as a run. A fence on three sides of a yard is three runs. Enter them in order around the fence: each run starts where the one before it ended, and the two share the post at that corner, so the calculator counts it once. A gate is entered the same way, as an opening of its width in its place in the order. If the last run comes back to the first, choose Closed loop; if the runs do not touch, choose Separate.

Divide each run by the post spacing and round up. That is the number of sections, and a short last section counts as a whole one. Posts are the sections plus one for each run, and two for each gate, one on each side; then one post comes off for every place where two of them meet.

For pickets, divide the run by the width of one picket plus the gap after it, less any overlap, and round up. Rails are the panels times the rails each section gets, which you count on your design.

For the post length, divide the fence height by two thirds: a third of the post goes in the ground, as Quikrete and Sakrete both suggest. A 6 ft fence takes a 9 ft post. Buy the next length up that is sold.

For concrete, work out the volume of one hole as a cylinder, multiply by the number of posts, add the waste allowance and divide by what one bag yields, rounding up to a whole bag. The hole is measured as dug, with no allowance for the post inside it, so you will likely have a little mix left.

The count is for buying. How deep the posts go for frost, wind and soil, which gate hardware to use, and what your town allows for height, setbacks or permits are questions for a fence contractor or your local building department.

Examples

One straight run with pickets: 64 ft

  1. Sections: 64 ft ÷ 8 ft, rounded up = 8 sections
  2. Posts: 8 sections + 1 = 9 posts
  3. Pickets: 64 ft ÷ (5.5 in + 0.5 in), rounded up = 128
  4. Concrete per hole: π × (10 in ÷ 2)² × 24 in = 1.09 cu ft = 0.0309 m³
  5. Concrete for all posts: 9 posts × 1.09 cu ft = 9.8 cu ft = 0.36 cu yd
  6. With 10% waste: 9.8 cu ft + 10% = 10.8 cu ft = 0.40 cu yd
  7. 80 lb bags of concrete: 10.8 cu ft ÷ 0.60 cu ft per bag, rounded up = 18

9 posts 8 sections. Pickets: 128. 80 lb bags of concrete: 18.

Three sides of a yard with a 4 ft gate, 6 ft high, with rails and prices: Run 1: 50 ft; Run 2: 100 ft; Run 3: 46 ft; Gate 4: 4 ft

  1. Run 1 sections: 50 ft ÷ 8 ft, rounded up = 7 sections
  2. Run 1 posts: 7 sections + 1 = 8 posts
  3. Run 2 sections: 100 ft ÷ 8 ft, rounded up = 13 sections
  4. Run 2 posts: 13 sections + 1 = 14 posts
  5. Run 3 sections: 46 ft ÷ 8 ft, rounded up = 6 sections
  6. Run 3 posts: 6 sections + 1 = 7 posts
  7. Gate 4: 4 ft opening, a post on each side = 2 posts
  8. Total posts: 8 + 14 + 7 + 2 − 3 shared = 28 posts
  9. Post length: 6 ft ÷ (1 − 1/3) = 9 ft (3 ft in the ground)
  10. Rails: 26 panels × 2 rails = 52
  11. Concrete per hole: π × (10 in ÷ 2)² × 24 in = 1.09 cu ft = 0.0309 m³
  12. Concrete for all posts: 28 posts × 1.09 cu ft = 30.5 cu ft = 1.13 cu yd
  13. With 10% waste: 30.5 cu ft + 10% = 33.6 cu ft = 1.24 cu yd
  14. 80 lb bags of concrete: 33.6 cu ft ÷ 0.60 cu ft per bag, rounded up = 56
  15. Cost: 28 × $25.00 + 26 × $70.00 + 56 × $6.50 = $2,884.00

28 posts 26 sections. Rails: 52. 80 lb bags of concrete: 56. Post length, at least: 9 ft, 3 ft in the ground. Gates: hinge and latch sets: 1. Estimated cost: $2,884.00.

A closed garden fence, shadowbox pickets: Run 1: 20 ft; Run 2: 12 ft; Run 3: 20 ft; Run 4: 12 ft

  1. Run 1 sections: 20 ft ÷ 8 ft, rounded up = 3 sections
  2. Run 1 posts: 3 sections + 1 = 4 posts
  3. Run 2 sections: 12 ft ÷ 8 ft, rounded up = 2 sections
  4. Run 2 posts: 2 sections + 1 = 3 posts
  5. Run 3 sections: 20 ft ÷ 8 ft, rounded up = 3 sections
  6. Run 3 posts: 3 sections + 1 = 4 posts
  7. Run 4 sections: 12 ft ÷ 8 ft, rounded up = 2 sections
  8. Run 4 posts: 2 sections + 1 = 3 posts
  9. Total posts: 4 + 3 + 4 + 3 − 4 shared = 10 posts
  10. Run 1 pickets: 20 ft ÷ (5.5 in + 0 in − 1 in), rounded up = 54
  11. Run 2 pickets: 12 ft ÷ (5.5 in + 0 in − 1 in), rounded up = 32
  12. Run 3 pickets: 20 ft ÷ (5.5 in + 0 in − 1 in), rounded up = 54
  13. Run 4 pickets: 12 ft ÷ (5.5 in + 0 in − 1 in), rounded up = 32
  14. Total pickets: 54 + 32 + 54 + 32 = 172

10 posts 10 sections. Pickets: 172.

Posts and post concrete by run length: 8 ft spacing, holes 10 in across and 24 in deep, 80 lb bags, 10% waste

Shape and sizeFence posts80 lb bags of concrete
Fence run: 32 ft5 posts10
Fence run: 48 ft7 posts14
Fence run: 64 ft9 posts18
Fence run: 100 ft14 posts28
Fence run: 150 ft20 posts40
Fence run: 200 ft26 posts52

Runs and gates are taken in the order entered, each starting where the one before ends: they share the post where they meet. Concrete is the volume of each hole as dug; the post takes up some of it, so the bag count is a little high. Yield used: 0.60 cu ft per 80 lb bag.

Sizing a post hole

Questions

Does this tell me how deep my fence posts must go?

Only as a rule of thumb for buying. Enter the fence height and it gives a post length with about a third of the post in the ground, the rule Quikrete and Sakrete both print. It does not set post depth for frost, wind or soil, does not choose gate hardware, and does not check local fence rules, height limits or permits. Ask a fence contractor or your local building department, then enter the hole size they give you.

How long do my fence posts need to be?

Height above the ground ÷ (1 − 1/3), so that a third of the post is in the ground. A 6 ft fence needs a post at least 9 ft long, 3 ft of it buried. Posts are sold in set lengths, so buy the next length up that your store has. If your building department asks for a deeper hole, for frost for example, add the extra depth to the post.

How many fence posts do I need?

Divide the length of each run by the post spacing and round up to get the sections; add one post for the far end. A 64 ft run at 8 ft spacing is 8 sections and 9 posts. Enter the runs in order around the fence. Where one ends and the next begins, at a corner, they share a post, and the calculator takes it off. Pick Closed loop when the last run comes back to the first, or Separate when the runs do not touch.

What post spacing should I use?

The spacing of the fence you are buying. Wood panels at The Home Depot and Lowe's are sold 8 ft wide, and Master Halco and Lowe's both say chain-link line posts should be no more than 10 ft apart, so those two are offered as quick choices. Vinyl and other systems differ by product; no spacing that fits every fence was found, so use the one in your installation guide.

How many pickets do I need?

Run length ÷ (picket width + gap), rounded up. Common wood pickets are 5.5 in wide at both The Home Depot and Lowe's. With a 0.5 in gap a 64 ft run, 768 in, takes 768 ÷ 6 = 128 pickets. No usual gap was found in the sources, so the gap is yours to enter; type 0 for pickets edge to edge.

How many rails per section?

The calculator does not assume a number. The rule often repeated, 2 rails for a 4 ft fence and 3 for a 6 ft one, was not confirmed by two independent sources. Count the rails on your design or panel and enter that.

How is a gate counted?

Add a run, set it to Gate and enter the width of the opening, in its place in the order. A gate has a post on each side, shared with the run before and after it, and no section, panel or rails. Pickets are counted over its width, as a gate built to match the fence uses about the same. Each gate adds one set of hinges and a latch to the list, as a count; which hardware, and whether the gate posts need to be heavier, depends on the gate, so ask your supplier.

What do the picket styles do?

They fill in the gap and the overlap as a starting point, which you then change to your design. Privacy sets pickets edge to edge, Spaced pickets a 2.5 in gap, and Shadowbox / board-on-board a 1 in overlap, where pickets alternate sides of the rails and each covers the edge of the next. None of these is a standard; no source gives one gap or overlap for every fence. Pickets = run ÷ (width + gap − overlap), rounded up.

How much concrete does each post need?

The calculator takes the hole as a cylinder, π × (diameter ÷ 2)² × depth, multiplies by the number of posts, adds the waste and divides by the yield of the bag you pick. The post fills part of the hole, so the count is a little higher than what you will pour. Quikrete and Sakrete both suggest a hole about 3 times the post's width and about a third of the post's length deep; the table under the examples has the details and sources.

Why not use the bag table on the post mix package?

Those tables belong to one product and one hole size, and different products give different ones. The calculator uses the yield of the concrete bag you choose, the same figures as the other concrete tools here, so it does not mix one maker's table with another's bag.

Related tools

Sources

Sections, posts, pickets, rails and gates are plain arithmetic on your entries, and the concrete is the volume of a cylinder. The post length puts a third of the post in the ground, the rule printed by both Quikrete and Sakrete. The quick post spacings rest on two sources each, 8 ft wood panels at The Home Depot and Lowe's and the 10 ft chain-link maximum from Master Halco and Lowe's, and the 5.5 in picket width on The Home Depot and Lowe's listings. Bag yields are from Quikrete and Sakrete, the post hole sizing rule from Quikrete and Sakrete, and the 10% starting waste from NRMCA. Gap, overlap, rails, gates and hole size are yours to enter; the picket styles only fill in a starting gap and overlap. The unit definitions are from NIST.

Methodology and sources

Last reviewed: October 8, 2026