Fence Calculator

A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call

Free fence calculator. Find how many fence posts, rails and pickets you need for any length, with gates, post spacing and picket gaps.

Sections
0
Rails
0
Pickets
0
Fenced length
0

Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.

How to use the fence calculator

  1. Enter the total fence length in feet. Measure along the line where the fence will go, including the width of any gates.
  2. Enter the post spacing. Six or eight feet between post centres is common for wood fences; check the panel size if you're using prefabricated panels.
  3. Enter the number of rails per section, usually two for fences up to about 4 ft high and three for taller privacy fences.
  4. Enter the picket width and the gap between pickets in inches. For a privacy fence with no gaps, enter 0 for the gap.
  5. Enter the number of gates and the width of each gate.

The fence calculator shows how many posts, rails and pickets you need, the number of sections, and the fenced length after gates are taken out.

How the fence calculator works

  1. Fenced length = total length − (gates × gate width).
  2. Sections = fenced length ÷ post spacing, rounded up.
  3. Posts = sections + 1, plus one extra post for each gate (every gate needs a post on both sides, and one of those is already counted).
  4. Rails = sections × rails per section.
  5. Pickets = fenced length in inches ÷ (picket width + gap), rounded up.

For a 100 ft fence with one 4 ft gate, 8 ft spacing, 2 rails, 5½ in pickets and ½ in gaps:

  • Fenced length: 100 − 4 = 96 ft
  • Sections: 96 ÷ 8 = 12
  • Posts: 12 + 1 + 1 = 14
  • Rails: 12 × 2 = 24
  • Pickets: 96 × 12 ÷ (5.5 + 0.5) = 192

Post spacing

Common spacings are 6 to 8 ft. Closer spacing makes a stronger fence, which matters for:

  • Tall privacy fences that catch a lot of wind.
  • Heavy materials such as solid boards or composite panels.
  • Areas with strong winds or soft soil.

Rails sag over long spans, so 8 ft is usually the maximum for standard wood rails. If you're using ready-made panels, the post spacing is set by the panel width (for example, 6 ft or 8 ft panels).

Picket spacing

The picket count depends on the style:

  • Privacy fence (no gaps): pickets butted together, or overlapping in a shadowbox or board-on-board design. Board-on-board uses more pickets: roughly one and a half to two times as many as a single layer, depending on the overlap.
  • Picket fence with gaps: often 1.5 to 3 inches between pickets. Wider gaps use fewer pickets.
  • Pool and child safety fences: many codes limit gaps (for example to less than 4 inches) so children can't squeeze through. Check your local pool barrier rules.

Remember that "1 × 6" pickets are usually about 5½ inches wide in reality. Use the actual width in the fence calculator.

Concrete for posts

Most fence posts are set in concrete. A common guideline is to dig holes about three times the width of the post and a third to a half of the post's above-ground height deep (deeper in areas where the ground freezes, to get below the frost line). QUIKRETE's installation guidance suggests a hole depth of one third of the overall post length. Use the concrete calculator with "Round column" selected to work out how many bags you need for all the posts.

Other materials

  • Post caps to protect the tops of wood posts.
  • Gate hardware: hinges, latches and a drop rod for double gates.
  • Fasteners: galvanized or stainless nails or screws, which won't rust and stain the wood.
  • Gravel at the bottom of each post hole for drainage.
  • Stain or sealer for wood fences.

Measure the total length in linear feet if you're buying materials such as panels or chain link sold by the foot.

Before you build

  • Check property lines. A survey or your property plat shows where the boundary is. Building a little inside your line avoids disputes.
  • Check local rules and permits. Many towns limit fence height (often lower in front yards) and require permits. Homeowner associations may have their own rules on style and colour.
  • Call before you dig. In the US, dial 811 a few days before digging so utility lines can be marked.
  • Talk to your neighbours, especially if the fence is on a shared boundary.

Corners and multiple runs

The fence calculator assumes a single straight run. For an L-shaped or U-shaped fence, calculate each straight side separately, then subtract one post for each shared corner (each corner post is counted at the end of one run and the start of the next). Corner and gate posts often need to be larger or set deeper, because they carry more load.

A worked example

Jordan is fencing three sides of a back garden: two 60 ft sides and one 40 ft back, with one 4 ft gate on the back. It will be a 6 ft privacy fence with 8 ft spacing, 3 rails, and 5½ in pickets with no gaps.

  • Side 1 (60 ft): 60 ÷ 8 = 7.5, so 8 sections, 9 posts, 24 rails, 60 × 12 ÷ 5.5 = 131 pickets.
  • Side 2 (60 ft): the same: 8 sections, 9 posts, 24 rails, 131 pickets.
  • Back (40 ft with a 4 ft gate): 36 ft fenced, 36 ÷ 8 = 4.5, so 5 sections, 7 posts (6 + 1 for the gate), 15 rails, 36 × 12 ÷ 5.5 = 79 pickets.

The two back corners share posts with the sides, so Jordan subtracts 2: 23 posts, 63 rails and 341 pickets, plus a few spare pickets for damaged boards.

Who uses a fence calculator

Homeowners use it to price DIY fences and check contractor quotes. Fence installers use it to estimate materials. Landscapers, farmers and property managers use it for boundaries, paddocks and pool areas.

Get the next job from Google

Homeowners search Google when something breaks. Search ads put a local trade business at the top of those searches. DeepRit manages Google Ads for small and mid-size businesses, and only Google Ads. We check your account before we ever get on a call, then fix the structure, the keywords, the tracking and the ads, with month-to-month terms and no long contract. Book a free audit call.

Fence materials compared

Material Typical lifespan Notes
Pressure-treated pine 10 to 20 years Affordable; needs staining or sealing
Cedar or redwood 15 to 30 years Naturally rot-resistant; attractive
Vinyl (PVC) 20 to 30 years Low maintenance; higher upfront cost
Composite 20 years or more Low maintenance; heavy
Chain link 15 to 20 years Economical for boundaries and security
Metal (steel or aluminium) 20 years or more Durable and decorative

Lifespans depend heavily on climate, installation and maintenance. Vinyl, composite and metal systems usually come as panels with set post spacings, so use the panel width as the post spacing in the fence calculator.

Wire and livestock fences

Farm and garden fences made of wire mesh or strands are calculated slightly differently. Posts are often spaced 8 to 12 ft apart (wider for some high-tensile systems), with stronger braced posts at corners, ends and gates. The amount of wire is the fence length × the number of strands (or the length of mesh rolls needed), plus extra for wrapping around end posts. Check the manufacturer's guidance for the spacing and tension of the system you choose.

Estimating the cost of a fence

Once the fence calculator gives you the counts, multiply each by its price: posts, rails, pickets or panels, concrete, fasteners, gates and hardware. Add tool hire (such as a post-hole auger), delivery and, if you're hiring a contractor, labour. Fencing is often quoted per linear foot installed; dividing a quote by the fence length lets you compare quotes fairly.

Sloping ground

On a slope, a fence can either follow the ground (racked), with rails parallel to the slope, or be stepped, with each section level and the bottom stepping down. Stepped fences leave triangular gaps under each section that may need filling. Measure the length along the ground for materials, and expect taller posts on the downhill side of each step. Corners and steep changes in level may need extra posts, so add them to the counts from the fence calculator.

Before you order

Double-check the total length, gate positions and post spacing on a simple sketch before ordering. Small mistakes in measuring are much easier to fix on paper than at the lumber yard.

Sources and further reading

  • Fence on Wikipedia: types of fences and their uses.
  • Utility location on Wikipedia: utility-locating services such as the US 811 number.

Frequently asked questions

How many fence posts do I need?

Divide the fence length by the post spacing, round up, and add one. Add one more for each gate.

How far apart should fence posts be?

Usually 6 to 8 feet. Use closer spacing for tall, heavy or wind-exposed fences.

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

With 5½ inch pickets and ½ inch gaps, 200 pickets (1,200 inches ÷ 6). With no gaps, about 219.

How many rails does a fence need?

Two rails for fences up to about 4 ft high, and three for taller privacy fences.

How deep should fence posts be?

Often about a third to a half of the post's above-ground height, and below the frost line in cold climates.

Is the fence calculator free?

Yes. It's free, needs no sign-up, and works in your browser.

Free PPC audit

See where your ad budget leaks.

We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.

Book a free audit call 30-minute call · Free · The audit is yours to keep