Start calculating

Fence Calculator

Last reviewed: November 11, 2026. Formulas checked against standard industry conversions. How we calculate.

Fence Calculator

Estimate the panels, posts, pickets, rails, concrete and cost for your fence. Enter your fence length and height to get a materials list in seconds.

0 sq ft of fence
  • Fence sections–
  • Panels–
  • Pickets–
  • Rails (8 ft)–
  • Posts–
  • Concrete needed–
  • Gate hardware sets–
  • Estimated cost–

Estimate only. Gates, special hardware, caps and permits may cost extra.

How to Calculate How Many Fence Panels You Need

  1. Measure the total length of the fence line in feet.
  2. Subtract the width of any gates.
  3. Divide by the panel width and round up.
Panels = (fence length − gate widths) ÷ panel width, rounded up

Example: 100 ft of fence with one 4 ft gate and 8 ft panels: (100 − 4) ÷ 8 = 12 panels.

How Many Fence Posts Do I Need?

Count each panel and each gate as a section. A straight fence with two ends needs one more post than it has sections. A closed loop needs the same number of posts as sections, because the last section joins the first post.

Posts = sections + 1 (open run) | Posts = sections (closed loop)

Example: 12 panels + 1 gate = 13 sections, so an open run needs 14 posts. Corners use one post each, so they don’t add posts.

Fence Post Length by Fence Height

Bury at least 2 ft of the post, or about one-third of the fence height, whichever is more.

Fence heightRecommended post length
3 ft6 ft
4 ft6 ft
5 ft8 ft
6 ft8 ft
8 ft12 ft

Frost depth and local code may require deeper holes, so check your area before you dig.

Wood Fence Material Calculator: Pickets and Rails

If you build the fence yourself instead of using panels, divide the fence length in inches by the picket width plus the gap, then round up.

Pickets = fence length in inches ÷ (picket width + gap)

Example: 100 ft of privacy fence with 5.5 in pickets and no gap: 1,200 ÷ 5.5 = 218.2, or 219 pickets, plus 5% for waste.

Fences up to 4 ft tall normally use 2 rails per section. Taller fences use 3. The calculator converts rail length into 8 ft boards.

How Much Concrete Do I Need for Fence Posts?

The calculator assumes a 10 in wide hole around a 4×4 post, filled with concrete to the depth the post is buried. For a 6 ft fence, one post takes about 0.9 cubic feet, or roughly 2.5 bags of 50 lb mix. For larger bag sizes, see our concrete calculator.

Fence Square Footage and Cost Estimate

Fence square footage is the length times the height. A 100 ft fence at 6 ft is 600 square feet of fence face. Fence cost is usually quoted per linear foot, so the calculator multiplies your total length by the price you enter. The material presets are starting points only, so replace them with quotes from your area.

Common Fence Panel Measurements

Fence heightCommon panel widthCommon use
3-4 ft6-8 ftFront yard, garden, pool barrier (check local rules)
5 ft6-8 ftSemi-private backyard
6 ft6 or 8 ftPrivacy fence
8 ft8 ftExtra privacy, where permitted

Actual panel sizes vary by maker, so measure the panels you plan to buy and update the width in the calculator.

Before You Build

  • Find your property line before you set posts, and check your HOA and permit rules.
  • Have buried utility lines marked before you dig. In the US, call 811.
  • Buy a few extra pickets or rails for cuts and mistakes.
  • Use heavier posts at gates, since they carry the gate’s weight.
  • Measuring an odd-shaped yard? See how to figure out square feet.

Fence Calculator FAQs

How do I calculate how many fence panels I need?

Subtract gate widths from the total length, divide by the panel width, and round up.

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

With 8 ft panels, 13 panels and 14 posts for a straight run. For a closed loop, posts equal sections.

How long should fence posts be for a 6 foot fence?

Use 8 ft posts, with about 2 ft in the ground.

How many pickets do I need per linear foot?

About 2.2 with 5.5 in pickets and no gaps.

How much concrete do I need per fence post?

About 0.9 cubic feet, or roughly 2.5 bags of 50 lb mix, for a 10 in wide, 2 ft deep hole.

Want the dollars? Use the Fence Cost Calculator to estimate materials and installed cost by fence type, including gates.

Concrete for Fence Posts

Each post hole typically takes about 2 cubic feet of concrete, so multiply that figure by your post count to get a total before waste. A standard hole is about 1.96 cubic feet, roughly four 60 lb bags, although deeper holes and softer ground will use more. Use the Post Hole Calculator to size each hole for your post height and soil, then convert the total with the Concrete Bag Calculator. Buy a few extra bags for uneven holes, and check frost depth and local code before you dig.

Picket Fence

Use the page’s picket math: Pickets = fence length in inches divided by (picket width + gap). Round up and add spares for cuts and mistakes.

With the calculator’s privacy defaults, 5.5 in pickets and no gap, a full 100 ft fence is 1,200 inches: 1,200 divided by 5.5 = 218.2, rounded up to 219 pickets before waste or spares. The calculator’s own 220-picket result for its 100-ft default also subtracts the 4-ft gate first and then applies its default 5% waste allowance.

With a gap, the count falls. For example, a 100-ft fence is 1,200 inches; with 6-inch pickets and a 1-inch gap, each picket takes 7 inches, so 1,200 divided by 7 = 171.4, rounded up to about 172 pickets, before any gate deduction or waste allowance. Round up and add spares.

Fence Post Depth

Bury one-third of the fence height, with a minimum of 24 inches, and always go below the local frost line.

Fence heightPost depth
4 ft24 in minimum
5 ft24 in minimum (20 in by the one-third rule, so the 24-in minimum governs)
6 ft24 in
7 ft28 in
8 ft32 in

All depths above are subject to going below the local frost line, and frost depth and local code may require deeper holes.

A note on concrete per post: the two figures on this page use different hole assumptions, so use one method consistently. The calculator FAQ figure of about 0.9 cubic feet per post is for the calculator’s stated hole, a 10 in wide, 2 ft deep hole around a 4×4 post. The about 2 cubic feet figure (about 1.96 cubic feet) in the Concrete for Fence Posts section is a larger standard-hole planning figure, not the same hole. Use about 0.9 cubic feet per post for the calculator’s hole, or about 2 cubic feet per post for the larger standard-hole planning figure.

Chain Link Fence Materials

For a chain link fence, use the calculator’s post and section counts as the starting point, then add the mesh and fittings that a chain link fence needs. Each section needs line posts, with heavier terminal, corner and gate posts at the ends, corners and gates. Add one top rail per section, plus chain link mesh (fabric) for the full fence length, tension wire along the bottom, tie wires, rail end caps and post caps. Gate sections also need gate hardware sets, which the calculator counts separately.

How many chain link posts and rails do I need?

Count posts and sections the same way as for a panel fence: sections are the fence length divided by the post spacing, rounded up, plus one post for an open run. For example, 100 ft of fence at 8 ft post spacing gives 13 sections and 14 posts for an open run. The mesh is then the fence length less any gate widths, and the top rail length matches that same run length.

Split Rail Fence Materials

For a split rail fence, use the calculator’s post and rail counts, but with rails instead of panels or mesh. Each section needs posts at the spacing you enter in the calculator, and 2 rails per section for fences up to 4 ft tall or 3 rails per section for taller fences, following the calculator’s rail rule. There are no pickets and no mesh to count. Gate sections need gate posts and gate hardware, and a split rail fence normally uses a matching rail gate rather than a solid panel gate.

How many split rails do I need?

Multiply the number of sections by the rails per section. For example, 100 ft of fence at 8 ft spacing gives 13 sections, so a 2-rail fence needs 26 rails and a 3-rail fence needs 39 rails, before waste. Add the waste percentage in the calculator for cuts and damaged rails.

For the full post-depth chart, see How Deep Should a Fence Post Be? on the Fence Post Concrete Calculator, which gives post lengths and hole depths by fence height.

Related calculators and guides

For sloped fences, see how to calculate upper and lower fence lines.

Gear Up for the Job: Our Product Picks

Hand-picked tools and gifts matched to this kind of project, each with honest pros and cons:

Or browse the full shelf: all Product Picks.

Ready to calculate?

Start with your measurements and get a material estimate in seconds.

Explore all calculators