Fence Calculator

A fence calculator turns your total linear feet into a full materials list. It divides the run into sections by post spacing, multiplies sections by rails per section, and divides the run by picket width plus gap for the board count. This free fence calculator also figures posts, concrete bags, and an optional cost estimate in seconds.

Why Fence Math Goes Wrong (and What It Costs You)

Ask ten homeowners how many pickets a 150-foot fence needs and you will get ten answers, most of them wrong. The classic mistake is dividing linear feet by picket width in feet instead of inches, which produces a number so small it should be a red flag but somehow still gets ordered. The second classic mistake is forgetting that gates eat pickets but not posts. The third is buying posts at the fence height instead of the post length, forgetting the three feet that go in the ground.

Each mistake costs a trip to the lumber yard. A 150-foot privacy fence needs roughly 350 pickets, and coming up 40 short on a Saturday stalls the project until the yard reopens. The calculator above runs the full takeoff so the shopping list is right the first time.

How to Calculate Fence Materials: The Formulas

Every fence estimate runs on the same five formulas. They look fussy but they take seconds with the tool above.

  1. Posts: Round up (fence length / post spacing), then add 1 for the final post. Each gate adds 2 gate posts.
  2. Sections: Post count minus 1. Rails = sections x rails per section.
  3. Pickets: Convert the run to inches, subtract gate widths first, then divide by (picket width + gap). Add your waste factor.
  4. Concrete: Posts x bags per post, typically 2 bags of 60-pound quick-set per 4x4 post.
  5. Cost: (Posts x price) + (rails x price) + (pickets x price) + (bags x price).

A worked example makes it concrete. Take a 150-foot, 6-foot privacy fence with 8-foot post spacing, three 2x4 rails per section, 1x6 pickets with no gap, one 4-foot gate, and 10 percent waste:

MaterialMathResult
Posts(150 / 8) rounded up + 1, plus 2 gate posts22 posts
Rails19 sections x 3 rails57 rails
Pickets((150 - 4) x 12) / 5.5, plus 10% waste351 pickets
Concrete22 posts x 2 bags44 bags

Notice the gate rule: the gate width comes out of the picket run before dividing, but the post count still grows by two. Missing that deduction is the most common DIY estimating error.

Picking the Right Fence Style for Your Yard

Style changes the material list more than most people expect, so pick it before you price anything.

StyleHeightRailsPicket gapBest for
Privacy6 ft30 in (touching)Backyards, noise, keeping the dog in
Picket3 to 4 ft22 to 3 inFront yards and curb appeal
Semi-privacy6 ft30.5 to 1 inAirflow with near-full screening
Ranch / split rail4 to 5 ft3No picketsLarge lots and property lines

The calculator's presets fill in height, rails, picket width, and gap for each style, and you can override any of them. A ranch fence skips pickets entirely, which makes it the budget pick, while a picket fence uses narrower boards with gaps for a fancier look at a lower board count. Installed, most wood privacy fences run 15 to 45 dollars per linear foot in 2026, materials plus labor.

Posts, Concrete, and Footings: Getting the Foundation Right

A fence is only as good as its posts. Everything above ground can be perfect and a shallow post will still lean by year three. The rule is simple: bury at least one-third of the post's total length, with a two-foot minimum. A 6-foot fence needs 9-foot posts buried 3 feet deep. Gate posts take extra abuse from swinging weight, so step up to 6x6 posts for gates and set them 3.5 to 4 feet deep.

Dig each hole about three times the post width, 10 to 12 inches across for a 4x4, with 4 to 6 inches of gravel at the bottom for drainage. Set the post plumb and pour quick-setting concrete around it, about two 60-pound bags per post. Use ground-contact pressure-treated lumber and galvanized or stainless fasteners.

Two things before you dig. First, call 811, the national call-before-you-dig number, at least a few business days ahead. It is free, it is the law in most states, and hitting a gas line ends the project in the worst way. Second, check your local building code and HOA: many cities cap front-yard fences at 4 feet and require permits above 6 feet. The footing concrete is a real quantity, so our concrete calculator can cross-check the bag count, and the gravel calculator sizes the drainage base for each hole. Working from metric plans? The unit converter handles the conversions.

Budgeting Your Fence: Materials and Labor in 2026

Enter your local unit prices in the calculator for a materials total, then decide if the sweat equity is worth it. A 150-foot privacy fence is a two-weekend job for two handy people; professional installation roughly doubles the materials cost but finishes in two to three days with a warranty.

Cull lumber at the yard, checking each board for knots and warps before loading. Order 10 to 15 percent extra for cuts, defects, and future repairs, and stain or seal within a few months so the fence outlasts the neighbor's.

Frequently Asked Questions

How many fence pickets do I need for 100 feet?
For a 100-foot privacy fence using 1x6 pickets (5.5 inches wide, no gap), divide 1,200 inches by 5.5 to get 219 pickets, then add 10 percent waste for about 241 pickets. The calculator above does this automatically and adjusts for gate widths and picket gaps.

How far apart should fence posts be?
Standard post spacing is 8 feet on center for most wood fences. Use 6-foot spacing in high-wind areas or for added rigidity, and 10-foot spacing only for light ranch-style rail fences. Always check local building codes and HOA rules before setting posts.

How many concrete bags per fence post?
Plan on 2 bags of 60-pound quick-setting concrete per 4x4 post in a standard 10-inch by 36-inch hole. That is about 44 bags for a typical 20-post fence. Gate posts set in larger holes may need 3 bags each.

How deep should fence posts be buried?
Bury at least one-third of the post's total length, with a 2-foot minimum. A 6-foot fence needs 9-foot posts buried 3 feet deep. In regions with deep frost lines, set posts below the frost depth to prevent heaving.

How many rails do I need per fence section?
Use 2 rails for fences under 5 feet tall and 3 rails for 6-foot and taller fences. The third rail, usually centered, keeps tall pickets from bowing. Each 8-foot section of a 6-foot privacy fence needs three 2x4 rails.

Last updated: 2026 | Based on standard residential fence construction practices and 2026 material pricing ranges. Call 811 before digging and verify height limits and permits with your local building department.