Guide

Complete Guide to Planning & Building a Fence (2025)

Everything you need to know about planning and building a fence. From permits to post-setting to finishing.

1. Planning Your Fence

Before buying a single board, you need to plan. Start by determining your property lines — a survey is the most reliable way to establish boundaries. Check local building codes and HOA rules for height restrictions, setback requirements, and material restrictions. In most areas, fences in backyards can be up to 6 feet, while front yards are limited to 4 feet. Talk to your neighbors about your fence plans; many jurisdictions require notification and some have 'good neighbor' fence laws requiring the finished side to face outward.

Tips:

  • Get a property survey before building — fence disputes are common and expensive
  • Check if you need a permit (most areas require permits for fences over 6 feet)
  • Notify neighbors before construction, even if not legally required

2. Choosing Materials

Wood (cedar or pressure-treated pine) is the most popular DIY choice — affordable, workable, and attractive. Vinyl costs more upfront but requires zero maintenance. Chain link is cheapest and most durable but provides no privacy. Composite is a premium option that looks like wood without the maintenance. For wood, cedar is naturally rot-resistant and beautiful but costs 30-50% more than pressure-treated pine. Pressure-treated pine is the best value and lasts 15-20 years.

Tips:

  • Cedar is premium but worth it if budget allows
  • Pressure-treated pine must dry 2-3 months before staining
  • Buy 10% extra materials for waste and defects

3. Layout and Marking

Use stakes and string line to mark your fence line. Start at corners and ends, driving stakes exactly where posts will go. Run string between stakes — this is your reference line. Mark post locations along the string at your chosen spacing (typically 8 feet). Use spray paint on the ground to mark each post hole. Double-check all measurements and ensure the line is straight before digging.

Tips:

  • Use the 3-4-5 triangle method to ensure 90-degree corners
  • String line should be at the height of your finished fence for reference
  • Mark utility lines before digging — call 811 at least 48 hours before

4. Setting Posts

Posts are the foundation of your fence. Dig holes 3x the post width and deep enough to bury 1/3 of the total post length (minimum 24 inches). Add 2-3 inches of gravel at the bottom for drainage. Set corner and end posts first, then line posts. Pour concrete around each post, checking plumb (vertical) on two adjacent sides with a level. Crown the concrete slightly above grade so water drains away from the post. Allow concrete to cure at least 24-48 hours before attaching rails.

Tips:

  • A post hole digger works for a few holes; rent an auger for many
  • Check plumb on TWO sides of each post, not just one
  • Set corner posts first and string a line between them to align line posts
  • Fast-setting concrete is convenient but standard gives you more working time

5. Installing Rails

Rails are the horizontal supports that boards attach to. For fences under 6 feet, install 2 rails. For 6 feet and above, use 3 rails for strength. The top rail should be about 6-8 inches from the fence top, and the bottom rail 6-8 inches from the ground. For a 6-foot fence with 3 rails, space them evenly. Attach rails to posts using rail brackets, toe-nailing, or by cutting notches (dados) in the posts. Rails should meet at the center of posts.

Tips:

  • Use a chalk line stretched between end posts to keep rails level
  • Rails can be installed on top of posts (flat cap style) or between posts (bracket style)
  • Stagger rail joints so they don't all land on the same post

6. Attaching Boards/Pickets

Start at one end and work your way across. For privacy fences, place boards edge to edge. Use 2 screws or nails per board at each rail. Start boards 2 inches above grade to prevent rot. Use a spacer jig for consistent gaps on picket fences. Check plumb every 5th board and adjust if needed. Dog-ear or pointed tops add style; straight tops are easier to cut and install.

Tips:

  • Pre-drill near board ends to prevent splitting
  • Use exterior-rated screws — they last much longer than nails
  • Check plumb every few boards and correct before it compounds
  • Leave a small gap (1/16") between privacy boards for wood expansion

7. Hanging Gates

Gates should be installed after the fence is complete. Use heavy-duty hinges rated for your gate weight. For wood gates, build a rectangular frame and add a diagonal brace running from the bottom hinge side to the top latch side — this prevents sagging. Allow 1/2 inch clearance on each side for swing. Gate posts should be 6x6 for wood fences. Install the latch at a comfortable height (36-42 inches).

Tips:

  • The diagonal brace must run from bottom-hinge to top-latch corner
  • For pool fences, self-closing hinges and self-latching locks are required by code
  • Hang the gate and adjust hinges before attaching boards to the gate frame

8. Finishing

For wood fences, apply stain or sealant to protect against weather, UV damage, and rot. If using pressure-treated wood, wait 2-3 months for the wood to dry before staining. Cedar can be stained immediately or left to weather to a natural gray. Apply stain with a sprayer, roller, or brush — sprayer is fastest for large fences. Reapply stain every 2-3 years. Install post caps to prevent water from entering the end grain of posts.

Tips:

  • Stain on a dry, overcast day — direct sun causes uneven drying
  • Two thin coats are better than one thick coat
  • Post caps are functional (prevent rot) as well as decorative

Frequently Asked Questions

How long does it take to build a fence?

A DIY 100-foot fence takes most homeowners 2-3 weekends. Day 1: layout and digging. Day 2: setting posts and curing. Day 3-4: rails and boards. A professional crew can complete 100-150 feet in a single day.

Can I build a fence by myself?

Yes, a fence is one of the most achievable DIY projects. The hardest parts are digging post holes (rent an auger!) and keeping everything plumb and level. Having a helper makes it significantly easier, especially for holding posts and lifting heavy panels.

How much can I save by building a fence myself?

DIY typically saves 40-60% compared to hiring a contractor. On a $6,000 professionally installed fence, you might spend $2,500-$3,500 on materials only. Your main investment is time and tool rental.