Fence Calculator
Last updated:
How to Use This Calculator
Step 1: Choose Imperial or Metric.
Step 2: Enter total fence length (the full perimeter or run) and fence height. Standard wood fence heights are 4, 5, or 6 ft (1.2, 1.5, or 1.8 m). Privacy fences are 6–8 ft (1.8–2.4 m).
Step 3: Set post spacing. Standard wood fence post spacing is 6–8 ft (1.8–2.4 m). Chain link fences use 10 ft (3 m) spacing. Closer spacing means more posts but a sturdier fence; wider spacing risks sagging rails over time.
Step 4: Enter picket details. Picket width is the face dimension of each board (typically 5.5 inches for a 1×6 board, since dressed lumber is 5.5" not 6"). Gap is the space between pickets (set to 0 for solid privacy fences, or 1–2 inches for traditional picket fences).
Step 5: Add gates with "+ Add gate". Each gate reduces the fence run by its width and adds 2 extra posts (one on each side of the gate opening). Standard residential gates are 3–4 ft (1–1.2 m) wide for walk gates and 8–12 ft (2.4–3.6 m) for drive gates.
Step 6: Optionally enter price per linear foot for cost estimate. Pressure-treated pine runs $15–25 per linear foot installed. Cedar runs $25–40. Vinyl runs $30–50. Wrought iron runs $40–80.
Step 7: Click Calculate. Results include posts (with extra posts for gates), post length needed (height plus 2 ft / 0.6 m for footing), rails, pickets, concrete volume per post and total, and rough fastener count.
How Fence Materials Stack Up
A wood fence has four material categories: posts (vertical), rails (horizontal stringers between posts), pickets (vertical face boards), and concrete (for setting posts in the ground). The math is line-based, not area-based — each component scales with fence length and section count, not square footage.
Posts go at section boundaries plus ends. A 100 ft fence with 8 ft post spacing has 100/8 = 12.5 sections, rounded up to 13 sections, requiring 14 posts (one at every section boundary plus 1 to start). Gates add 2 extra posts each — one on each side of the gate opening — because gates hang on dedicated heavier posts that don't get a rail attached.
Rails depend on fence height. Fences 6 ft (1.8 m) and shorter typically use 2 rails per section (top and bottom). Fences 6–8 ft use 3 rails (top, middle, bottom) to prevent the pickets from cupping or warping. This calculator selects rail count automatically based on entered height.
Pickets fill each section. With 5.5-inch pickets and 0.5-inch gaps (typical), each picket-and-gap unit is 6 inches wide. An 8 ft (96 inch) section fits 16 pickets. For solid privacy fencing with no gap, the count goes up by the gap percentage.
Concrete sets each post. Standard practice is a hole 3 times the post width in diameter and 1/3 of the post length deep (typically 2 ft / 0.6 m below grade in temperate climates; 3 ft / 0.9 m in cold climates with frost). For a 4×4 wood post, that's a 12-inch wide hole 2 feet deep, holding about 1.5 cubic feet (0.04 cu m) of concrete. The calculator uses these defaults; deeper holes in frost areas need more concrete.
Total post length = fence height + footing depth. A 6 ft fence needs 8 ft posts (6 above + 2 below grade in standard footings). 8 ft and 10 ft posts are sold at lumber yards; for very tall fences, custom-cut from longer stock.
Fasteners add up fast. Each picket is attached to each rail with 2 nails or screws — so a 2-rail section uses 4 fasteners per picket, a 3-rail section uses 6. A 100 ft fence with 200 pickets and 2 rails per section needs roughly 800 fasteners.
Fence Calculation Formula
Given: fence length L, height H, post spacing S, picket width Pw, picket gap Pg, total gate width G.
Effective fence length = L − G (gate openings don't have fence panels)
Sections = ⌈(L − G) / S⌉
Posts = Sections + 1 + 2 × (number of gates)
Rails per section = 2 (for H ≤ 6 ft / 1.8 m) or 3 (for H > 6 ft / 1.8 m)
Total rails = Sections × Rails per section
Pickets per section = ⌊S / (Pw + Pg)⌋
Total pickets = Sections × Pickets per section
Post length = Fence height + footing depth (default 2 ft / 0.6 m)
Concrete per post = π × (hole radius)² × footing depth
- Default: 8 inch (20 cm) diameter hole = 4 inch (10 cm) radius
- Default: 2 ft (0.6 m) deep footing
- Imperial: π × (4/12)² × 2 ≈ 0.7 cu ft per post
- Metric: π × 0.1² × 0.6 ≈ 0.019 cu m per post
Total concrete = Concrete per post × Posts
Fasteners = Pickets × Rails per section × 2 (two nails per picket per rail)
Example: 100 ft fence, 6 ft tall, 8 ft post spacing, 5.5 inch pickets with 0.5 inch gaps, 1 gate at 4 ft.
- Effective length = 100 − 4 = 96 ft
- Sections = ⌈96 / 8⌉ = 12
- Posts = 12 + 1 + 2 = 15
- Rails per section = 2 (since 6 ft ≤ threshold)
- Total rails = 12 × 2 = 24
- Pickets per section = ⌊8 × 12 / (5.5 + 0.5)⌋ = ⌊96/6⌋ = 16
- Total pickets = 12 × 16 = 192 pickets
- Post length = 6 + 2 = 8 ft posts
- Concrete per post = 0.7 cu ft; Total = 15 × 0.7 = 10.5 cu ft (≈ 14 standard 80-lb bags of concrete mix)
Standard Fence Materials Reference (per 100 linear ft, 6 ft tall, 8 ft post spacing)
| Material | Quantity | Notes |
|---|---|---|
| Posts (4×4 × 8 ft) | 13–14 | 1 extra per gate |
| Rails (2×4 × 8 ft) | 24–25 | 2 per section + extras |
| Pickets (1×6 × 6 ft) | 190–200 | 16 per 8-ft section |
| Concrete (80 lb bags) | 13–15 | ~1 bag per post |
| Galvanized nails/screws | 800–1,000 | 2 per picket per rail |
| Gravel (for hole base) | 5–8 cu ft | Optional but recommended |
Examples
Example 1: Privacy backyard fence. 80 ft long, 6 ft tall, 8 ft spacing, no gates. Sections = 10, posts = 11, rails = 20, pickets ≈ 160, concrete ≈ 7.7 cu ft. Cost at $20/linear ft = $1,600 materials + labor.
Example 2: Front yard picket fence with gate. 60 ft long, 4 ft tall, 8 ft spacing, one 4 ft walk gate, 4 inch picket with 2 inch gap (classic picket spacing). Effective length = 56 ft, sections = 7, posts = 7 + 1 + 2 = 10, pickets per section = ⌊96/6⌋ = 16, total pickets = 112.
Example 3: Driveway perimeter fence. 250 ft, 6 ft tall, 8 ft spacing, one 12 ft drive gate + one 4 ft walk gate. Effective length = 234 ft, sections = 30, posts = 30 + 1 + 4 = 35, total pickets ≈ 480, concrete ≈ 24.5 cu ft (≈ 33 bags of 80-lb premix).
Fence Building Tips
Set corner and gate posts in concrete; consider gravel-only for line posts. Corners and gates carry the lateral load; line posts mostly just stand vertical. Some builders use a 1 ft layer of gravel under each line post for drainage, then backfill with packed dirt — cheaper and easier to replace later.
Use H-frame bracing on long unbroken runs. Fences over 100 ft long benefit from H-bracing every 100 ft to prevent wind-load wobble. This is two extra posts and a horizontal brace between them, set diagonally.
Frost depth matters for footings. In Zone 4+ climates (winter freezes), footings should extend below the frost line — typically 30–48 inches (76–122 cm). Shallow footings heave during freeze-thaw cycles and crack the fence over a few years. Check your local building code for required depth.
Pressure-treated for posts, cedar for show. The posts are buried in concrete and need rot resistance — use pressure-treated. The pickets and rails are visible — cedar lasts longer and looks better than pressure-treated for above-ground components. Mixed-material fences split the cost difference effectively.
Gates wider than 4 ft need diagonal bracing. A standard 4 ft walk gate hangs straight; wider gates sag at the latch end under their own weight within a year unless cross-braced with a diagonal brace running from the upper hinge corner down to the lower latch corner. The brace must be in compression (not tension) to support the gate.
Check property lines before building. Standard practice is to set the fence 6 inches inside your property line, not on it. This avoids legal disputes when surveys are inaccurate and gives you the pretty side facing the street while putting the rough side facing your yard.
Frequently Asked Questions
How many posts do I need for a 100 foot fence?
How much concrete per fence post?
How far apart should fence posts be?
How many pickets for a 6 foot privacy fence?
How much does a 100 foot wood fence cost?
Do I need 2 or 3 rails per fence section?
Related Calculators
Wood Stain Calculator
Free wood stain calculator. Find gallons needed for decks, fences...
Concrete Calculator
Free concrete calculator. Calculate cubic yards for slabs, column...
Paint Calculator
Free paint calculator. Find exactly how many gallons you need for...
Square Footage Calculator
Free square footage calculator. Enter length and width to calcula...