Fence Post Spacing Calculator

Find how many fence posts you need, how far apart to space them, and where to mark each post center. Plan a straight run or rectangle with gates and corners.

See the example for spacing posts on both sides of a path.

Enter Your Fence Layout

Use straight run for one line of fence. Use rectangle for a simple enclosed area.
Measure the full length of the straight fence line.
Common planning spacing is often 6 to 8 feet, depending on fence type.
One gate per line: start, span. Leave blank for no gates.
Use the center-to-center distance required for your gate and hardware. The clear opening is a separate measurement.
Only add posts beyond the calculated ends, rectangle corners, and gate posts, such as extra braces or replacements.
Adds extra rail or panel length for cuts, mistakes, and layout changes.
Optional. Enter 0 if you do not want a cost estimate.
Optional. Use this for a rough material-length cost estimate.

Your Results

Estimated posts

—
Enter values and calculate.

Fenced section spacing

—
Spacing may differ between sides or gate-separated spans.

Fence sections

—
Fenced spans between posts, excluding gate spans.

Entered materials cost

—
Uses your price inputs.
This calculator gives a planning estimate only. Real fence layouts can need extra posts for corners, braces, gates, slope changes, terrain, code requirements, and fence type.

How to Space Fence Posts on Both Sides of a Path

For two parallel 45-foot runs with an 8-foot maximum spacing and no gates, plan for 7 posts per side, spaced 7 feet 6 inches apart. Enter one straight run in the calculator to get the marks for both sides.

Line up the two starting stakes across the path. From each starting stake, measure the same marks along its run: 0 ft, 7 ft 6 in, 15 ft, 22 ft 6 in, 30 ft, 37 ft 6 in, and 45 ft.

Measure every mark from the starting stake to avoid adding small rounding differences as you go. If the runs have different lengths or only one side has a gate, calculate them separately and compare the marks before setting posts.

How to Use This Fence Post Spacing Calculator

Choose a single open run or closed rectangle, enter the dimensions and maximum spacing, and add any gate positions. Enter measurements in feet. A custom run is one straight open line; split a layout with additional corners into separate plans and reconcile shared endpoints yourself.

For a rectangle, sides A and C use the entered length; B and D use the width. Walk around the rectangle A → B → C → D, measuring each gate start from the beginning of that side. For example, A, 8, 4 puts the two gate post centers at 8 ft and 12 ft along side A. Gate spans must fit on one side without overlapping. Adjacent gate spans may share a post.

Formula Used

For each uninterrupted fenced span, sections = round up(span length ÷ maximum spacing). Interior posts on that span = sections − 1. Count the unique run ends, rectangle corners, and gate endpoints once, then add the span’s interior posts and entered extras.

Without gates, a straight run needs ceil(length ÷ spacing) + 1 posts. A rectangle needs 2 × ceil(length ÷ spacing) + 2 × ceil(width ÷ spacing) posts. This keeps all four corners. Gate width is excluded from fence-material length; gate posts are included in total posts.

Rail/panel cost uses the net fenced length plus your material buffer. The single entered post price applies to every post, including gate posts; use your own takeoff for different post types and gate hardware.

Example Calculation

A 100-ft straight run with maximum 8-ft spacing and no gates needs ceil(100 ÷ 8) = 13 sections and 14 posts. Equal spacing is 100 ÷ 13 ≈ 7.69 ft.

A 20 × 10-ft rectangle at the same maximum spacing needs 3 sections on each 20-ft side and 2 on each 10-ft side: 10 posts total. The long-side spacing is about 6.67 ft; the short-side spacing is 5 ft.

On a 100-ft straight run, a gate entered as 10, 4 leaves fenced spans of 10 and 86 ft. At maximum 8-ft spacing, the plan has 13 fenced sections and 15 posts, including its 2 gate posts. Gate locations affect the count; automatically adding two posts to a no-gate estimate can be wrong.

Worked Example: Move the Gate Before Buying Posts

Plan a fictional 20 × 10 ft rectangle with maximum spacing 8 ft, extra posts 0, and material buffer 10%. For a partial cost comparison enter $18 per post and $7.50 per foot of rail/panel. These prices are examples, not current quotes. Change only the gate line:

On a narrow screen, swipe the table sideways to see all columns. Keyboard: focus the table and use the arrow keys.

Gate entryTotal posts, including gate postsFenced sectionsEntered materials cost
A, 8, 4109$642.00
A, 2, 41110$660.00

In the first row, the gate occupies 8–12 ft along side A, leaving two 8-ft fenced spans. Moving it to 2–6 ft leaves spans of 2 and 14 ft; the 14-ft span needs two sections under the chosen 8-ft maximum. Sides B, C, and D are unchanged. This explains the extra section and post even though the gate width stays 4 ft.

Both layouts have 60 − 4 = 56 ft of fence, or 61.6 ft with the 10% material buffer. First-row cost = 10 × $18 + 61.6 × $7.50 = $642. The buffer affects rail/panel length; it does not automatically add spare posts. Gate posts are already included in each total.

Check Panel Modules and Gate Clearances Separately

Equalized section spacing is a geometric starting point. Fixed factory panels may need the manufacturer’s exact post-center spacing or permitted cuts. Barrette’s panel-kit instructions, page 3 show why panel width, post width, gate placement, and hardware clearance must be planned together. Use the requirements for your exact product before marking holes.

Check how much clear opening a mower or cart needs before placing gate posts.

The single post price treats gate and ordinary posts alike. Gate leaves, reinforcement, hardware, concrete, labor, delivery, and tax need separate lines in the Material Takeoff worksheet. This example does not choose structural supports, footing dimensions, or a product-specific gate opening.

Fence Post Spacing FAQ

How many fence posts do I need for 100 feet?

For a straight 100-foot run with no gates and an 8-foot maximum spacing, plan on 14 posts, including both ends. You’ll have 13 equal sections with posts about 7.69 feet apart, measured center to center.

Why does the calculator give me less than 8 feet between posts?

When you enter 8 feet, that’s the maximum spacing. The calculator rounds up the number of sections and spaces them evenly across each uninterrupted stretch of fence. That keeps every section within the limit and avoids one short section at the end. For prebuilt panels, use the spacing specified by the manufacturer.

How do I line up posts if only one side of the path has a gate?

Line up the starting stakes across the path, then calculate each side separately. Enter the gate on its side and compare the two sets of post marks before marking post holes. The gate divides that side into separate stretches, so some marks may land in different places.

Do I measure from the center or the edge of each post?

Use the center-to-center marks from this calculator. For a gate, the clear opening is the usable width for a mower or cart to pass through. Use the Fence Gate Width Calculator to size that opening, then check the gate and hardware instructions for the required distance between post centers.

Common Fence Post Planning Mistakes

  • Using the maximum spacing as the exact spacing instead of rounding sections evenly.
  • Forgetting gate posts, corner posts, brace posts, and transition posts.
  • Ignoring slope, curves, uneven ground, rocks, roots, and property-line changes.
  • Assuming every fence type can use the same post spacing.
  • Not checking local rules, permits, property lines, easements, or utility locations.
  • Buying the exact calculated amount with no spare posts or material buffer.

Important Planning Note

Use this calculator as a planning tool only. Fence post spacing depends on the fence type, height, wind exposure, soil, slope, gate weight, local requirements, and manufacturer instructions. Before digging, check property lines, local rules, utility locations, and permit requirements. For tall fences, heavy gates, retaining structures, or code-sensitive work, get qualified guidance.

Related planning tools and source

For uneven ground, use How to Plan a Fence on a Slope to measure the drop across each span and decide whether to step or rack the panels.

Measure with the Feet, Inches & Fractions Calculator, estimate a specified post-hole volume with the Concrete Bag Calculator, and record costs in the Material Takeoff Checklist. Geometry does not select post-hole depth or structural support. Find the other material and layout tools in Materials & Measurements.

Before digging in the United States, use 811’s official service and follow your local utility-location process. Check the fence and gate manufacturer’s requirements separately.