Skip to content

Fence Calculator

Find how many posts, rails, boards or panels your fence needs, how much concrete goes in the post holes, the screws and gate fittings, and what it will cost.

More options
Fence layout

Measure along the line the fence will follow, gates included.

Fence style

Above the ground.

Typical 6–8 ft (1.8–2.4 m).

Real width: a “1×6” board is typically 5.5 in (14 cm).

0 for a closed privacy fence.

Typical walk gate 3–4 ft (0.9–1.2 m).

Both leaves together. Typical 10–12 ft for a car.

Leave blank for the typical number for the height.

Boards on

Shadowbox: the gap is between boards on the same side.

Keeps boards off wet ground. Typical 2 in (5 cm).

A “4×4” post is typically 3.5 in (9 cm).

Typically about 3 times the post width.

Blank: a third of the height, at least 2 ft (61 cm). Go below the frost line where it freezes.

Often 4–6 in (10–15 cm) for drainage. The hole is dug this much deeper.

%

Added to boards, fabric and wire.

Show results in
Cost (optional)
$
$
$
$
$
$
$
$
ResultUpdates as you type—Posts—Rails—Boards—Bags of concrete—Concrete—Screws—Gate fittingsTop viewEndCornerGate postLine postPosts and lengths—End · corner · gate · line posts—Post length—Hole depth—Total length—Sections between posts—Actual post spacing—Gravel for the holes

How your fence is worked out

Take off the gates, split the rest into sections between posts, count the boards across it, then fill each post hole with concrete.

  1. 1

    Take off the gates

    100 ft − 1 × 4 ft= 96 ft of fence

  2. 2

    Sections and posts

    96 ÷ 8 → 12+ 1 run + 1 gate= 14 posts

  3. 3

    Count the boards

    1,152 in ÷ 5.5 in= 209.45 + 5%= 220 boards

  4. 4

    Concrete per hole

    0.92 cu ft × 14= 12.89 ÷ 0.6= 22 × 80 lb bags

Read more: the formulas, a worked example and typical sizes for posts, rails, holes and fittings

A fence is a line of posts with something fixed between them. The calculator takes the gates out of the length, splits what is left into sections no longer than your post spacing, and counts a post at both ends of every run and gate opening. Then it counts the rails, boards, panels, fabric or wire across that length, and works out the concrete that fills each post hole around the post.

The formula

fence length = total length − gate widths
sections in a run = fence length in that run ÷ post spacing, rounded up
panels: post spacing = panel width + post width · panels = sections
posts = sections + runs + gates − corner posts two runs share
rails = sections × rails per section
boards = fence length ÷ (board width + gap) × (1 + waste % ÷ 100), rounded up (× 2 for shadowbox)
hole depth (typical) = fence height ÷ 3, at least 2 ft · post length = fence height + hole depth
concrete per hole = (π × (hole width ÷ 2)² − post area) × (hole depth − gravel)
bags = concrete per hole × posts ÷ bag yield, rounded up
screws = boards × rails × screws per board + rails × 4
chain link rolls = fence length × (1 + waste %) ÷ roll length · wire = fence length × strands × (1 + waste %)

Worked example

A privacy fence 100 ft long and 6 ft high, with posts 8 ft apart and one 4 ft gate. The fence itself is 100 − 4 = 96 ft. That makes 96 ÷ 8 = 12 sections. Posts are 12 + 1 run + 1 gate = 14 posts: 2 end posts, 2 gate posts and 10 line posts. A 6 ft fence typically has 3 rails per section, so 12 × 3 = 36 rails about 8 ft long. Boards 5.5 in wide with no gap: 96 ft is 1,152 in, and 1,152 ÷ 5.5 = 209.45; with 5% waste that is 209.45 × 1.05 = 219.93, so 220 boards, cut to 6 ft − 2 in = 5 ft 10 in. The holes are 6 ÷ 3 = 2 ft (24 in) deep, so the posts are 6 + 2 = 8 ft long. Each 10 in hole around a 3.5 in square post holds (π × 5² − 3.5²) × 24 = (78.54 − 12.25) × 24 = 1,590.96 cubic inches, which is 1,590.96 ÷ 1,728 = 0.92 cu ft. For 14 holes that is 12.89 cu ft. An 80 lb bag makes about 0.6 cu ft, so 12.89 ÷ 0.6 = 21.48, or 22 bags. Screws: 220 × 3 rails × 2 = 1,320 for the boards, plus 36 × 4 = 144 for the rails, so 1,464 screws. The gate is over 5 ft tall, so it typically takes 3 hinges and a latch.

Typical sizes used

  • Post spacing: typically 6–8 ft (1.8–2.4 m) for wood, up to 10 ft (3 m) for chain link, 12 ft (3.7 m) or more for wire.
  • Rails per section: 2 under 5 ft (1.52 m), 3 from 5 to 7 ft (2.13 m), 4 above. Panel fences use the same number for brackets at each end.
  • Post holes: about 3 times the post width, and a third of the fence height deep with a minimum of 2 ft (61 cm). Go below the frost line where the ground freezes; local rules can ask for more.
  • Wood sizes are “nominal”: a 4×4 post is typically 3.5 × 3.5 in (89 mm), a 1×6 board 5.5 in (140 mm).
  • Concrete bag yield: about 0.6 cu ft (17 L) for an 80 lb bag, 0.45 cu ft for 60 lb, 0.3 cu ft for 40 lb, and about 11.7 L for a 25 kg bag. Check the bag label.
  • Post stock lengths: typically 6, 7, 8, 9, 10 and 12 ft, or 1.8, 2.1, 2.4, 2.7, 3.0 and 3.6 m.
  • Chain link: fabric in 50 ft (15 m) rolls, top rail in 21 ft pieces joined with sleeves. Each end and gate post takes 1 tension bar and each corner post 2; each bar takes about one tension band per foot of height minus one, plus a brace band and a rail end cup. Ties: one per foot of height on every line post and one every 2 ft along the top rail.
  • Wire fences: barbed wire typically comes in 1,320 ft (402 m) rolls; one staple per strand at every line post.
  • Gates: 2 hinges per leaf, 3 on gates taller than 5 ft, one latch per gate and a drop rod for each double gate.

These are rule-of-thumb figures; products, ground and local rules differ. Checked 11 October 2026.

Where the gates and posts go

The calculator puts each gate in the run with the most fence left, and assumes a gate sits inside a run, with its own two posts. If a gate sits right at a corner or the end of a run, it can share that post, so you may need one post fewer. Runs that join share a corner post; a fence that goes all the way round has no end posts.

Common questions

How many fence posts do I need?

Take the gate widths off the length, divide by the post spacing and round up to get the sections. Posts are the sections plus one for each run plus one for each gate, less any corner posts two runs share. A 100 ft fence with one 4 ft gate and posts 8 ft apart has 96 ÷ 8 = 12 sections, so 12 + 1 + 1 = 14 posts.

How far apart should fence posts be?

Wood privacy and picket fences typically have posts 6 to 8 ft apart (1.8 to 2.4 m). Panel fences put a post at every panel, so the spacing is the panel width plus one post. Chain link often goes up to 10 ft, and wire fences are often 12 ft or more apart. Closer posts make a stronger fence in windy places.

How deep should a fence post hole be?

A typical rule is a third of the fence height above ground, and at least 2 ft (61 cm). A 6 ft fence needs holes about 2 ft deep, so the posts are 8 ft long. Holes are usually about three times the post width. In cold places, go below the frost line, and check local rules before you dig.

How many bags of concrete per fence post?

Work out the hole volume and take away the post. A 10 in hole 24 in deep around a 3.5 in square post holds (π × 5² − 3.5²) × 24 = 1,590.96 cubic inches, or 0.92 cu ft. An 80 lb bag makes about 0.6 cu ft, so that is 1.53 bags a hole, and 22 bags for 14 posts.

How many fence boards or pickets do I need?

Divide the fence length without the gates by the board width plus the gap between boards, then add a little for waste. For 96 ft (1,152 in) of privacy boards 5.5 in wide with no gap, that is 1,152 ÷ 5.5 = 209.45 boards. With 5% waste you buy 220. Count the gate boards on top if you build the gate yourself.

How many rails does a fence need?

A typical wood fence has 2 rails per section when it is under 5 ft tall, 3 rails from 5 to 7 ft, and 4 above that. Multiply by the number of sections. A 6 ft fence with 12 sections needs 12 × 3 = 36 rails, each about as long as the post spacing.

Related calculators

Concrete calculatorSlabs, footings, columns, stairs and curbs: cubic yards or m³, bags, trucks, cost and mix.Deck calculatorDeck boards, joists, beams, posts, footings, screws or hidden clips and railing for a rectangle, L-shape or three-part deck, with a top-view plan and cost.Board foot & lumber calculatorBoard feet, cubic feet and m³ for a list of boards: inches, quarters (4/4, 8/4) or mm, nominal or actual sizes, linear feet, waste, cost per board foot, foot or m³, weight and a cut list.Gravel calculatorGravel, stone, sand, or topsoil for any shape: cubic yards or m³, tons or tonnes, bags, truck loads and cost.

Made by Zulu Calculator, part of AlphaZulu LLC. Formulas are shown in full and rule figures are checked against official sources; see how we build calculators.

Embed this calculator on your site

Free to use on your website or blog. Paste this code where you want the calculator to appear. Please keep the credit link.

Fence calculator by Zulu Calculator ↗