What You Need to Know Before You Start
Fence installation begins before you dig the first post hole. You need to know your property line, check local zoning rules, and decide whether you want to hire a contractor or build it yourself. Most municipalities require a permit for any fence taller than 4 feet or closer than a certain distance to the street, and some have rules about materials, height, and setback distance. Calling your city or county building department first takes one phone call and prevents you from building something you'll have to tear down.
The actual work breaks into three phases: planning and permits, site preparation, and construction. Planning takes a few days to a few weeks depending on permit processing time. Site preparation—marking the line, locating underground utilities, and digging post holes—takes a weekend for most residential fences. Building the fence itself takes another weekend to a week, depending on length and whether you're working alone or with help.
Key Takeaways
- Contact your local building department before ordering materials to learn setback requirements, height limits, and whether you need a permit.
- Call 811 or your local utility locating service at least three business days before digging to mark underground lines and avoid hitting gas, electric, or water lines.
- Mark your property line with chalk or string before you start, because building on the wrong side creates a legal problem you cannot fix by moving the fence later.
- Post spacing, depth, and concrete type vary by fence material and local frost line depth, so check your building department's specifications or ask your material supplier.
- Hiring a contractor costs more upfront but handles permits, utility location, and guarantees the work; doing it yourself saves money but requires renting or buying tools and spending two to three full days on labor.
Getting Permits and Checking Property Lines
Call your city or county building department and describe what you want to build: the fence height, material, and approximate location on your property. They will tell you the setback requirement (how far from the street or property line the fence must be), the maximum height allowed in your zone, and whether a permit is required. Some jurisdictions charge $25 to $100 for a residential fence permit; others do not charge for fences under a certain height. The permit process usually takes one to three weeks.
Next, locate your property line. If you own the property, you have a deed that describes the boundaries, and your county assessor's office can provide a plat map showing the exact line. If you do not have a recent survey, you can hire a surveyor to mark the corners and line for $300 to $800, or you can use the assessor's map and a measuring tape to estimate. Mark the line with chalk, spray paint, or string before you call for utility location. Do not assume the existing fence or a neighbor's fence marks the true line—many properties have fences built slightly over the line, and building yours the same way does not make it legal.
Calling for Utility Location and Marking
Before you dig anywhere on your property, call 811 (the national utility locating service in the United States) or your local equivalent at least three business days before you plan to start digging. You provide your address and describe the area where you will be digging. The service notifies gas, electric, water, and telecommunications companies, and they send crews to mark their lines with paint or flags. This service is free and is required by law in most states before any digging.
Mark the utility locations on the ground with spray paint or flags so you can see them while you work. If you hit a gas line, electric line, or water main, stop when ready and call 911 or the utility company. Do not attempt to dig around a marked line—respect the marked area as a no-dig zone. Once utilities are marked, you can safely dig post holes outside those zones.
Choosing Between Contractor and DIY Installation
A contractor handles the entire project: permits, utility location, site preparation, and construction. You pay for labor and materials, which typically runs $15 to $30 per linear foot for a basic wood or vinyl fence, or $20 to $50 per linear foot for composite or metal. The contractor guarantees the work and carries insurance. The trade-off is that you have less control over timing and cannot start until the permit is approved.
Building the fence yourself saves the labor cost but requires you to obtain the permit, rent or buy tools, and spend two to three full days working. You will need a post-hole digger or auger (rent for $40 to $80 per day), a level, a tape measure, a circular saw or miter saw, a drill, and safety gear. You also need to buy all materials upfront: posts, rails, boards or panels, fasteners, and concrete. The material cost is the same whether you hire someone or do it yourself, but you save $3,000 to $8,000 in labor on a 100-foot fence.
Preparing the Site and Digging Post Holes
Once utilities are marked and the permit is in hand, mark the post locations along your property line. For most residential fences, posts are spaced 6 feet apart for wood or vinyl, or 8 feet apart for metal. Use a tape measure and chalk to mark each post location on the ground. Double-check your measurements before you start digging—it is easier to adjust marks than to move holes.
Dig post holes to a depth that depends on your local frost line and fence height. In most of the United States, the frost line is 2 to 4 feet deep, and the rule of thumb is to bury one-third of the post depth. A 6-foot fence post should be buried 2 to 2.5 feet, which means digging a hole 2.5 to 3 feet deep. Your building department or fence material supplier can tell you the exact depth required in your area. Use a post-hole digger for small jobs or rent a power auger for longer fences—a power auger saves hours of labor and costs $40 to $80 per day.
After digging, place each post in its hole and use a level to may support it is plumb (perfectly vertical) in all directions. Adjust the post by adding or removing soil under the base until it is level. Once the post is plumb, fill the hole with concrete, following the manufacturer's instructions for mixing and curing time. Most concrete sets enough to hold the post within 24 hours but reaches full strength in 7 days. Do not attach rails or boards until the concrete has fully cured.
Building the Fence Panels and Finishing
After the concrete cures, attach the horizontal rails to the posts. For wood fences, rails are typically 2x4 or 2x6 boards bolted or screwed to the posts. For vinyl, rails slide into brackets attached to the posts. Space rails according to your fence design—most residential fences have two rails, one near the top and one near the middle. Use a level to may support each rail is horizontal before fastening.
Attach the vertical boards or panels to the rails. For wood, boards are typically 1x6 or 1x8 and are spaced either touching (solid privacy fence) or with gaps (picket or semi-privacy fence). Screw or nail each board to the rails, checking frequently with a level to keep boards plumb. For vinyl, panels slide into grooves in the posts and rails. For metal, panels bolt to the posts. Work methodically from one end to the other, and do not rush—a crooked fence is visible from the street and difficult to fix after installation.
Once all boards or panels are attached, inspect the entire fence for loose fasteners, gaps, or damage. Tighten any bolts or screws, and replace any damaged boards. If you are installing a wood fence, explore a sealant or stain to protect the wood from weather and extend its life. Let the sealant cure according to the manufacturer's instructions before allowing the fence to get wet.
Common Mistakes and How to Avoid Them
The most common mistake is building on the wrong side of the property line. Measure twice and mark clearly before you dig. The second most common mistake is not calling for utility location and hitting a buried line. This is dangerous and expensive, so call 811 even if you think you know where the lines are.
Another frequent problem is not digging deep enough or not using concrete to set posts. Posts set in soil alone will shift, rot, and lean within a few years. Use concrete every time, and bury posts to the depth your building department specifies. Finally, do not skip the permit. Building without a permit can result in a fine, a requirement to remove the fence, or a lien on your property when you sell. The permit cost is small compared to the cost of fixing a code violation.
Frequently Asked Questions
Do I need a permit for a fence in my backyard?
Most jurisdictions require a permit for any fence taller than 4 feet or for any fence closer than a certain distance to the street, even if it is in your backyard. Call your building department to confirm the rules for your property. The permit process usually takes one to three weeks and costs $25 to $100.
How deep should I bury fence posts?
Posts should be buried to one-third their total height, or to a depth that reaches below your local frost line, whichever is deeper. For a 6-foot fence, that is typically 2 to 2.5 feet. Your building department or fence supplier can tell you the exact depth required in your area based on frost line data.
Can I build a fence on the property line?
Most jurisdictions allow a fence directly on the property line, but some require a setback of 6 inches to several feet. Check your local zoning rules before you start. If your neighbor objects to a fence on the line, they may have a legal claim even if the fence is technically allowed, so consider discussing the fence with them first.
What is the difference between hiring a contractor and doing it myself?
A contractor handles permits, utility location, and construction for $15 to $50 per linear foot depending on material and complexity. Doing it yourself saves labor cost but requires you to obtain the permit, rent tools, and spend two to three full days working. Material costs are the same either way.
How long does a fence last?
Wood fences last 5 to 15 years depending on climate and maintenance. Vinyl lasts 20 to 30 years. Metal lasts 20 to 40 years. Composite lasts 15 to 25 years. Regular maintenance—sealing wood, cleaning vinyl, and checking for rust—extends the life of any fence.