Garden & Outdoor

How to Install a Fence

A practical walkthrough from property line to finished picket — what to do at each step and why it matters.

12 min read

1

Plan the layout and check the rules

Before you buy a single post, verify your property line. A fence installed even a foot over the line may have to come down. If you don't have a recent survey, look for the iron pins at your lot corners or pull your plat from the county recorder's office. When in doubt, hire a surveyor — it costs less than tearing out 100 feet of fence.

Check HOA rules and local codes. Most neighborhoods restrict fence height in front yards, and many require permits for any fence over 4 feet. The permit process usually takes a few days and requires a simple sketch showing the fence location relative to your house and property line.

Call 811 before you dig

Call at least 3 business days before digging. Utility companies will mark gas, electric, water, and telecom lines on your property for free. It takes two minutes and is required by law in most states.

2

Calculate your materials

Walk the full perimeter and measure total linear footage. Then use the fence calculator to get your post, rail, picket, and concrete counts before you head to the store. The main decisions that drive your material list:

  • Post spacing: 6 ft on center is standard for privacy fences. 8 ft is fine for split rail or lighter panel fences.
  • Post size: 4×4 for fences up to 6 ft tall. 6×6 for 8 ft fences, heavy gates, or corner posts on windy sites.
  • Post length: Total length = fence height + burial depth. A 6 ft fence with 3 ft burial needs 9 ft posts.
  • Rails: 2 rails for fences under 5 ft; 3 rails for 6 ft privacy fences.
  • Pickets: 1×6 dog-ear is most common for privacy. Buy 10% extra for cuts and rejects.

Post burial rule of thumb

Bury one-third of the total post length. In cold climates, confirm this gets you below the local frost line — if it doesn't, go deeper regardless of the one-third rule.

3

Lay out the fence line

Drive a stake at each corner and gate opening, then run a string line tight between them along the full fence run. This is your reference line — every post will be set to it. Spray paint or mark post center locations on the ground at your chosen spacing before you dig anything.

Check corners for square using a 3-4-5 triangle: measure 3 ft along one side and 4 ft along the other — the diagonal between those points should be exactly 5 ft if the corner is 90°. A fence that's out of square is obvious and permanent.

Mark all post locations with a can of marking paint before touching a post hole digger. Walking the line lets you catch problems — a post location in the middle of a buried irrigation line, a corner that cuts off a garden bed — before you've done any work.

4

Dig post holes

A clamshell post hole digger works for a handful of holes in soft soil. For anything more than 6 holes or rocky ground, rent a one-man gas auger — it will save hours of work. The hole diameter should be about 3 times the post width: a 4×4 post goes in a 10- to 12-inch hole.

Pour 6 inches of gravel into the bottom of each hole and tamp it down before setting the post. This drainage layer is the single most effective thing you can do to extend post life — it keeps the post base from sitting in standing water.

Efficient approach

Dig all holes before setting any posts — it's faster to be in one mode at a time, and you can adjust spacing if you hit an obstruction.

Common mistake

Setting posts one at a time and pouring concrete immediately makes it hard to adjust alignment. Set all posts first, check them, then pour.

5

Set and plumb the posts

Start with the corner and end posts. Drop each post into its hole, align it to the string line, and check plumb on two adjacent faces with a level. Brace each post with two diagonal 2×4 stakes nailed to the post before letting go — posts that aren't braced will shift when you pour concrete.

For fast-setting concrete, pour the dry mix directly into the hole around the post, filling to about 3 to 4 inches below grade. Add water slowly according to the bag instructions — typically about a quart per 50 lb bag. The concrete sets in 20 to 40 minutes and is workable enough to hang rails the same day.

Once corner and end posts are set and cured, stretch a line between them at the top of the posts. Set all line posts to this string — it controls height consistency across the run. A line post that's an inch high throws off every picket above it.

6

Install the rails

Rails run horizontally between posts and give pickets something to nail to. For a 6 ft privacy fence with 3 rails, position them at roughly 9 inches from the top, 9 inches from the bottom, and centered in between. The exact spacing matters less than consistency across the run.

There are two ways to attach rails: notching the posts or using metal rail brackets. Notching (cutting a dado into the face of each post) gives a cleaner look and a stronger connection, but requires a circular saw and more layout time. Fence rail brackets are faster and still plenty strong for residential use — a good option if you're working alone.

Cut rails to fit snug between posts. Don't let rail joints fall in the center of a span — if a rail is too short to reach the next post, use a longer board or let the joint land at a post.

7

Nail the pickets

Snap a chalk line at ground clearance height — typically 2 inches above grade — and use it to align the bottom of every picket. A picket resting on the ground will rot in a few years; the gap allows airflow and keeps the wood dry.

Use a scrap of wood cut to your desired gap width as a spacer. For a privacy fence, this is zero — butt each picket tight. Pre-drill pilot holes near the top and bottom of each picket before nailing or screwing to prevent splitting. Two fasteners per rail contact point is the minimum; three is better on the bottom rail where soil moisture is highest.

Run the pickets a few inches long past the end posts, then snap a single chalk line and trim them all at once with a circular saw. One pass gives you a perfectly straight, clean edge that would be nearly impossible to achieve by cutting each board individually before installing.

8

Hang the gate

Gates need more support than line posts — the hinge post takes repeated lateral load every time the gate swings. Use a 4×4 minimum for gates up to 4 ft wide; a 6×6 for anything wider. Set gate posts in at least 3.5 ft of concrete.

Build the gate frame from 2×4 material with a diagonal brace running from the bottom hinge corner to the top latch corner. The diagonal prevents the gate from racking (sagging at the latch side) over time. It must run uphill from hinge to latch — not the other direction.

Shim the gate to the correct height with scrap wood before marking hinge positions. Leave 1/2 inch of clearance at the bottom for the gate to swing freely over uneven ground. Heavy-duty strap hinges or wrap-around gate hinges are worth the extra cost — undersized hinges are the first thing to fail on a residential gate.

9

Finish and protect the wood

New pressure-treated wood needs to dry before it accepts stain or sealer — typically 3 to 6 months depending on your climate. You can tell it's ready when water beads up less and soaks in instead. Staining too early means the finish sits on top and peels rather than penetrating the wood.

Install a post cap on every post before the wood dries. End grain soaks up water far faster than face grain and is where rot starts. Plastic post caps cost under $2 each; metal caps cost a bit more but last longer and look better.

When the wood is ready to finish, apply a penetrating oil or semi-transparent stain rather than a solid-color paint. Paint traps moisture and eventually peels; a penetrating finish feeds the wood and wears gracefully. Reapply every 2 to 3 years to keep the fence looking good and the wood protected.

Installation order at a glance

  1. Verify property line, check permits, call 811
  2. Calculate materials with the fence calculator
  3. Stake corners, run string line, mark post locations
  4. Dig all holes, add 6 in. of gravel to each
  5. Set and brace corner/end posts, pour concrete
  6. Set line posts to a string stretched between end posts
  7. Install rails — notched or bracketed
  8. Nail pickets from a chalk line, trim ends in one pass
  9. Build and hang gate with diagonal brace
  10. Cap posts, let dry 3–6 months, then stain or seal

Related Calculators

Tools and Materials for the Job

Everything you need to get posts set and pickets hung.

Amazon

Quikrete Fast-Setting Concrete Mix — 50 lb

No mixing required — pour dry into the hole, add water on top, and posts are set solid in 20–40 minutes. One bag sets a typical 4×4 line post. Corner and gate posts need two bags.

~$8/bag

Buy at Amazon
Amazon

Southland 4×4×8 Pressure-Treated Fence Post

Standard #2 pressure-treated pine post for 6-foot privacy fences. Ground contact rated (UC4B treatment). For 8-ft fences use 4×4×12. Check local box stores for in-stock lengths.

~$13–$18/post

Buy at Home Depot
Amazon

Vigoro 1×6×6 Dog-Ear Pressure-Treated Privacy Fence Picket

The most common privacy fence picket. Dog-ear top sheds water. Pressure-treated for ground contact. Available in both 1×4 and 1×6 widths — 1×6 fills faster and uses fewer fasteners.

~$3–$5/picket

Buy at Home Depot
Milwaukee M18 Cordless Drill/Driver — 2-Tool Combo Kit

Milwaukee M18 Cordless Drill/Driver — 2-Tool Combo Kit

Drill pilot holes and drive screws all day on one charge. The combo kit includes both a drill and an impact driver — use the drill for pilot holes, impact driver for screws. Essential for any fence project.

~$199

Buy at Amazon
Amazon

YARDGARD 2×4×8 Pressure-Treated Fence Rail

Standard horizontal rail for privacy and picket fences. Two rails per section for fences under 5 ft, three rails for 6 ft and above. Notch into post or use a fence rail bracket for a faster install.

~$8–$12/rail

Buy at Home Depot
Simpson Strong-Tie Post Cap — 4×4 (pkg of 10)

Simpson Strong-Tie Post Cap — 4×4 (pkg of 10)

Galvanized metal post caps keep water off end grain and dramatically extend post life. Takes 30 seconds per post to install. Inexpensive insurance against the #1 cause of fence post rot.

~$18/10-pack

Buy at Amazon

* Affiliate links — we may earn a small commission at no extra cost to you.

Common questions about fence installation