Home & Garden

Fence Calculator

Enter your fence's length, height, type and gates, and get a materials list with posts, rails, boards or panels, bags of concrete and an estimated cost.

Your numbers

Sides

Connected sides share corner posts. One straight run = 1

ft
ft
ft
ft
ft

Max; vinyl = panel width; chain link ≤ 10 ft

ft
in

A 1×6 is 5½ in wide

Post holes and concrete
Hole size

3 × post width across; ⅓ of the height + 6 in of gravel deep

Prices (editable examples, Nov 2026)
$
$
$
$
$

Fence materials

Estimated material cost

$2,807

150 ft of 6 ft wood privacy fence with 1 gate, at the example prices.

Posts

22

20 sections, 8 ft max spacing

Concrete

51 bags

60 lb, about 2.32 per post

  • Posts (22)$484
  • Rails (60)$540
  • Boards (319)$1,276
  • Concrete (51 × 60 lb)$357
  • Gates (1)$150
  • Total$2,807
Rails
60
3 per section, 2×4 × 8 ft
Fence boards
319
6 ft tall, 5.5 in wide
Post holes
10.5 × 30 in
Diameter × depth, QUIKRETE rule
Cost per foot
$18.71
Over 150 ft including gates

Before you dig, call 811 to have utility lines marked, check your frost line (posts should sit below it) and confirm any HOA or local height limits.

How the materials are worked out

  1. Fence length: 40 + 70 + 40 = 150 ft − 1 × 4 ft of gate = 146 ft of fence
  2. Sections: each run ÷ 8 ft, rounded up (the gate split the 70 ft side into 2 runs of 33 ft) = 20 sections
  3. Posts: 20 sections + 1 gate + 1 = 22 posts
  4. Rails: 20 sections × 3 = 60 rails
  5. Boards: 146 ft × 12 ÷ (5.5 in) = 319
  6. Concrete per hole: (π × (10.5 ÷ 2)² − 3.5²) × (30 − 6 in gravel) = 1.03 cu ft; × 22 posts = 22.72 cu ft ÷ 0.45 = 51 bags of 60 lb
  7. Cost: $484 + $540 + $1,276 + $357 + $150 = $2,807

Runs of fence between end, corner and gate posts

RunLengthSectionsPost spacing
140 ft58 ft
233 ft56.6 ft
333 ft56.6 ft
440 ft58 ft
Total146 ft20

How to use this calculator

  1. Choose the fence type: wood privacy (boards butted together), wood picket (spaced boards), vinyl panels or chain link.
  2. Choose how many sides the fence has and enter each one’s length. Sides are connected, so they share their corner posts; for a backyard, the house is usually the fourth side.
  3. Enter the height, the maximum post spacing, and the number and width of gates.
  4. For wood, the rails per section are picked automatically from the height, and you can set the board or picket width and gap.
  5. Under Post holes and concrete, keep QUIKRETE’s hole-size rule or enter your own, and pick the bag size.
  6. Edit the example prices to match your local store.

The result shows the estimated material cost with a breakdown, the number of posts and the bags of concrete, then the rails and boards (or panels, or chain-link fabric). The table lists each straight run between end, corner and gate posts, with the actual post spacing.

How the materials are worked out

Posts. The fence is a set of straight runs. Each side is a run, and gates go in the longest side, splitting it into equal runs on each side of the gate. Each run needs its length divided by the spacing, rounded up, in sections. Because connected sides share corner posts and each gate adds one post:

posts=∑runs⌈run lengthspacing⌉+gates+1

Rails and boards. Rails are sections × rails per section. Boards are the fence length (without the gate openings) in inches divided by the board width plus any gap. Vinyl uses one panel per section. Chain link needs top rail and fabric for the whole fence length, and its posts split into terminal posts (ends, corners and both sides of each gate) and line posts between them.

Concrete. QUIKRETE’s instructions for setting posts call for a hole three times the post’s width, as deep as one-third to one-half of the post’s height above ground plus 6 inches, with 6 inches of gravel in the bottom. The calculator uses the one-third minimum. The concrete fills the hole above the gravel, less the space the post takes up, and bags come from QUIKRETE’s yields: 0.30, 0.45 and 0.60 cubic feet for 40, 60 and 80 lb bags of Concrete Mix.

Worked example

The default is a 6 foot wood privacy fence around three sides of a yard, 40 + 70 + 40 feet, with one 4 foot gate:

  1. Fence length: 150 ft, less 4 ft of gate = 146 ft of fence.
  2. The gate splits the 70 ft side into two 33 ft runs. Sections: 40 ÷ 8 = 5, 33 ÷ 8 = 4.1 → 5 (twice), and 5 again, so 20 sections.
  3. Posts: 20 + 1 gate + 1 = 22 posts.
  4. Rails: 20 sections × 3 = 60 rails. Boards: 146 × 12 ÷ 5.5 = 318.5, so 319 boards.
  5. Holes: 3 × 3.5 in = 10.5 in across, 72 ÷ 3 + 6 = 30 in deep. Concrete: (π × 5.25² − 3.5²) × 24 in = 1.03 cu ft per post, × 22 = 22.72 cu ft ÷ 0.45 = 51 bags of 60 lb.
  6. At the example prices ($22 a post, $9 a rail, $4 a board, $7 a bag, $150 for the gate), materials come to $2,807, or about $18.71 a foot.

The same layout as a 4 foot picket fence (3½ inch pickets with 2½ inch gaps) needs 292 pickets, 40 rails and 34 bags, about $2,400. As 4 foot chain link with posts 10 feet apart, it needs 6 terminal and 12 line posts, 146 feet of fabric (3 rolls of 50 feet) and 14 bags, about $1,737 at the example prices.

Posts and boards by fence length

For a single straight run with no gates, 6 foot wood privacy fence with 5½ inch boards:

Fence length Posts at 8 ft Rails (3 per section) Privacy boards Chain-link posts at 10 ft
50 ft 8 21 110 6
100 ft 14 39 219 11
150 ft 20 57 328 16
200 ft 26 75 437 21
300 ft 39 114 655 31

Concrete per post

For a 4×4 wood post (3½ inches square) in a 10½ inch hole, with depth following QUIKRETE’s one-third rule:

Fence height Hole depth Concrete per post 40 lb bags 60 lb bags 80 lb bags
3 ft 18 in 0.52 cu ft 1.72 1.15 0.86
4 ft 22 in 0.69 cu ft 2.29 1.53 1.15
5 ft 26 in 0.86 cu ft 2.87 1.91 1.43
6 ft 30 in 1.03 cu ft 3.44 2.29 1.72
8 ft 38 in 1.38 cu ft 4.59 3.06 2.29

Buy the total for the whole fence, rounded up, rather than rounding each post. The concrete calculator handles slabs and footings if you’re pouring a pad for a gate or shed, and the gravel calculator covers the drainage gravel if you’re ordering in bulk.

Tips before you build

  • Call 811 before you dig. It’s free, and utility companies will mark buried lines.
  • Find your property line and local rules. Many towns limit backyard fences to 6 feet and front-yard fences to 3 or 4 feet, require a permit, or set the fence back from the line. HOAs often add style rules.
  • Go below the frost line. In cold climates, posts that sit above the frost line heave. Your building department can tell you the local depth.
  • Set terminal posts first. Ends, corners and gate posts take the most load. Set them, string a line between them, then fill in the line posts.
  • Plan gates early. A gate needs a straight, plumb post on each side; many builders use a larger or doubled post on the hinge side.

Assumptions and limitations

  • Sides are connected in one run, and gates are placed in the longest side. A fence that closes in a loop shares one more corner post, so it needs one fewer post.
  • Post spacing is a maximum. The calculator spaces posts evenly in each run, so actual spacing is often a little less (see the table in the result).
  • Wood boards are counted at full fence length without gaps for privacy fences; shadowbox designs need about twice as many. Rails assume 8 foot 2×4s.
  • Concrete assumes premixed Concrete Mix and the QUIKRETE hole rule; fast-setting mixes yield less per bag. Hardware (brackets, screws, tension bands, caps) isn’t included.
  • Prices are editable examples as of November 2026, not quotes, and don’t include labor.

Sources

Frequently asked questions

How many fence posts do I need?

For a straight run, divide the length by the post spacing, round up, and add one. A 100 foot run with posts 8 feet apart needs 13 sections and 14 posts. Each gate adds one post, and connected sides share their corner posts.

How far apart should fence posts be?

Wood fences are usually built with posts no more than 8 feet apart, because rails come in 8 foot lengths. Vinyl posts are spaced to fit the panel width, often 6 or 8 feet. Chain-link line posts go no more than 10 feet apart between the end, corner and gate posts.

How much concrete do I need per fence post?

Following QUIKRETE's rule, a 4×4 post on a 6 foot fence goes in a 10.5 inch hole 30 inches deep, with 6 inches of gravel at the bottom. Filling the rest takes about 1.03 cubic feet of concrete, or 2.3 bags of 60 lb Concrete Mix. A 4 foot fence needs about 1.5 bags per post.

How deep should fence posts be?

QUIKRETE recommends a hole one-third to one-half of the post's above-ground height, plus 6 inches for a gravel base. For a 6 foot fence that's at least 30 inches. In cold climates the bottom of the concrete should be below the frost line, so check your local code.

How many pickets do I need for a privacy fence?

Divide the fence length in inches by the board width. A nominal 1×6 board is 5½ inches wide, so 100 feet of privacy fence takes 219 boards with no gaps. For a spaced picket fence, divide by the picket width plus the gap.

How many rails does a wood fence need?

Fences up to about 4 feet tall usually have two rails per section, and 5 to 6 foot privacy fences three, which keeps tall boards from warping. Taller fences use four. The calculator picks automatically, or you can set the number yourself.

Updated November 2026. Results are estimates for educational purposes and depend on the inputs you provide.