Planning Your Fence -- What You Need to Know Before Measuring

Building a fence is one of those projects that rewards planning more than almost any other home improvement job. A deck or a paint job can tolerate some improvisation. A fence? Not so much. Posts are set in concrete. Rails are cut to specific lengths. If your measurements are off or you missed a step in the planning phase, you'll find out the hard way -- usually when you're standing in your yard with a bag of concrete and a post that doesn't line up.

Before you pick up a tape measure, work through these four things first.

Know Your Property Lines

This is the single most important step, and it's the one most people skip. Your fence needs to be on your property, not your neighbor's. If you have survey stakes (small metal pins at the corners of your lot), great -- use those. If not, check your plat map (available from your county recorder's office) or hire a surveyor. A property survey costs $300 to $800, which sounds like a lot until you compare it to the cost of tearing down a fence that's 18 inches onto your neighbor's land.

Check Local Codes and HOA Rules

Most cities and counties regulate fence height, placement, and sometimes materials. Common rules include:

  • Maximum height: 6 feet in backyards, 4 feet in front yards (varies by jurisdiction)
  • Setback requirements: Fences may need to be 1 to 6 inches inside the property line
  • Style restrictions: Some HOAs ban chain link or require specific colors
  • Permit requirements: Many areas require a permit for fences over 6 feet

Call your local building department or check their website. This takes 15 minutes and can save you from an expensive mistake.

Call 811 Before You Dig

This is free, it's the law, and it might save your life. Call 811 (or visit call811.com) at least 2 to 3 business days before you plan to dig post holes. They'll send utility locators to mark buried gas, electric, water, cable, and sewer lines in your yard. Hitting a gas line with a post hole digger is dangerous. Hitting a fiber optic cable is expensive. Both are entirely avoidable.

Plan Your Gates

Think about where you need access before you finalize the fence layout. Common gate sizes:

  • Walk-through gate: 3 to 4 feet wide (enough for a person with a wheelbarrow)
  • Double gate / vehicle access: 10 to 16 feet wide (for mowers, trailers, cars)
  • Garden gate: 3 feet is usually plenty

Every gate needs two dedicated gate posts, and those posts should be heavier than your line posts -- 6x6 lumber instead of 4x4 -- because the swinging gate puts lateral stress on the posts that regular fence sections don't.

Know your fence dimensions? Get your materials list now.

Open Fence Calculator

How to Calculate Fence Materials

Fence material calculations aren't complicated, but there are several components to track. Here's the step-by-step process.

Step 1: Measure Your Total Fence Length

Walk the perimeter where you want the fence and measure the total linear feet. Use a long tape measure or a measuring wheel for accuracy. If your yard isn't perfectly rectangular, measure each straight run separately and add them together.

Step 2: Subtract Gate Openings

Take your total fence length and subtract the width of each gate opening. A 150-foot fence line with one 4-foot gate and one 12-foot double gate has 134 feet of actual fence to build (150 - 4 - 12 = 134).

Step 3: Calculate Posts

The formula for fence posts is:

Total Fence Length / Post Spacing + 1 = Line Posts

Then add 2 extra posts for each gate (gate posts are in addition to line posts).

Step 4: Calculate Rails

Rails are the horizontal boards that run between posts. The number of rails per section depends on fence height:

  • Fences under 5 feet: 2 rails per section
  • Fences 5 to 7 feet: 3 rails per section (most common for 6-foot privacy fences)
  • Fences 8 feet: 4 rails per section

Total Sections x Rails Per Section = Total Rails

Step 5: Calculate Pickets

For pickets (the vertical boards), the formula depends on whether you want a privacy fence or a spaced picket fence:

  • Privacy fence (no gaps): Fence Length in Inches / Picket Width = Pickets Needed
  • Spaced picket fence: Fence Length in Inches / (Picket Width + Gap Width) = Pickets Needed

Standard picket widths: a 1x4 board is 3.5 inches wide; a 1x6 board is 5.5 inches wide.

Worked Example: 150 Feet of 6-Foot Privacy Fence

Let's say you're building 150 linear feet of 6-foot-tall privacy fence with one 3.5-foot walk gate, using standard 8-foot post spacing and 1x6 boards (5.5 inches wide, no gaps).

  1. Fence length for pickets: 150 - 3.5 = 146.5 feet of fence sections
  2. Posts: 150 / 8 = 18.75, rounded up to 19, plus 1 = 20 line posts. Plus 2 gate posts = 22 posts total.
  3. Sections: 20 - 1 = 19 sections (one fewer than the number of line posts)
  4. Rails: 19 sections x 3 rails = 57 rails (using 3 rails for a 6-foot fence)
  5. Pickets: 146.5 feet x 12 inches = 1,758 inches / 5.5 inches = 320 pickets
  6. Concrete: 22 posts x 1.5 bags average = 33 bags of 50-lb quick-set concrete
  7. Fasteners: 320 pickets x 6 screws = 1,920 screws (roughly 12 lbs of 1-5/8" exterior screws)

That's your complete materials list. Add 5 to 10 percent extra pickets for cuts, warped boards, and mistakes, and you're ready to buy.

Don't want to do the math by hand?

Use Our Free Fence Calculator

Fence Post Spacing -- The Critical Measurement

Post spacing is the single most important structural decision you'll make. Space your posts too far apart and the fence will sag, lean, or blow over in a storm. Space them too close and you'll spend unnecessary money on extra posts and concrete.

8-Foot Spacing (Standard)

This is the most common post spacing for residential wood fences. It works well for 4-foot to 6-foot fences in areas without extreme weather. Standard lumber (rails) comes in 8-foot lengths, so this spacing means zero cutting waste on your rails -- each rail spans exactly one section.

6-Foot Spacing (Heavy Duty)

Use 6-foot spacing when:

  • You live in a high-wind area
  • The fence is 7 to 8 feet tall
  • You're using heavy materials (thick boards, composite panels)
  • The fence line runs along a slope where posts carry more lateral load

The trade-off is more posts (and more post holes to dig), but the fence will be significantly sturdier. For every 100 feet of fence, 6-foot spacing means 18 posts instead of 14 -- four extra holes, four extra bags of concrete, but a fence that can handle a 60 mph wind gust.

Corner Posts and End Posts

Every corner and every end of a fence run needs a post, regardless of spacing. If your 100-foot fence line has two 90-degree corners, those corners get posts even if the spacing doesn't line up perfectly. Your line post spacing fills in the gaps between these mandatory structural posts.

Gate Posts

Gate posts take more abuse than any other post in your fence. The swinging weight of the gate, repeated opening and closing, and lateral forces all concentrate on these two posts. Best practices:

  • Use 6x6 posts for gates (not 4x4)
  • Set gate posts at least 30 inches deep (deeper than line posts)
  • Use 2 bags of concrete per gate post
  • For wide double gates, add a center latch post

Concrete Per Post

Each post hole should be about 3 times the width of the post and at least one-third the total post length deep. For a 4x4 post on a 6-foot fence (using 8-foot posts, 2 feet underground), that's a hole about 10 to 12 inches wide and 24 inches deep.

Post Type Hole Width Hole Depth Concrete (50-lb bags)
4x4 line post 10-12 inches 24 inches 1 bag
4x4 corner/end post 12 inches 24-30 inches 1.5 bags
6x6 gate post 14-16 inches 30-36 inches 2 bags
Pro Tip: Use fast-setting concrete (like QUIKRETE Fast-Setting) for fence posts. You pour it dry into the hole, add water, and it sets in 20 to 40 minutes. No mixing required, and you can attach rails the same day. Traditional concrete requires mixing and a 24 to 48 hour cure time.

Rails, Pickets, and Boards -- What You Need

Horizontal Rails

Rails are the backbone of your fence -- they connect the posts and support the pickets. Most rails are 2x4 lumber (actual size 1.5" x 3.5"). For heavier fences or longer spans, 2x6 rails provide more rigidity.

Rail placement matters:

  • Top rail: 6 to 8 inches below the top of the fence
  • Bottom rail: 6 to 8 inches above the ground
  • Middle rail (if using 3 rails): Centered between top and bottom

Rails typically come in 8-foot lengths to match standard post spacing. If your posts are spaced at 6 feet, you'll need to cut each rail, which creates waste. Factor this into your lumber order.

Pickets and Boards

The math here is straightforward but depends on your fence style:

Fence Style Board Size Gap Boards per 8-ft Section
Privacy (no gaps) 1x6 (5.5") 0" 18 boards
Privacy (no gaps) 1x4 (3.5") 0" 28 boards
Classic picket 1x4 (3.5") 1.75" 19 pickets
Wide picket 1x4 (3.5") 3.5" 14 pickets
Board-on-board 1x6 (5.5") Overlapped 1" 22 boards

Fasteners

Budget 6 to 8 screws or nails per picket (2 per rail contact point). For a fence with 3 rails, that's 6 fasteners per picket. Always use exterior-grade or stainless steel fasteners -- regular screws will rust and leave black streaks down your fence within a year.

For a 150-foot privacy fence with 320 pickets at 6 screws each, you need about 1,920 screws. A 5-pound box of exterior deck screws usually contains about 700 to 1,000 screws, so plan on 2 to 3 boxes.

Types of Fencing and Material Differences

Wood (Cedar, Pine, Pressure-Treated)

Wood is the most popular fencing material in the US, and the most customizable. You can build any height, any style, and stain or paint it any color.

  • Pressure-treated pine: $1 to $5 per picket, $3 to $8 per post. Least expensive, chemically treated to resist rot and insects. Good structural choice for posts and rails. Requires staining or painting within the first year.
  • Cedar: $3 to $8 per picket, $8 to $15 per post. Naturally resists rot and insects without chemical treatment. Weathers to a silver-gray if left unstained. The gold standard for residential fencing.
  • Redwood: $5 to $12 per picket. Beautiful but expensive. Mostly used on the West Coast where it's locally available.

Wood fences last 15 to 20 years with regular maintenance (staining or sealing every 2 to 3 years). Without maintenance, expect 7 to 12 years.

Vinyl

Vinyl fencing is sold in pre-made panels (typically 6 or 8 feet wide) that snap or lock between posts. The calculations are different from wood -- you're counting panels, not individual pickets.

  • Cost: $20 to $40 per linear foot (materials only)
  • Pros: Zero maintenance, never needs painting, doesn't rot
  • Cons: Limited styles, can crack in extreme cold, harder to repair (replace whole panels)
  • Lifespan: 20 to 30 years

Chain Link

Chain link is the most affordable fencing option and the fastest to install. It's sold by the linear foot as a roll of mesh fabric, with separate posts, top rail, and tension hardware.

  • Cost: $5 to $15 per linear foot (materials only)
  • Pros: Cheapest option, durable, minimal maintenance
  • Cons: No privacy (unless you add slats or fabric), industrial appearance
  • Lifespan: 15 to 20 years (galvanized), 20+ years (vinyl-coated)

Composite

Composite fencing combines wood fibers with plastic polymers. It looks like wood but behaves like vinyl -- low maintenance, no painting, no rot.

  • Cost: $25 to $50 per linear foot (materials only)
  • Pros: Wood appearance without wood maintenance, won't rot or warp
  • Cons: Most expensive option, limited color choices, can fade over time
  • Lifespan: 25+ years

Common Fence Building Mistakes

After walking through hundreds of fence projects, these are the mistakes that come up again and again:

  1. Not calling 811. This is the most dangerous mistake on this list. Buried utility lines are invisible until you hit one. A post hole digger can puncture a gas line, nick an electrical cable, or sever a fiber optic line. The 811 service is free and takes 2 to 3 days. There's no excuse to skip it.
  2. Posts not deep enough. In cold climates, shallow posts heave when the ground freezes and thaws. A post that was plumb in October can be leaning 3 inches by March. Set posts below the frost line -- in northern states, that's 36 to 48 inches deep, not the standard 24 inches.
  3. Forgetting about slope. If your yard has any grade change along the fence line, you need to plan for it. There are two approaches: "racking" (angling the fence panels to follow the slope) and "stepping" (keeping panels level and stepping down at each post). Stepping is easier for most DIYers and looks cleaner on steeper grades.
  4. Not adding extra posts for gates. A gate post that's the same size as your line posts will start sagging within a year. Use 6x6 posts for gates, set them deeper, and use more concrete. This is not the place to save $20.
  5. Skipping the concrete. Some people try to set posts by just tamping dirt around them. This works for about one season. Once rain saturates the soil or freeze-thaw cycles loosen the dirt, the post moves. Concrete is cheap insurance -- at about $5 per bag, it adds roughly $70 to $100 to a typical fence project.
  6. Building the fence too close to the property line. Even if you're legally allowed to build right on the line, leaving 2 to 4 inches of space gives you room to maintain the back side of the fence without trespassing on your neighbor's property. It also avoids disputes if the actual property line is slightly different from where you think it is.
Neighbor Tip: Talk to your neighbors before you build. In most areas, the "good side" (the smooth, finished side) of the fence should face outward toward your neighbors. Some local codes require this. Even if yours doesn't, it's good neighborly practice -- and they might even offer to split the cost.

Cost Estimation -- Materials Budget

Fence costs vary widely depending on material, height, and your local lumber prices. Here's a realistic range for materials only (no labor) as of 2026:

Fence Type Cost per Linear Foot 100-Foot Fence 200-Foot Fence
Chain link (4 ft) $5 - $12 $500 - $1,200 $1,000 - $2,400
Pressure-treated pine (6 ft privacy) $8 - $16 $800 - $1,600 $1,600 - $3,200
Cedar (6 ft privacy) $15 - $30 $1,500 - $3,000 $3,000 - $6,000
Vinyl (6 ft privacy) $20 - $40 $2,000 - $4,000 $4,000 - $8,000
Composite (6 ft privacy) $25 - $50 $2,500 - $5,000 $5,000 - $10,000

Where to Save Money

  • Use pressure-treated pine instead of cedar for posts and rails (the structural parts that aren't visible). Use cedar only for the pickets that people see.
  • Use 2 rails instead of 3 if your fence is 5 feet or shorter. Two rails are structurally adequate for shorter fences.
  • Buy lumber in bulk. Most lumber yards offer 10 to 15 percent discounts on large orders. For a full fence project, that discount can save hundreds of dollars.
  • Do it yourself. Labor typically costs $10 to $30 per linear foot on top of materials. A DIY fence project on 150 feet of fencing can save $1,500 to $4,500 in labor costs.

Where NOT to Cut Corners

  • Posts: Use 4x4 minimum (6x6 for gates). Cheap, thin posts are the #1 cause of fence failure.
  • Concrete: Set every post in concrete. Period. No exceptions for "temporary" fences.
  • Fasteners: Use exterior-grade or stainless steel screws. Cheap fasteners rust and your pickets fall off.
  • Gate hardware: Spring-loaded hinges and a solid latch make the difference between a gate that works for 10 years and one that sags after 6 months.

Ready to figure out exactly what your fence project will cost?

Get Your Fence Materials List

Planning other outdoor projects? Our gravel calculator can help with a gravel base along your fence line, and our paint calculator will tell you how much stain or paint you need to finish your new fence. Browse all our free home project calculators.