Project Guide

How to Build a Fence

1
Plan Your Fence
A person moves a board while planning a fence.
  • Before you build a fence, determine whether a permit is necessary and if local building codes place restrictions on height and other factors. Backyard fences can be limited to 6 to 8 feet.
  • Fences often can have longer lives based on their building materials. Treated cedar, one of the most durable, lasts up to 40 years when properly installed and maintained.
  • Determine your property line (your utility company can help) and how you want your fence positioned in relation to it. 
  • As a courtesy, review any fence plans with neighbors who share your property line to head off any future disputes.
  • Select your fence type first so you can determine the available widths of each fence panel. 
  • Determine where you want to locate your gates and spray paint parallel lines to indicate the gate placement. Measure and document all gate sizes. 
  • Subtract the gate footage from the fence footage to figure the linear footage of the fence, then divide the linear footage of fencing by the panel length of the style fence you selected. This will determine the total fence panels or pickets you need. Remaining footage will require a partial panel. To calculate width when using pickets, determine both your picket width and spacing between pickets.
  • For every panel and partial panel, add two to derive the total fence posts needed, and, if you are adding post caps, the number of post caps needed and any trim required.
2
Measure and Lay Out the Fence Posts
A person uses spray paint to mark the placement of a new fence.
  • Outline your proposed fence line with spray paint, then measure the outline of your fence perimeter with a measuring wheel. 
  • Use chalk lines as a guide. 
  • Position the fence posts every 6 to 8 feet along the line where you want the fence to stand. Make sure the spaces between the posts are consistent.
3
Dig Holes
A person uses a post-hole digger while building a fence.

With a post hole digger, dig holes approximately 33 percent as deep as they are tall (an 8-foot post needs a hole at least 2 1/2 feet deep), plus a few inches for gravel. Avoid utility lines and pipes. In colder climates, dig below the frost line.

4
Add Concrete and Gravel and Position Posts
A person adds gravel to a hole for a fence post.
  • Once the holes are dug, pour 3 to 4 inches of gravel down the base of the hole for proper drainage. 
  • Add 6 to 8 inches of concrete mix once the gravel is set. 
  • Position the post in the middle of the concrete mix, making sure to slope the concrete mix away from the post. 
  • Plumb post with a level. 
  • Follow the manufacturer’s instructions to allow for proper drying and curing time, which may take up to three days.
5
Attach Rails or Panels to Posts
A person uses a power drill to secure a rail to a fence.
  • Once the concrete has cured, attach the wood fence rails or wood fence panels to the posts. 
  • Secure each rail with No. 8 2 1/2-inch deck screws or galvanized 10d x 3-inch nails. Power drills or claw hammers are effective tools for this step.
  • Panels are typically faster to construct. If you are using panels, proceed to Step 7 once the panels are secured to the posts. 
  • If you use vinyl, chain link or aluminum for your fence, use deck screws instead of nails.
6
Attach Pickets to Rails
A person uses a power drill to attach fence pickets to a rail.
  • Once the rails are in place, begin attaching the pickets to the rails. 
  • Secure each picket with No. 8 2 1/2-inch deck screws or galvanized 10d x 3-inch nails. Screwdriver sets can be helpful in this process.


Tip: Individual pickets are often more attractive on slopes, allowing you to create a straight line across the top.

7
Attach Post Caps
A person uses a mallet to a attach a post cap to a fence.
  • To finish building a fence, attach the post caps to the posts. 
  • Tap each cap lightly with a rubber mallet until each one fits snugly onto the post.
8
Stain or Treat the Wood
A person stains a new fence with a paintbrush.
  • After building a fence, staining or treating the wood can be the first step in proper maintenance that can extend its life. 
  • When the fence is in place, apply paint, stain or a weather-proofing finish according to manufacturer’s instructions.
  • Apply wood preservative around the base posts to prevent the wood from rotting.
  • If the fence is built of pressure-treated wood, wait until the wood has fully dried before applying stain or finish. Pressure-treated wood should not need additional preserving or water-proofing.
  • Apply new coats every 2 to 3 years, and be sure to clean the fence with a wood or fence cleaner the day before application. 

Learning how to build a fence can require careful planning and construction, but a diy fence can improve your home’s appearance and security. If you'd prefer to have a professional to build a fence on your property, learn more about Home Depot installations.