Skip to content
Calcapedia
Home & Garden

Fence Calculator

Estimate posts, rails, pickets and bags of concrete for a fence run, with a rule-of-thumb post depth and an optional material cost.

Level: Grades 5–6

Printable worksheet

Fence Calculator

Inputs

8 ft is common for wood fences, matching 8 ft rails; some panels use 6 ft.

Style
Rails per section

Fences over about 5 ft usually get 3 rails.

The real, measured width. A picket sold as 6 in is actually about 5.5 in wide.

A straight run needs none. Add one per corner that does not fall on the spacing, and one or two per gate.

A 4×4 post is about 3.5 in square.

A common rule of thumb is about 3 times the post width.

Rule of thumb: one third to one half of the above-ground height, at least 24 in, and below the local frost line.

Concrete bag size

Optional. An example price; enter your supplier's, or leave blank.

Optional. An example price; enter your supplier's, or leave blank.

Optional. An example price; enter your supplier's, or leave blank.

Optional. An example price; enter your supplier's, or leave blank.

Result

Posts

14

About 14 posts, 39 rails, 230 pickets and 27 bags of concrete, costing about $1,323.00.

Rails (8 ft)
39
Pickets
230
Sections
13
Concrete bags (80 lb)
27
Bags per post
1.92
Concrete in total
16.11 ft³
Rule-of-thumb hole depth
24–36 inOne third to one half of the above-ground height, at least 24 in. Go below the frost line and follow local rules.
Post length needed (height + depth)
8.5 ft
Material cost
$1,323.00
Cost per foot of fence
$13.23

See the step-by-step solution ↓

Step-by-step solution

  1. Divide the fence length by the post spacing to count sections. Round up, since a short last section still needs its own posts

    1008=12.5=rounded up:13
  2. Count posts: one more than the sections, because both ends need a post

    13+1=14
  3. Count rails: 3 for each section

    13×3=39
  4. Find how many pickets fill the fence: its length in inches ÷ the picket width

    1,2005.5=218.1818
  5. Add 5% extra for split or warped boards, then round up to whole pickets

    218.1818×1+0.05=229.0909=rounded up:230
  6. Find the concrete for one post: the round hole's space minus the space the post fills. Divide by 1,728 to turn cubic inches into cubic feet

    (π×52−3.52)×301,728=1.1509 ft³
  7. Find bags per post: each 80 lb bag makes about 0.6 ft³ of concrete

    1.15090.6=1.9181
  8. Find the total bags for all posts. Round up only once, since a part bag carries over to the next hole

    1.1509×140.6=26.8535=rounded up:27
  9. Add up the cost: how many you need times the price, for the posts, rails, pickets, bags

    14×$15.00+39×$6.00+230×$3.00+27×$7.00=$1,323.00

Test yourself

20 quick questions built from this calculator's formula: work out results, predict what happens when an input changes, and work backward from an answer. Every answer comes with the working.

What this calculator does

Find out how many posts, rails, pickets and bags of concrete you need for your fence. A typical wood fence is built in sections. There's a post at each end, two or three crosswise rails between the posts, and pickets fastened to the rails. Your fence length and post spacing tell you how many sections you need. That sets the number of posts and rails. The picket width and gap set the number of pickets. Posts are usually set in concrete, so the hole size decides how many bags to buy.

This calculator builds that shopping list for one straight run of fence. It counts sections, posts and rails. It counts pickets for a privacy or spaced-picket style, and the concrete needed around each post. It shows a rule-of-thumb hole depth for your fence height, and totals the cost if you enter prices. All of it is an estimate for planning a purchase. Post depth, footings and height limits are set by local building codes, frost depth and any homeowners' association rules. Check those before you dig.

Where it's used

Why this math matters outside the classroom:

  • Post count. A 100 ft fence with posts every 8 ft needs 13 sections (12.5 rounded up) and 14 posts.
  • Picket count. A 72 in section with 3.5 in pickets and 1.5 in gaps fits about 72 ÷ 5 ≈ 14.4 pickets, so builders plan on 15.
  • Post depth. A common rule of thumb sets posts about one-third of their above-ground height into the ground, so a 6 ft fence uses 2 ft holes.
  • Concrete per hole. Fence installers find the concrete for each hole as the volume of a cylinder minus the square post standing in it.
  • Material budgets. Homeowners compare wood and vinyl fencing by multiplying each count of posts, rails and pickets by its price.

How to use it

  1. Enter the total length of fence, the post spacing and the fence height.
  2. Choose the style and the number of rails per section. For pickets, enter their width. For spaced pickets, enter the gap too.
  3. Add any extra posts for corners and gates. Then enter the post size, hole diameter, hole depth and concrete bag size.
  4. If you want a cost, enter prices. Then read the posts, rails, pickets, concrete and total.

What the inputs mean

Post spacing (on center)
Spacing is measured from the center of one post to the center of the next. Wider spacing saves posts but lets rails sag. 8 ft suits standard 8 ft rails.
Rails per section
Fences over about 5 ft usually get 3 rails.
Picket width
The real, measured width. A picket sold as 6 in is actually about 5.5 in wide.
Gap between pickets
Many spaced picket fences use a gap about the picket width or less. Pool fences and some local rules limit the size of the opening, so check them first.
Extra posts for corners, ends and gates
The count assumes one straight run. A corner that falls between regular posts needs an extra post. Gates usually need their own post on each side.
Post size (square, actual)
A 4×4 post is about 3.5 in square.
Post hole diameter
A common guide is about three times the post width: 10–12 in for a 4×4 post, and 14–18 in for a 6×6.
Post hole depth
A common rule of thumb is to bury one third to one half of the above-ground height, never less than about 24 in. In cold climates, the bottom of the hole should sit below the frost line. That's the depth the ground freezes to, and local building departments publish it.
Price per post
Optional. An example price; enter your supplier's, or leave blank.
Price per rail
Optional. An example price; enter your supplier's, or leave blank.
Price per picket
Optional. An example price; enter your supplier's, or leave blank.
Price per bag of concrete
Optional. An example price; enter your supplier's, or leave blank.

Formula and method

sections = length ÷ post spacing, rounded up;  posts = sections + 1 + extra posts
rails = sections × rails per section
pickets = length (in) ÷ (picket width + gap) × (1 + waste ÷ 100), rounded up
concrete per post (ft³) = (π × (hole diameter ÷ 2)² − post width²) × depth ÷ 1,728
bags = concrete per post × posts ÷ bag yield, rounded up
cost = Σ count × price

In the formulas, π (pi) is about 3.14159 and Σ means "add them all up". A fence divided into n sections needs n + 1 posts. Pickets cover the full length, and a privacy style has no gap. The concrete fills the round hole, minus the space the post takes up. There are 1,728 cubic inches in a cubic foot, so dividing by 1,728 converts the units.

Bag yield is how much concrete one bag makes. The figures are the rough ones printed on pre-mixed bags: about 0.30 ft³ for 40 lb, 0.375 for 50 lb, 0.45 for 60 lb and 0.60 for 80 lb. Bags are added up across all posts and rounded up once, since a part bag carries over to the next hole.

Worked example

A 100 ft privacy fence is 6 ft tall, with posts 8 ft apart and 3 rails per section. It uses 5.5 in pickets with 5% extra. The 4×4 posts (3.5 in) go in 10 in holes 30 in deep, using 80 lb bags. Example prices: $15 per post, $6 per rail, $3 per picket, $7 per bag.

  1. Sections: 100 ÷ 8 = 12.5, rounded up to 13; posts: 13 + 1 = 14; rails: 13 × 3 = 39.
  2. Pickets: 1,200 ÷ 5.5 = 218.18; with 5%: 229.09, rounded up to 230.
  3. Concrete per post: (π × 5² − 3.5²) × 30 ÷ 1,728 = 1.1509 ft³, which is 1.92 bags of 80 lb.
  4. Total bags: 1.1509 × 14 ÷ 0.6 = 26.85, rounded up to 27.
  5. Cost: 14 × $15 + 39 × $6 + 230 × $3 + 27 × $7 = $1,323.00, or $13.23 per foot.

Result: 14 posts, 39 rails, 230 pickets and 27 bags of concrete, about $1,323 in materials. The rule-of-thumb hole depth for a 6 ft fence is 24–36 in.

Understanding the result

The counts are what to buy for a straight run. Posts must be long enough for the height above ground plus the depth in the ground. The post length result shows this. Round up to the next length the store sells.

The cost covers only the items you price. Fasteners, gate hardware, post caps, gravel for drainage and stain or sealer add to the total.

Assumptions and limitations

  • It's one continuous run with evenly spaced posts. The last section may be shorter than the others.
  • Pickets run the full length of the fence, and each rail spans one section.
  • Every post sits in the same size of concrete-filled hole.
  • Gates, corners and slopes need extra posts and adjustments that a single straight run doesn't cover. Add extra posts yourself.
  • Board-on-board, shadowbox and panel fences use different picket and rail counts.
  • The depth rule of thumb isn't a building code requirement. Frost depth, soil, wind and local rules decide the real depth. Find out where buried utility lines are before you dig.

Frequently asked questions

How deep should fence posts be?

A widely used rule of thumb is one third to one half of the fence's above-ground height, with a minimum of about 24 in. For a 6 ft fence, that means 24 to 36 in. In freezing climates, the hole should reach below the frost line, so frozen ground doesn't push the posts up (heaving). Check your local frost depth.

How many bags of concrete per fence post?

It depends on the hole. A 4×4 post in a 10 in hole 30 in deep needs about 1.15 ft³. That's just under two 80 lb bags. Wider or deeper holes need more, which is why the calculator works from the hole size you enter.

Should a fence have two or three rails?

Fences up to about 4 or 5 ft are often built with two rails. Taller fences, such as 6 ft privacy fences, usually get three. The third rail keeps pickets flat and reduces warping in the middle.

How do I count pickets for a fence?

Divide the fence length in inches by the picket width plus the gap. A 100 ft privacy fence with 5.5 in pickets and no gap needs about 219 pickets before waste. Adding a few percent covers split or warped boards.

How this calculator is checked

Method: Section counting with ceiling division; picket count from width plus gap; annular concrete volume of a cylindrical hole less a square post; typical pre-mixed bag yields; one-third to one-half above-ground height rule of thumb for depth. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.

Embed this calculator

Put this Fence Calculator on your own website or blog for free. Paste this code where you want it to appear: