Skip to main content
YardCalcYardCalc

Fence Calculator

Calculate posts, rails, pickets, and concrete for your fence project — privacy, picket, or board-on-board.

Quick Answer

As a planning example, a 100 ft privacy fence (6 ft tall, 8 ft planning post spacing) needs about 14 posts, 39 rails, 241 pickets (including a 10% planning allowance) and 28 bags of concrete for concrete-set posts — materials typically cost $2,000–$4,000. Post spacing and footings depend on your fence system and local requirements.

Fence Style

Fence Dimensions

Enter fence length and height to see results.

💡 Contact 811 or your state's one-call service before digging post holes, and account for private utilities that may not be included in the public locate. Post spacing depends on your fence system, height, wind exposure and manufacturer or project requirements — use your manufacturer's recommended spacing when available. A material calculator does not verify structural adequacy.

How to Calculate Fence Materials

Key Formulas

Posts = ⌈Length ÷ Spacing⌉ + 1, plus 2 per gate

Rails = Sections × Rails per Section

Pickets = (Length in inches) ÷ (Picket + Gap)

Start by measuring your total fence line. Divide by your planning post spacing (the calculator defaults to 8 ft and you can change it) to get the number of sections. Post spacing depends on fence material/system, height, wind exposure, post size and manufacturer or project requirements; use your fence manufacturer's recommended spacing when available. Each gate opening is assumed to be 4 ft wide and is subtracted from the fence length, and the calculator adds 2 gate posts per gate. Corners are not counted separately, so a run with corners may need an extra post or two. The concrete estimate assumes concrete-set posts.

Example

For a 100 ft privacy fence, 6 ft tall, at 8 ft planning post spacing: 100 ÷ 8 = 12.5 → 13 sections, 14 posts. 3 rails per section = 39 rails. At 5.5" boards with no gap: 1200" ÷ 5.5 = 219 pickets (241 with the 10% planning allowance for cuts, damaged pieces and layout uncertainty).

Tips & Best Practices

  • •Post-setting method depends on the fence system, post material, soil, drainage and loading. Concrete footings are common for many residential fence systems, especially heavily loaded posts, but they are not a universal requirement for every fence post. Follow your fence system's curing and bracing instructions.
  • •Use lumber rated for ground contact for posts that will be buried — they're in contact with the ground.
  • •Set string lines to keep the fence straight. Start with corner and end posts first.
  • •Gate, corner and terminal posts carry different loads than ordinary line posts and may need larger posts, deeper/stronger footings or bracing depending on the fence system.
  • •Post depth depends on fence height and type, soil conditions, wind exposure, post size, footing method, manufacturer guidance and local requirements. Rules of thumb can be useful for early planning, but they are not substitutes for the fence system's installation requirements or local code. Footing diameter and depth should match the fence/post system, soil, loading and local requirements.
  • •Freeze/thaw conditions can affect post and footing design. Check local requirements and the fence manufacturer's installation guidance for your climate.
  • •Solid and taller fences can carry substantial wind loads. Post size, spacing and footing requirements may need to change in exposed or high-wind locations. A material calculator does not verify structural adequacy.
  • •Fence height, location, visibility, setbacks, easements and permit requirements are local. Check your city/county rules and verify the property line before building.
  • •Pool barriers are governed by local pool-barrier codes. Do not use this calculator as a substitute for code compliance.

Frequently Asked Questions

How much does a wood fence cost per foot?+

A basic privacy fence costs $12–$25 per linear foot in materials. Professional installation adds $10–$20+ per foot. Cedar costs more than pressure-treated pine; service life varies with material, climate, installation and maintenance.

How far apart should fence posts be?+

It depends. Post spacing depends on fence material/system, height, wind exposure, post size and manufacturer or project requirements. The calculator uses 8 ft as an adjustable planning post spacing; use your fence manufacturer's recommended spacing when available.

How deep should fence post holes be?+

Post depth depends on fence height and type, soil conditions, wind exposure, post size, footing method, manufacturer guidance and local requirements. The calculator's post length (height plus one-third) is a planning assumption for ordering lumber, not a design requirement. Freeze/thaw conditions can affect post and footing design, so check local requirements and the manufacturer's installation guidance for your climate.

How many bags of concrete per fence post?+

The calculator's concrete figure is a planning estimate for a concrete-set-post installation: 1 bag of 50-lb concrete per post under 6 ft tall and 2 bags per post at 6 ft or taller. These are fixed planning constants; footing diameter and depth should match the fence/post system, soil, loading and local requirements.

Common Fence Projects

✓Backyard privacy fence
✓Front yard picket fence
✓Pool barrier (check local pool-barrier code)
✓Property line boundary fence
✓Dog run or pet containment
✓Garden or vegetable patch fencing

Not sure of your fence run length? Measure it on the map →

How Many Fence Posts Do I Need?

Divide your total fence length by your planning post spacing, round up, and add 1 for the end of a straight run. At 8 ft planning spacing, a 150 ft fence needs 20 posts. Post spacing depends on fence material/system, height, wind exposure, post size and manufacturer or project requirements — use your fence manufacturer's recommended spacing when available.

The calculator adds 2 posts per gate (and subtracts a 4 ft opening from the fence length); corners are not counted separately and may need an extra post. Here are planning estimates for common fence lengths:

Fence LengthPosts (8 ft spacing)Concrete BagsRails (3 per section)
50 ft88–1621
100 ft1414–2839
150 ft2020–4057
200 ft2626–5275

Concrete figures are a planning estimate for a concrete-set-post installation (1 bag per post under 6 ft tall, 2 bags per post at 6 ft or taller). Post-setting method depends on the fence system, post material, soil, drainage and loading. Concrete footings are common for many residential fence systems, especially heavily loaded posts, but they are not a universal requirement for every fence post.

Gate, corner and terminal posts carry different loads than ordinary line posts and may need larger posts, deeper/stronger footings or bracing depending on the fence system. Footing diameter and depth should match the fence/post system, soil, loading and local requirements.

Solid and taller fences can carry substantial wind loads. Post size, spacing and footing requirements may need to change in exposed or high-wind locations. A material calculator does not verify structural adequacy.

How Much Does a Wood Fence Cost?

A wood privacy fence costs $25–$50 per linear foot for materials. Professional installation adds $20–$40 per linear foot. A 150 ft fence costs $3,750–$7,500 for DIY materials.

Cost depends on fence height, style, wood type, and your region.

Fence LengthDIY MaterialsPro Installed
50 ft$1,250–$2,500$2,250–$4,500
100 ft$2,500–$5,000$4,500–$9,000
150 ft$3,750–$7,500$6,750–$13,500
200 ft (full yard)$5,000–$10,000$9,000–$18,000

Fence Styles: Privacy, Picket, and Board-on-Board

Each fence style uses different amounts of material. The calculator above adjusts for your chosen style automatically.

Privacy Fence (6 ft)

Boards placed edge-to-edge with no gaps. Uses the most pickets. Common for backyard privacy. Pool barriers have their own local code requirements — this calculator does not verify them. $20–$35/linear ft materials.

Board-on-Board

Overlapping boards on alternating sides of the rail. Looks good from both sides. Board-on-board layouts use more pickets than a single-layer privacy fence because adjacent boards overlap. YardCalc's planning model assumes 5.5-inch pickets with 1.5 inches of overlap. With those assumptions, a 100 ft run uses about 300 pickets before the 10% planning allowance, versus about 219 for a single-layer privacy fence. $25–$40/linear ft.

Picket Fence (3–4 ft)

Evenly spaced boards with gaps. Classic for front yards. Uses fewer pickets and shorter posts. $15–$25/linear ft materials.

Need concrete for fence post holes? Estimate bags of concrete →

Cedar vs. Pressure-Treated vs. Pine

For posts that go in the ground, use lumber rated for ground contact (such as pressure-treated lumber). Untreated wood begins to rot quickly in contact with soil. For boards and pickets above ground, the choice is more nuanced.

Here's how the three most common fence woods compare:

Pressure-Treated Pine

~$1.50–$3.00/linear ft for 1×6 boards. Chemically treated to resist rot and insects. Best choice for posts and any wood near the ground. It warps more than cedar as it dries, and has a greenish tint that takes a season to gray out. Service life varies with material, climate, installation and maintenance.

Best for: posts, bottom rails, any ground-contact framing.

Cedar

~$3.00–$5.00/linear ftfor 1×6 boards. Naturally rot-resistant, straighter grain means it stays flatter as it dries, and takes stain beautifully. Worth the price premium if you're in a wet climate or want a fence that looks good long-term. Service life varies with climate, installation and maintenance.

Best for: pickets and boards in privacy and board-on-board fences.

Untreated Pine

~$1.00–$2.00/linear ft. Cheapest option but not suited for ground contact. Needs paint or stain to hold up, and will deteriorate faster in wet climates. Fine for picket fences in dry regions where you plan to paint anyway.

Best for: painted picket fences in dry climates only.

A common approach: PT posts and rails, cedar pickets. You get rot resistance where it matters and a cleaner look on the visible surface.

Fence Build Order

The most common DIY mistake is rushing past the post-setting step. Hanging boards on posts that haven't fully cured leads to a fence that leans. Do this in order:

  1. 1

    Mark corners, gates, and property line

    Confirm your property line before digging anything — an 811 locate does not establish property lines. Fence height, location, visibility, setbacks, easements and permit requirements are local, so check your city/county rules. Stake the corners first, then the gate locations. Gates drive post placement — plan them before spacing everything else.

  2. 2

    Dig post holes

    Post depth depends on fence height and type, soil conditions, wind exposure, post size, footing method, manufacturer guidance and local requirements. Follow your fence system's installation instructions and local code rather than a single rule of thumb.

  3. 3

    Set posts and let them cure or settle per the system's instructions

    This is the step people skip. Post-setting method depends on the fence system, post material, soil, drainage and loading; if you use concrete, follow the product's curing instructions and brace posts while it cures. Don't rush it.

  4. 4

    Run top and bottom rails

    Attach rails to posts before adding any boards. This locks in your post spacing and gives you a reference for keeping everything level.

  5. 5

    Attach pickets or boards

    Work in sections. Use a spacer block to keep gaps consistent on picket fences. On privacy fences, push boards tight to each other and check plumb every few feet.

  6. 6

    Hang gates last

    Gates are easier to align once the fence is fully set and plumb. Gate, corner and terminal posts carry different loads than ordinary line posts and may need larger posts, deeper/stronger footings or bracing depending on the fence system.

Need to calculate materials for your project? Jump back to the calculator ↑

Before You Order

  • ☐Contact 811 or your state's one-call service before digging post holes, and account for private utilities that may not be included in the public locate
  • ☐Verify your property line before purchasing — an 811 locate does not establish property lines, and installing on the wrong side is expensive to fix
  • ☐Fence height, location, visibility, setbacks, easements and permit requirements are local — check your city/county rules before finalizing your plan
  • ☐Confirm post spacing with your fence manufacturer or project requirements before ordering — spacing changes your post and rail counts
  • ☐If your yard slopes, decide on stepped vs. raked fence before measuring post heights