How to Build a Fence: DIY Guide for Wood, Vinyl & Chain Link
“The fence contractor quoted me $8,400 for 150 linear feet of 6-foot cedar. I built it myself in three weekends for $1,900 in materials. The difference: knowing how to set posts correctly, because a fence with bad posts is a liability regardless of how good the boards look.”
— Common outcome for prepared DIYers
$15–$45
Per linear foot, wood fence installed
1/3 Rule
Bury 1/3 of post length underground
60–70%
DIY savings vs. professional installation
Building a fence is one of the most achievable major DIY projects in home improvement. Unlike electrical or structural work, fencing requires no specialized license, tolerates reasonable imprecision, and can be done in stages over multiple weekends. The critical decisions — post depth, concrete type, spacing, and material choice — are all learnable in a single afternoon. Here is exactly how to do it right.
Key Takeaways
- •Post setting is the most critical step — bury 1/3 of post length minimum, plus 6" gravel base, and go below frost line in cold climates
- •Call 811 before digging — underground utility strikes are the most common serious injury in fence DIY
- •Standard post spacing is 6 to 8 feet on center — most prefab panels are built to match
- •Wood requires annual maintenance; vinyl and aluminum are effectively maintenance-free for 20+ years
- •Always check permit requirements and HOA rules before purchasing materials
Estimate Fence Materials Before You Buy
Use our fence calculator to count posts, rails, pickets, and concrete bags for your exact fence length — broken down by material type.
Open Fence CalculatorBefore You Dig: Essential Pre-Construction Steps
Every fence project that goes sideways — neighbor disputes, permit fines, utility strikes, HOA violations — traces back to skipping the pre-construction steps. These are not bureaucratic formalities. They are risk mitigation that costs a few hours and potentially saves you tens of thousands.
Step 1: Call 811 (Dig Safe)
In the United States, federal law requires you to call 811 before any digging deeper than 12 inches. The service is free, takes 24 to 72 hours to process, and results in underground utilities being flagged at your property with spray paint and flags. Electric, gas, water, sewer, cable, and telecommunications lines all run underground in most residential properties.
Striking a buried gas line with a post-hole digger is immediately life-threatening. Striking a fiber optic cable can result in five- to six-figure repair bills billed to you. This step is non-negotiable. Call at least 3 business days before your planned dig date.
Step 2: Verify Property Lines
Most fence disputes between neighbors originate from unclear property boundaries. Your property survey, on file with your county recorder's office, shows the legal boundary. For a fee of $300 to $700, a licensed surveyor will physically stake your corners.
Best practice: set your fence 2 to 6 inches inside your property line. This avoids encroachment disputes and gives you clear access to the exterior face of the fence for maintenance. A fence built even 2 inches onto a neighbor's property can be legally required to be moved at your cost.
Step 3: Permits and HOA Approval
Most municipalities require a permit for fences over 6 feet tall, fences in front yards, or fences adjacent to easements. Permit fees typically run $50 to $150 for a residential fence. The application usually requires a site plan showing fence location relative to property lines and structures.
HOA approval is a separate process from city permits. Many HOAs have specific rules on fence height (often maximum 4 to 6 feet in front yards, 6 to 8 feet in rear yards), approved materials, and color. Get written approval before purchasing materials — some HOAs require specific product brands. Our building permits guide covers what to expect and how to navigate the process.
Fence Material Comparison: Wood, Vinyl, and Chain Link
Before getting into installation steps, choose your material — the installation process differs significantly between fence types. The decision hinges on budget, desired maintenance level, privacy needs, and aesthetic goals.
Fence Cost by Material (2026)
| Material | DIY Cost/LF | Installed Cost/LF | Lifespan | Maintenance |
|---|---|---|---|---|
| Pressure-Treated Pine | $8–$18 | $15–$28 | 15–20 yrs | Annual sealing |
| Cedar | $12–$22 | $22–$35 | 20–25 yrs | Every 2–3 yrs |
| Redwood | $18–$30 | $30–$45 | 20–30 yrs | Every 3–5 yrs |
| Vinyl (PVC) | $15–$35 | $25–$60 | 20–30 yrs | None (rinse annually) |
| Aluminum | $20–$35 | $30–$60 | 30–50 yrs | None |
| Chain Link | $3–$15 | $8–$25 | 15–20 yrs | None (galvanized) |
Source: HomeAdvisor 2025 cost data, Angi 2026 market pricing, Brentwood Fence 2025 contractor pricing
The Most Important Decision: Post Depth and Concrete
If there is one area where amateur fence builders consistently fail, it is post installation. A fence is only as stable as its posts. Boards rot and can be replaced. A wobbly post in failed concrete requires pulling the entire post, re-digging the hole, and starting over. Get this right the first time.
Post Depth: The One-Third Rule
The industry standard: bury one-third of the total post length underground, plus 6 inches for a gravel drainage base. For a 6-foot-tall fence:
- 6-foot fence requires an 8-foot post (2 feet of post above grade for panel attachment)
- One-third of 8 feet = 32 inches of post below grade
- Add 6 inches of gravel base = 38 inches total hole depth
In frost-prone climates, this rule has a critical modification: post depth must exceed the local frost line, regardless of what the one-third rule calculates. In New England and the upper Midwest, frost lines reach 42 to 54 inches. If your one-third calculation gives 32 inches but your local frost line is 48 inches, you go to 54 inches (frost line plus 6-inch gravel base). That means a 10.5-foot post for a 6-foot fence — not a 9-foot post. Underdepth posts in frost climates will heave out of the ground within two winters.
Find your local frost line depth at the USDA Plant Hardiness Zone map or your county building department. This is also published in most local building codes.
Post Hole Size and Shape
The hole diameter should be approximately three times the post width. For a 4x4 post (3.5 inches actual), dig a 10- to 12-inch diameter hole. For a 6x6 post, dig a 16- to 18-inch hole. Wider holes provide more concrete bearing area and more lateral stability against wind loads.
Post-hole diggers (manual clamshell type) work fine in soft soil to about 36 inches. In clay soils, rocky ground, or holes deeper than 36 inches, rent a one-man or two-man gas-powered auger from a tool rental center — typically $80 to $120/day. The time savings versus manual digging is substantial: a powered auger digs a hole in 5 to 10 minutes versus 30 to 45 minutes with a manual digger in difficult soil.
Concrete vs. Gravel Footings: An Honest Debate
The industry has debated concrete versus compacted gravel footings for decades. Here is the honest assessment:
Concrete footings provide maximum lateral strength and are the correct choice for most residential applications — especially taller fences (6+ feet), fences in high-wind areas, and gate posts that see significant swing loads. The downside: if a post ever needs replacing (rot, damage), you're breaking up a concrete footing. Use QUIKRETE Fast-Setting Concrete Mix — you pour it dry into the hole and wet it in place, eliminating mixing and dramatically speeding the process. A bag sets in 20 to 40 minutes and reaches working strength in 4 hours versus 24+ hours for standard concrete mix.
Gravel/compacted stone footings drain better than concrete, allow easy post replacement, and perform comparably in stable, well-draining soils. In clay soils that hold water, concrete is superior — clay that freezes around a concrete-free post will use frost pressure to push the post up over time.
Concrete Needed Per Fence Post (QUIKRETE Fast-Setting Mix)
| Post Size | Hole Diameter | Hole Depth | Bags Needed |
|---|---|---|---|
| 4x4 post, 4' fence | 10" | 24–30" | 1 bag (50 lb) |
| 4x4 post, 6' fence | 12" | 36–42" | 1–2 bags (50 lb) |
| 4x4 post, 6' fence (frost climate) | 12" | 48–56" | 2–3 bags (50 lb) |
| 6x6 post, 8' fence | 18" | 42–48" | 3–4 bags (50 lb) |
| Gate post (double) | 18–24" | 48–60" | 4–6 bags (50 lb) |
Gate posts carry swing loads — always oversize concrete footings. Use 6x6 posts for gate applications.
For a 100-linear-foot fence with posts at 8-foot spacing (13 posts), you need roughly 15 to 25 bags of fast-setting concrete mix. Use our concrete calculator to estimate the volume and bags needed for your exact configuration.
Step-by-Step: Building a Wood Privacy Fence
Wood privacy fence is the most common residential fence type — it accounts for approximately 65 percent of all residential fence installations according to NAHB's 2024 Builder Survey. Here is the complete process from layout to finished fence:
Layout and String Line
Drive stakes at each corner of the fence run. Pull a taut mason's string line at the intended fence line, 4 to 6 inches inside your property line. This string becomes your reference for every post placement. Mark post locations along the string at your chosen spacing (6 or 8 feet). For a 100-foot run at 8-foot spacing, you need 13 post locations (including both end posts).
Dig Post Holes
Dig all holes to the calculated depth (one-third post length plus 6 inches, or to frost line depth — whichever is greater). Add 6 inches of 3/4-inch crushed gravel to each hole and compact it with a post or rod. Gravel provides drainage and prevents the post bottom from sitting in standing water, which accelerates rot even in pressure-treated wood.
Set Corner and End Posts First
Always set corner, end, and gate posts before line posts. These are your control points. Place the post in the hole, check plumb on two adjacent faces with a 4-foot level, and brace with 2x4 diagonal braces screwed to wooden stakes. Pour fast-setting concrete dry into the hole around the post to within 2 to 3 inches of grade. Slope the concrete top away from the post to shed water. Verify plumb one final time after pouring. Allow 4 hours minimum before removing braces.
Set Line Posts
With corner posts set and braces removed, re-string your line along the post faces at the intended top height. Set line posts to align with this string — both plumb and on the line. A slight bow in a fence line is the most common rookie mistake. Take your time here; sighting down the line every few posts catches alignment drift before it becomes a problem.
Attach Rails
For a 6-foot privacy fence, install three horizontal rails: one at 10 to 12 inches from the bottom, one in the middle, and one at the top. Use 2x4 pressure-treated rails face-nailed to posts, or use 2x4 rail brackets for a cleaner, stronger connection. Rails span between posts — pre-cut to fit before attaching. Use galvanized or stainless-steel hardware only; zinc-plated nails will rust and cause dark staining on the wood within 2 to 3 years.
Install Pickets or Boards
For board-on-board privacy fence, pickets overlap by 1 to 1.5 inches on alternating sides of the rails, creating complete privacy from both sides with gaps that allow airflow. For standard picket spacing, use a 1/4-inch spacer between pickets as you work. Set a chalk line at the intended bottom height and keep all pickets 2 inches off the ground — boards touching soil will rot within 2 to 3 years regardless of treatment level. Fasten with two galvanized deck screws per rail per picket (never staples or nails on privacy boards — screws resist pull-through far better in wind).
Install Gate Hardware and Seal
Gate frames should be built with a diagonal brace running from the bottom hinge corner to the opposite top corner — this counters the gravitational sag that afflicts every unsupported gate frame within a few years. Use heavy-duty 3-inch strap hinges on the post side and a self-closing spring mechanism if the gate borders a pool or is the primary child-containment barrier. Seal all cut wood ends immediately with water-repellent sealer — cut ends are the primary moisture entry point that begins rot.
Seal and Stain the Fence
New pressure-treated wood needs 6 to 12 months to dry before stain penetrates properly. Apply a water-repellent sealer immediately after installation; return for a full stain or sealer application after the first full year. Cedar and redwood can be stained immediately. A quality penetrating wood sealer runs $30 to $50 per gallon — budget 1 gallon per 100 to 150 square feet of fence surface.
Vinyl Fence Installation: Key Differences
Vinyl fence installation follows the same post-setting process as wood — the concrete footings, depth requirements, and spacing are identical. The difference is in the panel assembly. Vinyl fence panels come in prefabricated sections that slide into routed channels in the vinyl posts, or lock into aluminum inserts embedded in the post.
Critical vinyl installation detail: leave 1/4-inch expansion gaps in the fence panel channels before locking. Vinyl expands and contracts significantly with temperature — up to 1 inch per 10-foot panel between summer and winter extremes in northern climates. Panels installed with zero gap in winter will buckle outward in summer heat.
Vinyl posts should always be reinforced with steel or aluminum inserts — either a 1.5-inch square steel tube or a poured concrete/mortar core — before setting. Hollow vinyl posts have insufficient bending strength to resist lateral wind loads, especially at gate and corner post locations. Most vinyl fence manufacturers require this reinforcement and void the warranty without it.
Chain Link Fence Installation
Chain link is fundamentally different from wood or vinyl — it uses a tension-based system where the mesh is stretched between terminal posts (corner, end, and gate posts) using a tension bar and tension bands. Failure to achieve proper tension results in a sagging fence that looks poor and provides inadequate security.
Chain link post sizing: terminal posts (corners, ends, gates) must be at least 2.5-inch diameter steel pipe; line posts can be 1.5-inch diameter for residential 4-foot fences or 2-inch diameter for 6-foot fences. Spacing of 10 feet maximum for line posts on 6-foot fences. Tension wire along the bottom of the mesh — run between terminal posts and threaded through mesh links — prevents the fence from being pushed inward from the bottom.
Installing chain link is more technical than wood but the materials are significantly cheaper. For a utility fence around a yard or garden, chain link at $3 to $15 per linear foot in materials is hard to beat economically. It is also the most wind-transparent fence — where wind loads are a concern (coastal areas, open plains), chain link outperforms wood or vinyl panels dramatically.
Tools You Need to Build a Fence
A complete fence project requires the following tools. Items marked with an asterisk can be rented rather than purchased if you won't use them again:
- Post-hole digger or power auger* — renting a gas auger ($80–$120/day) saves hours of manual digging
- 4-foot level — for checking post plumb; a 2-foot level introduces too much error
- Mason's string and line level — for straight layout and consistent post height
- Circular saw or miter saw — for cutting posts and rails to length
- Cordless drill and driver — for all fastening; 3-inch screws for rail connections, 1.75-inch screws for pickets
- Wheelbarrow or mixing tub — for mixing bagged concrete (even fast-setting needs some water)
- Tamping rod — for compacting gravel base in each hole
- Chalk line — for marking consistent picket height
- Tape measure (25-foot minimum) — mark twice, cut once
- Work gloves and eye protection — fresh concrete is caustic; always wear gloves when handling
Material List for a 150-Linear-Foot, 6-Foot Privacy Fence
Here is a complete material takeoff for a 150-linear-foot wood privacy fence, which is a typical residential project (roughly a 50x25-foot backyard perimeter). This assumes 8-foot post spacing, board-on-board design, and no gates. Use our lumber calculator to adjust quantities for your specific project dimensions.
Material Takeoff: 150 LF, 6' Board-on-Board Privacy Fence
| Material | Qty Needed | Unit Cost | Subtotal |
|---|---|---|---|
| 4x4x10 PT posts | 20 posts | $18–$22 each | $360–$440 |
| 2x4x8 PT rails | 57 rails (3 rails × 19 bays) | $8–$10 each | $456–$570 |
| 1x6x6 cedar pickets | ~380 pickets | $3.50–$5.50 each | $1,330–$2,090 |
| QUIKRETE fast-set (50 lb) | 40 bags (2 per post) | $7–$8 per bag | $280–$320 |
| 3/4" gravel (drainage) | ~1/3 cubic yard | $40–$60/yard | $15–$25 |
| Galvanized screws (3") | 5 lbs | $15–$20/lb | $75–$100 |
| Post cap rails / hardware | 20 caps | $3–$6 each | $60–$120 |
| Total Materials | $2,576–$3,665 | ||
Professional installation of the same fence: $6,000–$10,500. DIY savings: $3,500–$7,000 (60–70%).
Common Fence Building Mistakes (And How to Avoid Them)
After seeing hundreds of fences in various states of failure, the same mistakes appear repeatedly:
- Posts too shallow in frost climates. The most common structural failure. Posts set at 24 inches in Minnesota will heave 2 to 6 inches out of the ground in the first frost cycle and never recover. Follow the local frost line requirement, not the one-third rule, wherever the frost line is deeper.
- Boards touching the ground. Even pressure-treated wood rated for ground contact will rot at the soil line within 3 to 5 years when boards are in continuous contact with moist soil. Keep all boards 2 inches minimum off grade.
- Using non-galvanized hardware. Zinc-plated nails and screws rust through within 3 to 5 years in outdoor exposure, leaving rust streaks on the fence and causing the fasteners to lose holding strength. Always use hot-dipped galvanized or stainless-steel fasteners outdoors.
- Skipping the gate diagonal brace. An unsupported rectangular gate frame will sag within 2 to 3 years due to gravity acting on the cantilevered weight. A diagonal tension rod or rigid diagonal brace running from the bottom hinge corner to the top latch corner is standard on every well-built gate.
- Not checking local fence restrictions before buying materials. Nothing is worse than framing 200 linear feet of 7-foot privacy fence before discovering your HOA maximum height is 6 feet, or your city prohibits solid privacy fencing in front yards.
Frequently Asked Questions
How deep do fence posts need to be?
The standard is to bury one-third of the total post length plus 6 inches for a gravel drainage base. A 6-foot fence requires 8-foot posts buried 32 to 36 inches. In frost climates, depth must exceed the local frost line — up to 48 to 54 inches in the Northeast and upper Midwest. Underdepth posts in frost climates heave out of the ground within two winters.
How far apart should fence posts be?
Standard fence post spacing is 6 to 8 feet on center. Prefabricated panels are typically made in 6-foot or 8-foot widths to match this spacing. Vinyl fences and chain link in high-wind areas perform better at 6-foot spacing. Custom wood builds can use 8-foot spacing with heavier 2x6 rails instead of 2x4s.
How much concrete do I need per fence post?
A 4-inch post in a 12-inch diameter hole requires 1 to 2 bags (50 lb each) of fast-setting concrete. Deeper holes or 6x6 posts need 2 to 3 bags. For a 100-linear-foot fence with posts at 8-foot spacing (13 posts), budget 20 to 30 bags total. Gate posts should always get extra concrete — 4 to 6 bags minimum.
Do I need a permit to build a fence?
Most municipalities require a permit for fences over 6 feet tall, in front yards, or near easements. Permit fees typically run $50 to $150. HOA approval is separate — check before buying materials. An unpermitted fence discovered during a home sale can delay or kill the transaction and may need to be torn down at your expense.
How long does it take to build a fence?
A 150-linear-foot wood fence takes 2 to 3 days for two experienced DIYers: day 1 for layout and post holes, day 2 for setting posts, day 3 for rails and pickets after concrete cures (24 to 48 hours minimum). Vinyl fence panels install faster — the same run in 1 to 2 days — but post curing still requires a full day.
What is the cheapest fence to build?
Chain link is cheapest at $3 to $15 per linear foot in DIY materials, or $8 to $25 professionally installed. Pressure-treated wood board-on-board is the most economical privacy option at $8 to $18 per linear foot installed. Vinyl costs more upfront ($25 to $60 installed) but has essentially zero maintenance cost — lower 20-year total cost than wood in most climates.
Can I build a fence on a property line?
Legally you can usually build on or near a property line, but disputes are common. Best practice: get a property survey, set the fence 2 to 6 inches inside your property line, and notify neighbors before construction. Fences accidentally built on a neighbor's property may need to be moved at your cost. The survey fee ($300 to $700) is cheap insurance.
How long does a wood fence last?
Pressure-treated pine posts last 15 to 20 years in the ground. Fence boards last 10 to 15 years with annual sealing. Cedar and redwood boards last 15 to 20 years with sealing every 2 to 3 years. Always use hot-dipped galvanized hardware — zinc-plated hardware rusts through in 3 to 5 years, causing wood splitting and staining.
Calculate Your Fence Materials Before You Buy
Enter your fence length and height into our fence calculator — it counts posts, rails, pickets, and concrete bags automatically so you can price materials before stepping into the lumber yard.
Open Fence Calculator