Food

DIY Wood Fences: Build It Right the First Time

By Hayride Live · Updated · 7 min read

Building a DIY wood fence is a weekend-to-two-weekend project that saves you labor costs, but only if you plan the layout, set posts correctly, and use the right materials. The mistake most people make is setting posts in concrete without accounting for frost heave or drainage, which leads to leaning fences within a year. You’ll need to dig below the frost line, use gravel at the base of each hole, and let concrete cure before attaching rails.

Plan the Fence Line Before You Dig

Start by checking local zoning rules and homeowner association guidelines. Most areas require a permit for fences over 6 feet (1.8 m) tall, and you must know your property line—get a survey if you’re unsure. Call 811 (in the US) at least 48 hours before digging to have underground utilities marked; this is free and required by law in most states.

Measure the perimeter and decide on post spacing. Standard spacing is 8 feet (2.4 m) on center for most wood fences, but 6 feet (1.8 m) is stronger if you live in a windy area or use heavy pickets. For a 150-foot (45.7 m) fence, that’s about 19 posts at 8-foot spacing (150 ÷ 8 = 18.75, round up). Draw a simple sketch with gates and corners marked.

Choose Your Wood and Hardware

Cedar and redwood resist rot naturally but cost more; pressure-treated pine is cheaper and lasts 20–30 years if kept off the ground. For pickets, use 1×6 or 1×4 boards; for rails, use 2x4s; for posts, use 4×4 or 6×6. Galvanized screws (not nails) resist rust and hold better. For concrete, use a fast-setting mix—one 50-pound (22.7 kg) bag fills about 0.375 cubic feet (0.011 m³) of hole space.

Set Posts the Right Way

Dig holes with a post hole digger or auger—each hole should be 8–12 inches (20–30 cm) in diameter and at least 1/3 the post height deep, plus 6 inches (15 cm) for gravel. For a 6-foot (1.8 m) fence, that’s a hole about 2.5 feet (76 cm) deep, but deeper if your frost line is lower. Place 6 inches (15 cm) of gravel at the bottom for drainage, then set the post on top. Check plumb with a level in two directions, and brace it before pouring concrete.

Mix concrete per the bag instructions (usually about 3 quarts (2.8 L) of water per 50 lb bag). Pour it around the post, mounding it slightly above ground level and sloping away from the post so water doesn’t pool. Let it cure for at least 24–48 hours before attaching rails. If you’re in a cold climate, consider using a concrete tube form to keep the concrete below the frost line, which prevents heaving.

Attach Rails and Pickets

After posts are set, attach two or three horizontal rails. For a 6-foot fence, use three rails: one at the top, one in the middle, and one near the bottom (about 6 inches (15 cm) from the ground). Use galvanized post-to-rail brackets or notch the posts to hold the rails. Space rails evenly—for a 6-foot fence, place them at 2, 4, and 5.5 feet (61, 122, and 168 cm) from the ground.

Attach pickets vertically, leaving a 3/8-inch (1 cm) gap between them to allow for wood expansion and airflow. Use a spacer block or a speed square to keep gaps consistent. Screw each picket to the rails with two screws per rail. For a shadowbox fence (alternating pickets on both sides), you’ll need two sets of rails and more pickets—plan for about 1.5 times the linear footage.

Finish and Maintain Your Fence

Seal or stain your fence within a few weeks of installation, before weather damages the wood. Use a water-repellent sealer or a semi-transparent stain; paint is also fine but requires more maintenance. Apply one coat, wait for it to dry, then apply a second coat for durability. Reapply every 2–3 years or when water no longer beads on the surface.

Check your fence annually for loose screws, rotting posts, or gaps. Replace damaged pickets promptly. Keep vegetation trimmed away from the fence to prevent moisture buildup. With proper care, a wood fence can last 15–20 years.

Worked Example: 150-Foot Fence

For a 150-foot (45.7 m) fence with 8-foot (2.4 m) post spacing, you’ll need about 19 posts (150 ÷ 8 = 18.75, round up to 19). Each post hole is 10 inches (25 cm) in diameter and 30 inches (76 cm) deep. That’s about 0.1 cubic yards (0.076 m³) of concrete per hole—so 19 holes × 0.1 = 1.9 cubic yards (1.45 m³). A 50-pound bag yields about 0.375 cubic feet, so you’ll need roughly 137 bags (1.9 × 27 ÷ 0.375). For rails, you’ll need 150 feet × 3 rails = 450 linear feet (137 m) of 2×4. For pickets at 1×6 (5.5 inches wide) with a 3/8-inch gap, each picket covers 5.875 inches; 150 feet × 12 = 1800 inches ÷ 5.875 = about 306 pickets. Add 10% for waste—that’s 337 pickets.

Fence Height and Gate Decisions

Most residential areas allow 6-foot (1.8 m) fences for backyards and 4-foot (1.2 m) for front yards. Check your local code. For gates, build them with a diagonal brace to prevent sagging—use a 2×4 from the bottom hinge corner to the top latch corner. Install hinges rated for the gate weight; a 4-foot (1.2 m) wide gate with heavy pickets can weigh over 100 pounds (45 kg).

Frost Line and Soil Types

If you live in a cold climate, the frost line can be 3–4 feet (0.9–1.2 m) deep. Set posts below that depth to avoid heaving. In sandy soil, use more concrete to anchor posts; in clay, add extra gravel to improve drainage. If you hit rock, you may need to use a different post setting method—check with a local building supply.

DIY Wood Fences for Sloped Yards

If your yard slopes, you have two options: step the fence down following the slope, or rack the fence to keep the top level. Stepping is simpler—each post is set at a different height, and pickets are cut to match. Racking requires angled rails and is harder. For slopes over 15%, consider a stepped design to avoid gaps under the fence.

How to Measure and Cut Pickets on a Slope

Measure the vertical distance from the top rail to the ground at each post. Cut pickets to that length, leaving a 2-inch (5 cm) gap at the bottom. Use a circular saw with a straightedge guide for clean cuts. If you have many cuts, a miter saw speeds things up.

DIY Wood Fences: Safety and Tools

Wear safety glasses and gloves when cutting wood. Use a circular saw or miter saw for precise cuts; a handsaw works but takes longer. For digging, a manual post hole digger is fine for a few holes, but a powered auger saves time for many. Always have a helper when setting posts—they’re heavy.

If you’re using a ladder to reach high rails, ensure it’s on stable ground. Never work on a ladder in windy conditions. For electrical or gas lines, call 811 before digging—never assume.

Cost-Saving Tips for DIY Fences

Buy lumber in bulk from a local yard to save money. Use pressure-treated wood for posts and rails, and cedar for pickets if you want a nicer look. Consider using 1×6 pickets instead of 1×4—they cover more area with fewer boards. Reuse old pickets if they’re still solid, but inspect for rot.

If you’re on a tight budget, skip the concrete and use gravel to set posts—this works in well-drained soil but is less stable. For most DIYers, concrete is worth the extra cost.

When to Call a Professional

If your fence line crosses a steep slope, requires retaining walls, or you’re unsure about property lines or utility locations, hire a contractor. Also, if you have rocky soil that makes digging difficult, or if you need a fence taller than 6 feet, professional help is safer. For anything involving electrical or gas lines, call the utility company first.

If you’re building a fence on a shared property line, talk to your neighbor before starting—a written agreement prevents disputes.

Common Fence Problems and Fixes

Leaning posts usually mean the concrete wasn’t deep enough or the hole wasn’t drained. To fix, dig out around the post, add gravel, and re-pour concrete. Rotting pickets at the bottom are often from soil contact—keep pickets at least 2 inches (5 cm) above ground. Sagging gates need a diagonal brace or stronger hinges.

If pickets warp, replace them with kiln-dried wood. If the fence discolors, clean with a wood cleaner and re-seal.

DIY Wood Fences for Pets and Kids

For pets, choose a picket spacing that prevents escape—dogs can squeeze through gaps over 4 inches (10 cm). Use a 3/8-inch gap for small dogs. For kids, ensure the fence is climb-resistant—avoid horizontal rails that are easy to grip. Consider a self-closing gate for safety.

If you have a pool, check local pool fence codes—they often require specific heights and self-latching gates.

DIY Wood Fences: Frequently Asked Questions

How deep should fence posts be?

At least 1/3 of the post height, plus 6 inches for gravel. For a 6-foot post, that’s 2.5 feet deep, but go deeper if your frost line is lower.

Can I set posts in gravel instead of concrete?

Yes, but it’s less stable. Use concrete for most situations, especially in clay or wet soil.

How long does a wood fence last?

With pressure-treated posts and cedar pickets, 15–20 years. Regular sealing extends life.

What’s the best wood for a fence?

Cedar and redwood are naturally rot-resistant; pressure-treated pine is cheaper and lasts long if kept dry.

Do I need a permit for a fence?

Most areas require a permit for fences over 6 feet. Check with your local building department.

Spotted a mistake? Tell us and we will correct it. How we write and check articles.