Three-rail wood fence along a gravel driveway
Three-rail wood fence along a gravel driveway

Learning how to build a wood fence comes down to three things: setting posts below the frost line, bracing the gate so it won't sag within a year, and choosing a wood species that won't rot out before the kids graduate college. Most guides cover the first two and skip the third, which is exactly where most fences fail. This guide walks through the full build from layout to gate, then compares pine, cedar, and naturally rot-resistant hardwoods like black locust decking, so you know which wood is worth the extra cost up front and which one you'll be replacing in a decade.

Key Takeaways

  • Bury posts one-third of their length plus 6 inches below the frost line, and brace the gate's diagonal the right direction, or it will eventually sag.
  • Call 811 before digging. Skipping it is the single biggest cause of utility damage nationwide.
  • Only cedar and black locust resist rot naturally. Pressure-treated pine needs a chemical bath to get the same protection.
  • Black locust costs more per linear foot than pine or cedar, but it's rated to last 40-plus years against 10 to 20, which changes the real 25-year cost.
  • Most gate sagging traces back to brace direction, hinge size, or a post that wasn't set deep enough, not bad luck.

What You Need Before You Start Building

Checklist infographic of tools, materials and prep needed before building a wood fence

Before digging a single hole, pull together your tools and materials and handle the paperwork that protects you later.

CategoryWhat You Need
ToolsPost-hole digger or power auger, 4-foot level, circular saw, drill with bits and driver, tape measure, chalk line, speed square, clamps
Materials (per 8-ft panel, 6-ft fence)One 4x4 post, three 2x4 rails, six to eight 1x6 pickets, two 80-lb bags fast-setting concrete

Measure your full property line in linear feet and divide by eight to get your panel count, then add roughly 10 percent extra on pickets to cover cuts and mistakes. Buying everything in one trip beats a mid-project hardware store run you hadn't budgeted for.

Two calls matter more than any tool on that list:

  • Call 811 at least two to three business days ahead. It's a free national service that marks buried gas, water, and electric lines, and skipping it is riskier than most homeowners assume: the 2024 CGA damage report found nearly 200,000 reported incidents, and failing to call 811 first was the single biggest cause.
  • Call your local building department. Most municipalities regulate fence height and many require a permit before the first post goes in. Check HOA rules too, if you have them, before you buy a single board.

Planning Your Fence Layout and the Gate Opening

Diagram showing wood fence layout and gate opening dimensions

Walk the property line before you buy anything.

Mark the Layout

Drive a stake at each corner, then run a string line between them so you can see exactly where the fence will sit and where the ground slopes. Mark each post location along the line, spacing posts 6 to 8 feet on center. On sloped ground, decide up front whether to stair-step the panels for a cleaner look or rack them to follow the grade, which works better on steep, uninterrupted slopes.

Plan the Gate Opening

Treat the gate as its own system, not an afterthought. Start with the opening itself:

Gate TypeClear Opening Needed
Standard pedestrian gate36-48 inches
Vehicle gate10-12 feet

Account for Soil and Site Conditions

  • Heavy clay holds water against a post base longer than sandy soil does, and hard freeze-thaw cycles put more lateral pressure on a post in one winter than a mild climate puts on it in five years. Going a few inches deeper than the minimum costs little and buys a lot of peace of mind.
  • If you're staging materials in a narrow side yard, move your lumber to the accessible side before the first panel goes up, since long boards get harder to move once a section is framed in.

How to Build a Wood Fence, Step by Step

Finished three-rail wood fence beside a road

With the layout marked and materials on site, the build breaks into three stages: setting the posts, framing the fence, and building a gate that will still swing true in ten years.

Dig and Set the Posts

  • Bury one-third of the post's total length plus 6 inches below your local frost line. A 9-foot post for a 6-foot fence typically goes about 3 feet deep. Frost depth varies by region, so check with your local building department or a USDA frost depth map first.
  • Shovel a few inches of gravel into each hole for drainage, then drop the post in.
  • Pour dry fast-setting concrete mix and add water per the bag's directions.
  • Hold the post plumb against two adjacent faces with your level, then brace it with a pair of 2x4 stakes angled into the ground.
  • Crown the concrete slightly above grade and slope it away from the post so water sheds instead of pooling at the base, since that pooling is exactly where rot starts.
  • Let fast-setting mix cure about 4 hours before hanging rails; standard mix needs a full 24 to 48.

Attach the Rails and Pickets

  • A 6-foot fence needs three horizontal rails: top, middle, and bottom.
  • Attach rails with metal brackets rather than notching the post. Brackets hold up better over time and skip a step that weakens the post face.
  • Set the top rail first and check it with your level before moving on.
  • Snap a chalk line across the post faces at your picket height, which keeps the top line consistent even where posts are slightly uneven.
  • Butt pickets tight for full privacy, or leave a consistent eighth-inch gap for seasonal movement.
  • Pre-drill near the ends of each picket so the wood doesn't split, and use hot-dipped galvanized or stainless screws. Standard zinc screws will bleed rust streaks into the boards within a single wet season.

Build and Hang a Gate That Won't Sag

Most gate failures trace back to two mistakes: a diagonal brace running the wrong direction, and hinges sized for looks instead of load.

  • Measure the actual opening between gate posts and subtract about an inch for hardware clearance.
  • Build the frame from 2x4 lumber: two vertical stiles cut to gate height, two horizontal rails cut to the finished width, joined with structural screws or carriage bolts at every corner.
  • Cut a diagonal brace and run it from the bottom hinge corner up to the top corner on the latch side. Run it the other way and the brace works in compression instead of tension, and it will fail. A metal cable and turnbuckle does the same job if you'd rather not cut a wood diagonal.
  • Attach pickets to the finished frame, then hang the gate with heavy-duty strap hinges rated well above its actual weight. A 4-foot gate usually weighs 30 to 60 pounds; a 6-foot solid gate can hit 100.
  • Mount hinges with 3-inch lag screws into solid wood, not just the post's surface layer, and set the gate on shims while you work so it hangs at the right height before you remove them.

Choosing a Wood That Won't Need Replacing

Black locust tree with textured bark and green leaves

Species matters more than any finish you put on top of it, and it's the step most guides skip past fastest. Rot resistance comes down to density and natural extractives inside the wood itself, the oils and tannins that make a species inhospitable to decay fungi and insects. Pressure-treated pine gets that resistance from a chemical bath after milling. Cedar and black locust are born with it.

  • Pressure-treated pine is the cheapest option up front, though it warps and twists noticeably as it dries after installation.
  • Cedar is naturally rot-resistant and lighter to work with, lasting 15 to 20 years with consistent sealing.
  • Black locust is a North American hardwood with a Janka hardness that rivals tropical species like ipe, holding up in ground contact for decades without chemical treatment, something this black locust vs ipe comparison breaks down in more detail.
SpeciesTypical LifespanMaintenanceChemical Treatment Needed
Pressure-treated pine10-15 yearsModerateYes
Cedar15-20 yearsModerateNo
Black locust40+ yearsLowNo

Choosing black locust over an imported tropical hardwood like ipe works a lot like buying a tomato from a farmer's market instead of one flown in from across the world: comparable quality, but a shorter, more traceable supply chain grown and milled on the same continent where it ends up installed.

Replacement cycle. A pine fence installed today for around $2,500 in materials often needs replacing within 12 years. Black locust is built to skip that second build entirely.

Track record. Black Locust Lumber backs every order with a 50-year rot resistance warranty on untreated wood, built on 25 years of sourcing, milling, and finishing black locust exclusively, in work you can see in completed projects ranging from university campuses to luxury residential builds. The same wood also supplies black locust siding for the same kind of decades-long outdoor use.

What a Wood Fence Actually Costs Over Time

Infographic comparing long-term wood fence costs by wood species
SpeciesMaterial Cost (per linear ft)Installed Cost (per linear ft)
Pressure-treated pine$10-$15$30-$65
Cedar$14-$22$34-$72
Black locust or comparable hardwood$20-$30$40-$80

For a typical 150-foot backyard run, total project cost lands somewhere between $1,500 and $4,500 for a DIY pine build, or $4,500 to $12,000 and up for a professionally installed hardwood fence.

The number that actually matters is the 25-year number, not the first invoice. A pine fence replaced once or twice over that span adds its full material and labor cost back on top of the original, while a fence built from a species rated for 40-plus years in ground contact gets built once and stays built. That's the same math commercial and institutional buyers use when they specify lumber for public projects, where a replacement cycle means scaffolding, crews, and downtime, not just a trip to the lumber yard.

Why Your Gate Is Sagging

Wood fence post and rails during installation

If your gate is dragging, scraping the ground, or sitting crooked against the latch post, the cause is almost always one of three things, and none of them require tearing out the whole fence.

CauseFix
Brace running the wrong wayRun the diagonal from the bottom hinge corner up to the top latch corner. Reversed, it works in compression instead of tension and will keep failing no matter how many times you tighten the hardware.
Hinges undersizedHinges rated below the gate's actual weight stretch and loosen over time, especially on heavier solid-board gates. Upgrade to hinges rated well above actual weight.
Post leaning, not gate failingA sagging gate is sometimes a post problem wearing a gate's symptoms. A post that's started to lean usually means its concrete footing wasn't deep or wide enough to begin with.

A gate built with the brace running the right direction and hinges sized for the actual load rarely needs this kind of troubleshooting in the first place, which is why that step gets its own section earlier in this guide instead of an afterthought at the end.

Build Your Fence Once, Not Three Times

A wood fence is a straightforward weekend project once the layout is marked, the posts are set right, and the gate is braced in the correct direction. The piece that actually decides whether you're doing this again in twelve years is the wood itself.

  • Request a decking sample of black locust before you commit to a species
  • Browse recent project photos at the lumber store listing
  • Reach out to Black Locust Lumber directly for wood built to outlast the project around it

FAQs About Building a Wood Fence

How deep should fence post holes be?

Bury about one-third of the post's total length plus 6 inches below your local frost line. A 9-foot post for a 6-foot fence typically goes about 3 feet into the ground, though exact frost depth depends on your region.

Can I add a gate to an existing fence line?

Yes, as long as the two posts on either side of the opening are reset or reinforced to carry a gate's swinging weight. Standard line posts aren't deep or thick enough on their own to support hinges and a latch long term.

What's the most common reason a new wood fence warps or twists?

Installing lumber before it has acclimated to outdoor humidity is the usual cause, especially with pressure-treated pine, which still carries a lot of moisture at the lumber yard. Letting boards sit on site for a few days before installation, and sealing cut ends where moisture enters fastest, cuts down on warping significantly.

FAQs About Black Locust Lumber

Does black locust fencing need to be treated or sealed?

No. Black locust is naturally rot and insect resistant without chemical treatment, which is also why it carries a 50-year rot resistance warranty untreated.

How does black locust compare in cost to cedar or pine?

It costs more per linear foot up front than pine or cedar, but it's rated to last roughly twice as long as cedar and more than three times as long as pressure-treated pine, which changes the real cost once a second or third build is factored in.

Knowledge & guides

Continue Reading