How to Build a Wooden Fence: A Complete Step-by-Step Guide
A wooden fence does more than mark your property line. It gives you privacy from neighbors, a safe place for kids and dogs to play, and a finished look that can raise your home’s curb appeal. The catch is that hiring a contractor to install one often costs $25 to $50 per linear foot, which puts a 100-foot fence somewhere between $2,500 and $5,000 before you blink.
Learning how to build a wooden fence yourself drops that figure to roughly $12 to $18 per linear foot in materials — or about $1,200 to $1,800 for that same 100-foot run. It’s a real commitment: you’ll dig post holes, mix concrete, and level dozens of boards over a weekend or two. But it’s a job a determined DIYer with basic carpentry skills can handle, and the savings are substantial.
This guide walks through the whole process — planning, tools, materials, and the step-by-step build — so you can put up a fence that stays straight and solid for 15 to 20 years.
Tools and Materials You’ll Need
Gather everything before you dig. Stopping mid-project for a trip to the hardware store is how fences end up crooked.
Tools:
– Post hole digger or two-person auger
– 4-foot level and a long string line
– Tape measure and carpenter’s pencil
– Circular saw or miter saw
– Cordless drill with driver bits
– Hammer and nail gun (optional but faster)
– Shovel, wheelbarrow, and mixing tub
– Stakes and batter boards for layout
– Speed square
Materials for a typical 100-foot privacy fence:
– 4×4 pressure-treated posts (12 to 14 posts, depending on spacing)
– 2×4 pressure-treated rails (three per section)
– 5/8-inch-thick fence pickets (about 170 for 6-inch-wide pickets)
– 2×6 or 1×4 cap rail boards (optional)
– Fast-setting concrete mix (two 50-lb bags per post, roughly)
– 3-inch exterior screws and 1-5/8-inch ring-shank nails or screws
– Gravel for drainage at the base of each hole
Pressure-treated pine is the budget workhorse here. Western red cedar and redwood cost more but resist rot and insects naturally, which matters if you skip the stain.
Planning Your Fence Layout
Most fence failures aren’t from bad carpentry — they’re from bad planning. Spend an hour on this and you’ll avoid the two classic disasters: a fence that wanders off your property line, and one that crosses an underground utility.
Check Your Local Codes and Property Lines
Call 811 or use your state’s dig-safe service at least three business days before you dig. They’ll mark underground lines for free, and hitting one can cost thousands. Then check your municipality’s fence rules — height limits (commonly 6 feet for backyards), setback requirements, and whether you need a permit. Pull your survey or plat map to confirm exactly where your property line sits, and consider keeping the fence 2 to 6 inches inside it so you don’t argue with a neighbor later.
Mark the Corners and Post Locations
Drive stakes at each corner and end, then run a string line between them to establish the fence line. Measure along that line and mark every post location. For a 6-foot privacy fence, space posts 6 to 8 feet on center; 8 feet is the standard because it matches the length of your rails and pickets. Mark the gate opening now and double its width if you ever want to bring a mower, wheelbarrow, or trailer through.

Photo by Los Muertos Crew via Pexels
How to Build a Wooden Fence, Step by Step
Once your layout is marked, the actual build follows a repeatable rhythm: dig, set, frame, and skin. Take your time on the first post — every other post follows it.
Step 1: Dig the Post Holes
Dig each hole about 10 to 12 inches in diameter and deep enough that one-third of the post sits below grade. For a 6-foot fence, that means roughly 24 to 30 inches deep, or below your local frost line if you live somewhere that freezes hard. Drop 4 to 6 inches of gravel into the bottom of each hole so water drains away from the post and it doesn’t sit in a puddle that accelerates rot.
Step 2: Set the Posts
Set the corner and end posts first, then the line posts between them. Stand each post in its hole, brace it plumb on two sides, and pour fast-setting concrete around it. Tamp as you fill to remove air pockets, then re-check plumb before the mix sets. The trick to a straight fence is keeping the post faces aligned to your string line — check the line, not your eye.
Step 3: Attach the Rails
Once the concrete cures (usually 24 hours for fast-setting mix), fasten three horizontal 2×4 rails between each pair of posts: one near the top, one near the bottom, and one in the middle. Screw through the post face into the rail end with 3-inch exterior screws. For a cleaner look, use metal rail brackets or notch the rails into the posts. Keep the top rail level and the spacing even — this is what the pickets will hang on.
Step 4: Hang the Pickets
Start at one end and work your way across, using a spacer block to keep gaps consistent. A common spacing is 1/4 to 3/8 inch between pickets, which allows for the wood’s natural expansion and contraction. Attach each picket to all three rails with ring-shank nails or exterior screws. Check for plumb every four or five pickets, and pull a string line along the top so the board tops don’t creep up or down.
Step 5: Add Caps and Trim
A 2×6 cap rail along the top protects the end grain of the pickets from absorbing rain and gives the fence a finished, furniture-like look. Screw it in place with the joints staggered so they don’t all land on the same post. If you want a gate, frame it with the same 2×4 rails and hang it on heavy-duty hinges rated for the door’s weight.
Choosing the Right Wood
The species you pick sets your budget and how long the fence lasts before you’re doing repairs.
| Feature | Pressure-Treated Pine | Western Red Cedar | Redwood |
|---|---|---|---|
| Cost per linear foot | $12–$18 | $20–$28 | $25–$35 |
| Lifespan (unstained) | 15–20 years | 20–25 years | 25–30 years |
| Rot & insect resistance | Good (chemical treatment) | Excellent (natural oils) | Excellent (natural oils) |
| Best for | Budget builds | Appearance + durability | Premium coastal builds |
Pressure-treated pine is the sensible default for most homeowners. If your budget stretches, cedar and redwood bring richer color and natural decay resistance — and they take a stain beautifully.
How Much Does a Wooden Fence Cost?
The headline number depends almost entirely on material choice and length, but here’s a realistic breakdown for a 100-foot, 6-foot-tall privacy fence:
- DIY materials: $1,200 to $1,800 (pine), or $2,000 to $3,500 (cedar)
- Professional installation: $2,500 to $5,000 for pine, $3,500 to $7,000 for cedar
- Per-post concrete and gravel: about $8 to $15 per post
- Gate hardware and latch: $60 to $150
- Permit (if required): $50 to $300, varies widely by city
For a deeper dive on how materials and labor add up, see our guide to fence cost per linear foot. If you’re still deciding between materials, our breakdown of vinyl fence vs wood fence lays out the tradeoffs in maintenance and lifespan.

Photo by Leandro Rossi via Pexels
Keeping the Fence Straight and Sturdy
A few habits separate a fence that lasts 20 years from one that leans by year three.
- Set end posts first and pull a tight string line. Every post plumb to the line, never to the post next to it.
- Don’t skimp on post depth. Shallow posts are the number-one cause of leaning fences. Go below frost line.
- Slope the concrete away from the post. A slight crown around each post sheds water instead of pooling it.
- Use exterior-rated fasteners. Plain steel nails rust and leave black streaks down the pickets within a season or two.
- Seal or stain within the first year. A quality penetrating stain runs $30 to $50 a gallon and doubles how long the wood looks good.
If privacy is your real goal rather than pure boundary-marking, browse our privacy fence ideas for styles that block sightlines without feeling like a stockade.
Frequently Asked Questions
How deep should fence posts be?
About one-third of the post height should be underground — roughly 24 to 30 inches for a 6-foot fence. In cold climates, dig below the frost line so frost heave doesn’t push the posts up over time.
How far apart should wooden fence posts be?
Six to eight feet on center. Eight feet is the standard because it matches the length of stock 2×4 rails and pickets and minimizes the number of holes you have to dig.
Do I need concrete for wooden fence posts?
It’s strongly recommended. Concrete anchors the post against wind and keeps the wood out of direct soil contact. Fast-setting mix lets you work quickly; set the post, brace it, and pour without waiting overnight between posts.
How long does a wooden fence last?
A pressure-treated pine fence lasts 15 to 20 years with basic care, while cedar and redwood can reach 25 to 30 years. Regular cleaning and a fresh coat of stain every few years extend that range considerably.
Is building a fence cheaper than hiring a contractor?
Yes — DIY typically costs 40 to 50 percent less because you’re only paying for materials, not the $25 to $50 per linear foot in labor that contractors charge.
The Bottom Line
Building a wooden fence is one of the highest-value outdoor projects a homeowner can tackle. You’ll spend $1,200 to $1,800 in materials instead of $2,500 to $5,000 on a contractor, and you’ll get a fence built to your exact specs — plus the confidence of knowing every post is plumb because you set it yourself.
The work is genuinely physical, and it rewards patience more than skill. Plan the layout carefully, set your first post perfectly, and the rest is repetition. Do that, and you’ll be looking at a straight, sturdy fence a decade from now.
For more guidance from the pros, This Old House and Family Handyman both publish detailed step-by-step fence tutorials worth bookmarking before you break ground.
