Fence Calculator

Building a fence involves more components than most people expect.

Reviewed by: CalcMojo Editorial Team

Posts, rails, pickets, concrete for post holes, nails or screws, and hardware all need to be quantified before you place a single order. This fence calculator takes your fence length and height and returns a complete materials list with quantities for every component, saving you multiple trips to the lumber yard.

Enter the total fence length in linear feet, select your fence style (privacy, picket, or post-and-rail), specify the post spacing and picket width, and the calculator computes the exact number of posts, rails, and boards you need. It also estimates the concrete required to set each post and provides a total materials cost based on per-unit pricing you can customize to match your local supplier.

Whether you are a homeowner enclosing a backyard, a contractor bidding a property line fence, or a DIYer replacing a section that has seen better days, having accurate material counts before you start prevents shortages that stall the project and overbuys that strain the budget.

How Fence Materials Are Calculated

Fence material estimation starts with three primary inputs: total fence length, fence height, and fence style. From these, the calculator determines the quantity of each component.

Posts. The number of posts depends on the total fence length and the spacing between posts. The standard formula is:

Number of Posts = (Total Fence Length / Post Spacing) + 1

The additional post accounts for the final end post. For a 100-foot fence with posts every 8 feet, you need (100 / 8) + 1 = 13.5, rounded up to 14 posts. Corner posts and gate posts are included in this count. Most residential wood fences use 4×4 posts for fences up to 6 feet tall and 6×6 posts for taller fences or heavy materials like composite.

Rails. Horizontal rails run between posts and support the pickets or boards. Standard fence construction uses 2 rails for fences up to 4 feet tall and 3 rails for fences 5 feet and taller. The number of rail sections equals the number of post spans:

Number of Rail Sections = Number of Posts – 1

Each rail section spans one post spacing, typically 8 feet for 2×4 rails. If using 8-foot lumber for 8-foot post spacing, you need one board per rail section per rail level. A 100-foot fence with 8-foot spacing and 3 rails needs 13 spans x 3 rails = 39 rail boards.

Pickets or Boards. For privacy fences and picket fences, vertical boards are attached to the rails. The number depends on the picket width and the gap between pickets:

Number of Pickets = Total Fence Length / (Picket Width + Gap)

A privacy fence typically has no gap between boards, though boards may overlap by 1/4 to 1/2 inch for full coverage. Standard privacy fence boards are 5.5 inches (1×6 nominal) or 3.5 inches (1×4 nominal) wide. A 100-foot privacy fence with 5.5-inch boards requires approximately 218 boards. A picket fence with 3.5-inch pickets and 3.5-inch gaps needs roughly 172 pickets for the same length.

Fence Styles and Material Requirements

Privacy Fence. The most common residential fence. Solid boards are placed side by side with no gaps, creating a visual and physical barrier. Standard height is 6 feet. Materials include 4×4 posts (8 feet long to allow for 2 feet below grade), 2×4 rails, and 1×6 or dog-ear fence boards. A 6-foot privacy fence typically uses 3 horizontal rails.

Board-on-Board. A variation of the privacy fence where boards overlap on alternating sides of the rails. This creates a fence that looks finished from both sides and allows some air flow while maintaining privacy. Board-on-board construction requires approximately 30% more boards than a standard privacy fence because of the overlap.

Picket Fence. Pointed or shaped pickets with gaps between them, traditionally 3 to 4 feet tall. Common in front yards for decorative purposes and low-level boundary marking. Picket fences use fewer materials per linear foot than privacy fences due to the gaps between pickets.

Post-and-Rail (Split Rail). Horizontal rails sit in notches cut into the posts, with no vertical boards. Common for property line marking, horse pastures, and rustic aesthetics. Material needs are minimal: posts and rails only. A 3-rail split rail fence with posts every 8 feet needs 3 rails per span.

Chain Link. Framework posts and top rails support a woven wire mesh. Chain link is the most economical option for large areas. Material calculation involves posts, top rail, tension bars, ties, and the mesh fabric itself, which is sold by the linear foot in standard widths.

Post Hole and Concrete Requirements

Every fence post requires a hole dug to adequate depth and filled with concrete or compacted gravel for stability. The standard rule for post hole depth is:

Post Hole Depth = 1/3 of total post length + 6 inches for gravel base

For a 6-foot fence using 8-foot posts, the hole should be approximately 2 feet deep (24 inches) plus a 6-inch gravel drainage layer at the bottom, totaling a 30-inch-deep hole. The hole diameter should be approximately 3 times the post width. For a 4×4 post, this means a 10 to 12-inch diameter hole.

Concrete per post. A standard post hole (12 inches in diameter, 24 inches deep) requires approximately 0.65 cubic feet of concrete, or about one 80-pound bag of pre-mixed concrete. For a fence with 14 posts, you need approximately 14 bags. This calculator computes the exact concrete volume based on your hole dimensions and converts it to the number of bags needed.

Gravel. Place 4 to 6 inches of gravel at the bottom of each post hole before setting the post. This provides drainage and prevents the post base from sitting in water, which accelerates rot. Approximately 0.1 cubic feet of gravel per post hole is typical.

For total concrete calculations for larger projects, use our Concrete Calculator.

Fence Cost Estimation

Fence costs vary by material, height, style, and region. Here are typical material-only costs per linear foot:

Wood Privacy (6 ft): $10 to $25 per linear foot. Western red cedar is at the higher end; pressure-treated pine is at the lower end. A 150-foot fence costs $1,500 to $3,750 in materials.

Wood Picket (4 ft): $5 to $15 per linear foot. Less material per foot due to shorter height and gaps between pickets.

Chain Link (4 ft): $5 to $15 per linear foot. Vinyl-coated chain link costs more than galvanized.

Vinyl/PVC Privacy (6 ft): $20 to $40 per linear foot. Higher upfront cost but minimal maintenance over its lifespan.

Composite (6 ft): $25 to $50 per linear foot. Premium product with high durability and no maintenance.

Professional installation adds $10 to $30 per linear foot depending on fence type, terrain, and local labor rates. A 150-foot wood privacy fence installed professionally costs $3,000 to $8,000 total.

Building a Fence: Key Considerations

Property lines. Before building, verify your property boundaries with a survey or by locating property markers. Building even slightly on a neighbor’s property can result in removal orders and legal disputes. Most municipalities require fences to be set 2 to 6 inches inside the property line.

Local codes and permits. Most areas require a permit for fences over a certain height, typically 6 feet for backyard fences and 3 to 4 feet for front yard fences. HOA rules may further restrict materials, colors, and styles. Contact your local building department before starting.

Utility lines. Call 811 (the national dig line) before digging post holes. Underground utility lines for gas, water, electricity, and communications are common in residential areas, and hitting one can be dangerous and expensive. The service is free and typically requires 48 to 72 hours notice.

Gates. Plan gate locations and sizes before calculating materials. A standard pedestrian gate is 3 to 4 feet wide. A driveway or equipment gate is 10 to 16 feet wide. Gates require additional posts (typically heavier 6×6 posts), hinges, latches, and sometimes diagonal bracing to prevent sagging.

Slope and terrain. Fences on slopes can be installed using the stepped method (horizontal rails with gaps at grade) or the racked method (rails follow the slope). Stepped fencing is simpler to build but leaves triangular gaps at the bottom. Racked fencing follows the terrain smoothly but requires more cutting and fitting. Both methods use the same amount of posts but may require longer boards on the downhill side.

Use the Square Footage Calculator if you need to calculate the enclosed area for landscaping or property assessment purposes.

These estimates are approximate and based on standard material calculations. Actual quantities and costs vary by region, supplier, material grade, and site conditions.

Frequently Asked Questions

How many fence posts do I need for 100 feet of fence?

With standard 8-foot post spacing, a 100-foot fence requires 14 posts (100 / 8 = 12.5 spans, plus 1 end post, rounded up to 14). If you have corner turns or gates, you may need additional posts at those locations. Each corner requires its own post, and each gate requires two posts.

How deep should fence post holes be?

The standard rule is to bury one-third of the total post length. For a 6-foot fence using 8-foot posts, dig holes 24 to 30 inches deep, including a 6-inch gravel base at the bottom. In cold climates, check your local frost line depth, as posts should extend below it to prevent heaving.

How many bags of concrete per fence post?

A standard post hole (10-12 inch diameter, 24 inches deep) requires approximately one 80-pound bag of fast-setting concrete. For larger holes or 6×6 posts, plan for 1.5 to 2 bags per post. Always mix concrete to the consistency recommended on the bag.

How much does a 200-foot wood fence cost?

A 6-foot wood privacy fence costs approximately $10 to $25 per linear foot for materials. For 200 feet, materials total $2,000 to $5,000. Add professional installation at $10 to $30 per linear foot and the total ranges from $4,000 to $11,000 depending on wood species, style, and local labor rates.

What is the best wood for a fence?

Western red cedar and redwood are naturally rot-resistant and durable, lasting 15 to 20+ years with minimal maintenance. Pressure-treated pine is the most economical option, lasting 15 to 20 years, but it may warp and requires sealing. White oak is extremely durable but expensive and heavy. For most residential fences, pressure-treated pine offers the best balance of cost and longevity.

How far apart should fence posts be?

Standard post spacing is 8 feet for most wood fences using standard 8-foot rails. Some builders use 6-foot spacing for extra strength, especially in high-wind areas or for heavy materials. Chain link fences typically use 10-foot post spacing. Closer spacing increases material costs but produces a stronger, more rigid fence.

Do I need a permit to build a fence?

In most jurisdictions, yes, especially for fences over a certain height. Check with your local building department for permit requirements, setback rules, and height restrictions. Front yard fences are often limited to 3 or 4 feet, while backyard fences can typically be 6 feet. HOA communities may have additional restrictions on materials, colors, and styles.

Sources & Methodology

  • Post spacing standards and depth rules based on International Residential Code (IRC) Section R312 and common industry practice.
  • Concrete volume per post hole calculated using standard cylinder volume formula for typical hole dimensions.
  • Cost ranges based on national average retail pricing from major home improvement retailers and lumber suppliers.
  • Wood durability ratings based on US Forest Products Laboratory published data on natural decay resistance.

Default values shown are illustrative. Always verify measurements on site. Data accurate as of: March 2026