Updated April 13, 2026

Fencing Calculator

To calculate fence materials, divide total fence length by post spacing (typically 8 ft) and add 1 for the number of posts. Multiply fence length in inches by picket width plus gap to find pickets needed. A 100-foot privacy fence needs about 14 posts and 218 pickets.

Enter the total linear feet of fencing needed

ft
ft
in
(3 suggested for 6 ft)
ft wide
$

Key Takeaways

  • Standard post spacing is 8 feet on center, requiring one more post than the number of sections.
  • Bury one-third of the total post length underground for stability (e.g., 3 ft buried for a 6-ft fence).
  • Privacy fences with 5.5-inch boards need about 22 pickets per 10-foot section.
  • Board-on-board fencing requires approximately 30% more lumber than a standard privacy fence.
  • Budget one 80 lb bag of concrete per 4x4 fence post and two bags per 6x6 post.
  • Fences over 4 feet tall should have 3 horizontal rails for proper structural support.

How to Calculate Fence Materials

The first step in any fence project is determining the total linear feet of fencing you need. Measure each side of the area you want to enclose, then add the measurements together. Subtract the width of any gate openings from this total to get the actual fence line length. Dana Kowalski, a contractor in Pinewood Falls, recommends measuring twice and marking post locations with stakes and string before buying a single board.

Posts: Divide the fence line length by your chosen post spacing (typically 8 feet) and round up to get the number of sections. Add 1 to get the total line posts, since you need a post at each end. Then add 2 posts for every gate opening (one on each side of the gate). For example, a 150-foot fence with 8-foot spacing has 19 sections (150 / 8 = 18.75, rounded up) and needs 20 line posts. With one gate, you need 22 posts total.

Pickets and boards: Convert your fence line length to inches and divide by the effective board width. For a privacy fence with 5.5-inch pickets and no gap, a 150-foot fence line (1,800 inches) needs 1,800 / 5.5 = 328 pickets. For a picket fence with 2.5-inch gaps, the effective width is 8 inches per picket, so you need 1,800 / 8 = 225 pickets. Board-on-board fences use an effective width of 4 inches (5.5 minus 1.5-inch overlap), requiring 1,800 / 4 = 450 boards. The concrete calculator can help you figure out how much concrete you need for setting all those posts.

Rails: Each section between posts needs horizontal rails spanning the gap. Multiply the number of sections by the post spacing to get total rail linear feet, then divide by 8 (for standard 8-foot lumber) to get the number of boards. A 150-foot fence with 3 rails per section needs 19 sections x 8 ft x 3 rails = 456 linear feet, or 57 boards of 8-foot rail lumber.

Post Depth and Sizing Guide

Setting posts to the correct depth is the most important factor in building a fence that lasts. The general rule is to bury one-third of the total post length underground. This means a 6-foot fence needs a 9-foot post with 3 feet below grade. In areas with freeze-thaw cycles, posts should extend below the local frost line to prevent heaving. The table below shows recommended post depths for common fence heights based on guidelines from the American Wood Council.

Fence Height Post Length Burial Depth Post Size Concrete (80 lb bags)
3 ft5 ft2 ft4x41 bag
4 ft6 ft2 ft4x41 bag
5 ft7.5 ft (8 ft)2.5 ft4x41 bag
6 ft9 ft (10 ft)3 ft4x4 or 6x61 to 2 bags
8 ft12 ft4 ft6x62 bags

Source: American Wood Council post framing guidelines. Check local building codes for frost line requirements in your area.

Post holes should be about 3 times the width of the post. For a 4x4 post (actual dimension 3.5 inches), dig a hole 10 to 12 inches in diameter. For 6x6 posts (actual 5.5 inches), dig 14 to 16 inches wide. Use pressure-treated posts rated for ground contact (look for the "GC" or "Ground Contact" stamp). Coach Rivera had Dana Kowalski install a 6-foot fence around the school athletic field in Pinewood Falls, and she used 6x6 posts at every corner and gate location for extra strength where stress concentrations are highest.

Fencing Cost by Material Type

Fencing costs vary widely depending on the material, height, and style you choose. The table below shows average installed costs per linear foot for the most common residential fence types, based on national pricing data from HomeAdvisor and contractor estimates. Material-only costs run about 40% to 60% of the installed price if you plan to build the fence yourself.

Fence Material Cost per Linear Foot (installed) Lifespan Maintenance
Pressure-treated pine$15 to $3515 to 20 yearsStain/seal every 2 to 3 years
Cedar$20 to $4020 to 30 yearsOptional stain, naturally rot-resistant
Redwood$30 to $5525 to 35 yearsOptional stain, naturally rot-resistant
Vinyl / PVC$25 to $5025 to 30+ yearsWash with soap and water
Composite$30 to $5525 to 30+ yearsVery low, occasional cleaning
Chain link$10 to $2515 to 25 yearsMinimal, may rust over time
Aluminum$25 to $5530+ yearsVery low, rust-free
Wrought iron$30 to $7550+ yearsRepaint every 3 to 5 years to prevent rust

Source: HomeAdvisor national average pricing (2025 to 2026). Prices vary by region, fence height, and terrain.

For a typical 150-foot, 6-foot-tall privacy fence in pressure-treated pine, expect to pay $2,250 to $5,250 installed. Materials alone run $900 to $2,100. Cedar costs more upfront but lasts longer and does not require staining since the natural oils resist rot and insects. The square footage calculator can help you estimate the total surface area if you plan to stain or paint your fence after installation.

Choosing the Right Fence Style

The three most common wood fence styles each serve different purposes. A privacy fence places boards edge to edge with no gaps, creating a solid visual and wind barrier. This style is the most popular for residential backyards, offering full screening from neighbors and the street. The downside is that solid fences catch more wind, putting extra stress on the posts. In high-wind areas, consider leaving a small gap at the bottom or using post spacing of 6 feet instead of 8.

A picket fence spaces boards 2 to 3 inches apart, creating the classic look associated with front yards and garden borders. Picket fences are typically 3 to 4 feet tall and use less material than privacy fences because of the gaps. They define boundaries and keep pets contained without blocking views or airflow. The open design also means less wind load, so standard 8-foot post spacing works well.

Board-on-board fencing alternates boards on each side of the rails so that each board overlaps the gap behind it by about 1.5 inches. This style looks the same from both sides (no "bad side" facing the neighbor) and allows some air to pass through, reducing wind resistance. The trade-off is material cost: board-on-board uses roughly 30% more pickets than a standard privacy fence. Board-on-board is a popular choice for side-yard fences where both the homeowner and neighbor see the fence daily.

Tips for Building a Strong Fence

Set corner and gate posts first. These are the anchor points of your entire fence. Run a mason's line between them to keep all intermediate posts perfectly aligned. Corner posts should be larger (6x6 instead of 4x4) or braced diagonally, since they bear forces from two directions. Gate posts need extra depth and concrete because the repeated swinging motion of the gate puts constant lateral stress on the post.

Use proper concrete technique for post holes. Set the post in the hole and pour dry concrete mix around it, then add water on top. The mix absorbs moisture from the surrounding soil over the next 24 to 48 hours and forms a solid footing. This method, recommended by Quikrete, is faster than pre-mixing in a wheelbarrow and produces equally strong results. Crown the concrete slightly above grade so water drains away from the post base.

Attach rails correctly. The top rail should sit 6 to 8 inches below the top of the pickets, and the bottom rail should be 6 to 8 inches above the ground. For 3-rail fences, space the middle rail evenly between the other two. Use 3-inch exterior-grade screws or 16d galvanized nails to fasten rails to posts. Each picket gets 2 fasteners per rail (one near each edge), which prevents the board from cupping or twisting as the wood dries.

Order extra pickets. Buy 10% to 15% more pickets and rails than your calculated total. Lumber from the store often includes warped, split, or knotty boards that are not usable. Having extras on hand avoids a second trip and gives you replacement boards for future repairs. Posts should be ordered at the exact calculated count since each one goes into a specific hole.

Check local regulations. Most municipalities require a building permit for fences over 6 feet tall and may regulate maximum height, setback from property lines, and style in front yards. Homeowner association (HOA) rules can be even more restrictive. Always pull the permit before starting a fence job, since a fence built without one may need to be removed or modified at the homeowner's expense.

This calculator provides material estimates for planning purposes. Actual quantities may vary based on terrain, lumber dimensions, and local building codes. Consult a licensed contractor or your local building department for projects that require permits or engineering review.


Related Calculators

Frequently Asked Questions

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

For 100 feet of fencing with standard 8-foot post spacing, you need 14 posts (100 divided by 8 equals 12.5 sections, rounded up to 13, plus 1 end post). Add 2 extra posts for each gate opening. If you use 6-foot spacing instead, you need 18 posts. Always round up since you cannot have a partial section.

How deep should fence posts be buried?

The standard rule is to bury one-third of the total post length. For a 6-foot fence, use 9-foot posts and bury 3 feet underground. For a 4-foot fence, bury at least 2 feet. In cold climates, check your local frost line depth, as footings should extend below it to prevent heaving. Most building codes require a minimum burial depth of 24 inches regardless of fence height.

How many pickets do I need for a privacy fence?

For a privacy fence with no gaps using standard 5.5-inch (1x6) pickets, you need approximately 22 pickets per 10-foot section. Multiply your total fence length in feet by 2.18 for a quick estimate. A 100-foot privacy fence needs about 218 pickets. Board-on-board fences require roughly 30% more boards because of the overlap.

How much concrete do I need for fence posts?

Plan on one 80-pound bag of concrete per standard 4x4 fence post. For larger 6x6 posts or corner posts, use two bags per post. A typical fence post hole is 10 inches in diameter and one-third the total post length deep. For a 100-foot fence with 14 posts, you need approximately 14 bags of 80-pound concrete mix.

What is the best spacing between fence posts?

The standard spacing is 8 feet on center, which works with common lumber lengths and provides good structural support. For areas with high winds, heavy gates, or tall fences (over 6 feet), reduce spacing to 6 feet. Never exceed 10 feet between posts, as the rails will sag and the fence becomes unstable. Vinyl and aluminum fences typically require 6-foot spacing per manufacturer specifications.

How many rails does a fence need?

Fences 4 feet tall or shorter need 2 horizontal rails (top and bottom). Fences taller than 4 feet should have 3 rails (top, middle, and bottom) for structural stability. The top rail sits 6 to 8 inches below the top of the pickets, and the bottom rail sits 6 to 8 inches above grade. An 8-foot fence may benefit from 4 rails to prevent bowing between posts.

What is the difference between privacy and board-on-board fencing?

A privacy fence places pickets edge to edge with no gaps, creating a solid visual barrier. Board-on-board fencing alternates boards on each side of the rails with about 1.5 inches of overlap, so each board covers the gap between the boards behind it. Board-on-board uses about 30% more lumber but looks the same from both sides and allows some airflow, which reduces wind load on the fence.