Fence Calculator

This fence calculator divides the fence length (minus gates) by the post spacing to get sections, then adds one post to close the run and one for each gate and corner. From the sections it counts rails and pickets or panels, and it works out the concrete for each post hole after subtracting the post itself.

Reviewed by CostPulse HubLast updated

Fence line and style

Imperial units
ft
ft
ft
For panels, use the panel width plus one post.
ft
Where the fence changes direction; each adds a post. Both end posts are already counted.
in
in
%

Prices (optional)

each
Example price, edit to match your area
each
Example price, edit to match your area
each
Example price, edit to match your area
per bag
Example price, edit to match your area
More options
in
in
Often a third of the post length; check your frost depth.
in
A 4×4 post is 3.5 in actual.
Example prices: US (USD) — edit to match your area

Starting prices for the United States in USD. All other starting prices are example prices: round planning values, not quotes or averages. Prices change by store, area and season, so edit them to match your area.

Your estimate

Results update as you type.

Posts
14 posts
Sections between posts
12
Rails and pickets, or panels
40 rails, 212 pickets
Concrete for posts
24 × 80 lb bags (0.92 cu ft per post)
Post length to buy
8 ft (6 ft above ground)
Estimated cost
$1,328.00

Shopping list

ItemQuantityCost
Posts14 × 8 ft$210.00
Rails40$320.00
Pickets212$636.00
PanelsNot used—
Concrete bags24 × 80 lb bags$162.00
TotalFence materials$1,328.00

How to use the fence calculator

  1. Choose pickets on rails or ready-made panels.
  2. Enter the total fence length along every side, the fence height and the post spacing. For panels, use the panel width plus one post.
  3. Enter the number of gates and their width, and count every corner where the fence changes direction. The two end posts are already included, so do not add them again.
  4. For picket fences, set the rails per section and the picket width and gap.
  5. Check the hole size and post size under More options, pick a concrete bag size and add prices.

How the materials are worked out

Sections = (fence length − gates × gate width) ÷ post spacing, rounded up
Posts = sections + 1 + gates + corners
Rails = sections × rails per section × (1 + waste %)
Pickets = fence length without gates ÷ (picket width + gap) × (1 + waste %)
Concrete per post = π × (hole diameter ÷ 2)² × depth − post width² × depth

The “+ 1” closes the run, so a straight fence already has both end posts. Adding one post per gate and corner is a simple, slightly generous rule, because every gate and turn breaks the run into separate stretches. For a fence that closes on itself, such as a full enclosure with no free ends, subtract one post. Post length is the fence height plus the hole depth.

Worked example

A 100 ft picket fence, 6 ft high, posts 8 ft apart, one 4 ft gate, a straight run with no corners, three rails per section, 5.5 in pickets with 0.5 in gaps, 10% extra, and 10 in holes 24 in deep for 4×4 posts:

  1. Fence without the gate: 100 − 4 = 96 ft, so 96 ÷ 8 = 12 sections.
  2. Posts: 12 sections + 1 to close the run (this covers both ends) + 1 for the gate = 14 posts, each 8 ft (6 ft above ground).
  3. Rails: 12 × 3 × 1.10, and pickets: 96 ft ÷ 6 in × 1.10, which gives 40 rails, 212 pickets.
  4. Each hole holds 0.92 cu ft of concrete around the post, so the job takes 24 × 80 lb bags (0.92 cu ft per post).
  5. At the example prices the materials come to $1,328.00.

Load this example into the calculator

Tips and common mistakes

  • Confirm the boundary first. Check your property line, any homeowners’ association rules and whether the good side must face out.
  • Call before you dig. In the US call 811, in Canada use Click Before You Dig, and in the UK check LinesearchbeforeUdig before excavating.
  • Dig deep enough. A common guide is a hole about three times the post width and about a third of the post length deep. In cold areas, go below the frost line so posts are not heaved.
  • Height limits and permits: many towns limit front and back fence heights and require a permit above a certain height.

US, UK and Canada differences

In the US and Canada, wood fences commonly use 4×4 posts at 6 to 8 ft spacing with 2×4 rails, and posts are often set in concrete. In the UK, panel fencing is typical: 6 ft (1.83 m) wide panels between timber or concrete posts, often with gravel boards at the bottom. Building rules differ too; in England, for example, fences above 2 m generally need planning permission, so check your local rules.

Metric units and other countries

In metric mode, lengths are in metres, picket sizes in centimetres and concrete bags in kilograms. Masonry boundary walls are more common than timber fences in Pakistan, India and the Gulf; for those, the length and post count here still help, but the wall itself needs a mason’s estimate. Type your local prices for each item.

Frequently asked questions

Results are estimates for planning only. Get written quotes from licensed contractors, check product labels, and follow your local building codes. See our disclaimer.