Fence Calculator

Calculate materials needed for your fence project. Determine posts, panels, rails, and pickets for privacy, picket, or rail fences.

Reviewed by the Calcura editorial team · Last reviewed

Question
How many posts and panels do I need for a fence?
Answer
posts = ⌈length / spacing⌉ + 1, with 8-foot spacing being the most common. panels = posts − 1. A 100-foot fence with 8-foot spacing needs ⌈100/8⌉ + 1 = 14 posts and 13 panels. For privacy fence pickets at 5½" wide boards: pickets = length × 12 / 5.5. For picket-style with 2½" gaps between 3½" pickets: pickets = length × 12 / 6.
▸Show formula & caveats
Formula
posts = ⌈length / spacing⌉ + 1; panels = posts − 1
Caveats
  • Corner and end posts often need to be 4×4 or larger for stability — not always the same as line posts.
  • Gates require extra-heavy posts and their own hardware; count them separately.
  • Frost-depth footing is required in cold climates — at least 6" below the frost line.

What This Calculator Does

Given a fence length, post spacing, and style (privacy, picket, or split-rail), counts the number of posts, panels, rails, and pickets needed. Post count uses ceil(length ÷ spacing) + 1 to include the terminating post; picket counts use the standard 1×6 (5½" actual) for privacy boards and 1×4 (3½" actual) with a 2½" gap for pickets.

When To Use This Calculator

Replacing a straight backyard fence run

100 ft of privacy fence at 8 ft post spacing: 14 posts, 13 panels, 39 rails, ~220 pickets. Use as a lumber-list starting point.

Budgeting a picket fence for the front of a house

60 ft picket at 6 ft spacing: 11 posts, 10 panels, 20 rails, ~120 pickets. Multiply by local per-linear-foot material cost.

Estimating split-rail for a rural property line

500 ft split-rail at 10 ft spacing: 51 posts, 50 panels, 100 rails (2-rail), no pickets. Rail count dominates cost.

Cross-checking a contractor quote

Contractor bid lists 12 posts for 80 ft at 8 ft spacing — should be 11; 80/8 = 10 panels + 1 end post = 11 posts.

How It Works

Posts are placed at both ends and at every spacing interval in between, so for a straight run the count is ceil(length/spacing) + 1. Panels always equal posts minus one. Rails depend on fence height: standard privacy at 6 ft tall uses 3 rails (top, middle, bottom); shorter picket fences use 2. Picket count assumes 1×6 boards placed edge-to-edge for privacy (5.5" on-center in imperial, 14 cm in metric) or 1×4 boards at 3.5" + 2.5" gap for picket style. The tool ignores corners, gates, and terrain breaks — each of those adds one or two extra posts you'll want to tack on manually.

Formula

posts = ceil(length / spacing) + 1 | panels = posts − 1 | rails = panels × rails_per_panel | pickets = length_ft × 12 / (picket_width + gap)

Real-World Example

Scenario

Homeowner fencing three sides of a 60 × 40 ft backyard with a 6 ft privacy fence and one 4 ft walk-gate. Post spacing is 8 ft. Local code requires one line-post inside each 16 ft panel span, so each corner gets a dedicated post.

Calculation

Perimeter (3 sides) = 40 + 60 + 40 = 140 ft. Posts: ceil(140/8) + 1 = 19 line/end posts. Add 2 corner-dedicated posts = 21. Add 2 gate posts = 23 total. Panels = 22, minus gate-panel = 21 pickets runs. Rails: 21 × 3 = 63 (2×4×8 ft). Pickets: 140 × (12/5.5) = 306 pickets. Add 10% waste = ~337 pickets.

Result

Lumber list: 23 posts, 63 rails, 337 pickets (1×6×6 ft), plus two gate posts sized up to 6×6. Order roughly 50 bags of concrete for 23 post footings.

Common Mistakes to Avoid

Mistake: Forgetting to add a post for the terminating end of the run

Solution: Post count is always ceil(length/spacing) + 1, not just length/spacing. The +1 is the end post that closes the fence.

Mistake: Using nominal lumber widths for picket spacing

Solution: A 1×6 picket is actually 5.5 inches wide, not 6. A 1×4 is 3.5 inches. Using nominal dimensions underestimates picket count by ~8%.

Mistake: Ignoring corner and gate posts

Solution: Every corner adds one dedicated post; every gate adds two. The base calculation covers a straight run only — add 2 per corner and 2 per gate.

Mistake: Assuming post spacing stays perfect on uneven ground

Solution: On sloped or curving runs, each panel may need ~5–10% more material. Measure along the ground contour, not the straight-line horizontal.

Related DIY tools

When This Isn't the Right Tool

Chain-link, vinyl-panel, or wrought-iron fencing

Use instead: Those systems are sold by pre-fab panel. Count panels = ceil(length/panel_length) and ignore pickets/rails entirely.

Retaining walls or privacy screens with posts in footings that bear lateral load

Use instead: Those require engineered post spacing and footing depth based on soil and load. Use a structural spec, not a standard 8-ft template.

Historic-district or HOA-specified spacing rules

Use instead: Many districts require specific picket gaps and post heights. Use the district spec, then run the calculator with those exact numbers.

How to Verify This Calculation

Sanity check: a 10 ft run at 10 ft post spacing must return 2 posts and 1 panel. A 24 ft run at 8 ft spacing must return 4 posts and 3 panels. If picket count is zero for any fence type other than split-rail, the width or gap is wrong.

Sources

Reviewed by the Calcura editorial team · Last reviewed

Related Calculators

Frequently Asked Questions