FigureYard
Fences & Decks

Fence Calculator

Enter the length of the fence, the post spacing, the rails per section and the picket width to get the posts, rails and pickets to buy.

Reviewed by FigureYard editorial teamUpdated October 8, 20264 sources

Your measurements

Rails per section
More options
Posts
14posts
  • Sections: 13
  • Actual post spacing: 7.69 ft
Shopping list
  • 14posts
  • 26rails
  • 219pickets

Each gate adds one post. Rails are counted one per section per rail row.

Posts, rails and pickets come as whole pieces, so the calculator counts pieces, not feet. It splits the fence line into equal sections and counts posts and rails from those sections. Pickets come from the total length, the picket width and the gap. Treat the results as a buying estimate, and check the layout before you build.

How to use this calculator

  1. Measure each straight run along the ground, in feet, from end to end. Keep any gate opening inside its run, because the gate panel takes up that space.
  2. Leave the post spacing at 8 ft, the default, or enter the spacing your design calls for. A lumber dealer's guide gives 6 to 8 ft for wood fences, and a closer spacing means more posts.
  3. Set the rails per section to match your design. Each section gets that many rails.
  4. Enter the picket width. Under More options, enter the gap between pickets, and keep it at its starting value for a solid fence.
  5. Under More options, enter the number of gates. Gates change only the post count.
  6. Check the actual post spacing in the results, then buy the counts plus a few spare pickets.

Worked examples

Backyard privacy fence

Fence length: 120 ft · Rails per section: 3 rails

Posts
16
Rails
45
Pickets
262
Sections
15
Actual post spacing
8.00 ft

Front yard with a gate

Fence length: 60 ft · Gates: 1

Posts
10
Rails
16
Pickets
131
Sections
8
Actual post spacing
7.50 ft

Garden fence with gaps

Fence length: 80 ft · Picket width: 3.5 in · Gap between pickets: 2.5 in

Posts
11
Rails
20
Pickets
161
Sections
10
Actual post spacing
8.00 ft

Side yard run

Fence length: 50 ft

Posts
8
Rails
14
Pickets
110
Sections
7
Actual post spacing
7.14 ft

Posts for common fence lengths and post spacings

Fence lengthPost spacing: 6 ftPost spacing: 8 ft
50 ft108
100 ft1814
150 ft2620
200 ft3526

Each cell: Posts. Inputs not in the table use the calculator's starting values.

How the fence is divided into sections

The calculator divides the fence length by the post spacing and rounds up to a whole number of sections. A section is the run between neighboring posts. A straight run has a post at each end and at every boundary between sections, so the post count is the section count plus an extra post.

Every section is the same length, and that length is the actual post spacing. Rounding up means the actual spacing comes out at or under the spacing you entered, never over.

Rails are counted per section. Pickets are counted along the full length, with a picket at each end and a gap between each pair, rounded up. If pickets are the main question, the picket layout page puts that count first.

Gates, corners and end posts

Each gate adds a post, because a gate needs a post for its hinge and latch, and the regular spacing may not place a post there. Enter the full length with the gate included, since the gate panel takes up that space. Gates change only the post count.

Corner posts and end posts are counted in the total with no repeats. A corner post belongs to both runs beside it, so if you run the calculator on each run and add the results, take a post away for each corner.

Post holes, frost and checks before digging

A concrete maker sets the hole depth at 50 percent of the post's height above ground, and the hole diameter at about 3 times the post width. Where the ground freezes, the hole goes below the local frost line, which can mean deeper. For the details on each hole, use the post depth calculator.

Before you dig, check the property lines and the local fence height rules. A post set over a line, or a fence built too tall, can mean moving the work later. Then call the utility locate service so buried lines are marked first.

If you set the posts in concrete, the concrete calculator for round forms works out each hole.

Mistakes to avoid

  • Subtracting the gate width from the length. The gate panel still needs pickets.
  • Cutting rails to the spacing you typed. The actual spacing can be a little shorter, so use the figure from the results.
  • Ordering exactly the count. Boards split and cuts go wrong, so buy a few spare pickets and rails.
  • Mixing up post spacing with post depth. Spacing sets how many posts you buy, and depth sets how deep each hole goes.

Common questions

How far apart should fence posts be?

The calculator starts at 8 ft, and a lumber dealer's guide gives 6 to 8 ft for wood fences. Enter the spacing your design uses, and the calculator reports the actual spacing it produces.

How deep should fence posts go?

The hole depth depends on how much of the post stands above ground, not on a fixed figure. Where the ground freezes, the hole goes below the local frost line.

Does a fence with a gate need extra posts?

Yes. Each gate adds a post on top of the line posts. Enter the full length with the gate included, and check the gate hardware for the post size it needs.

Does this calculator estimate fence cost?

No. It counts posts, rails and pickets and does not use prices. Multiply the counts by your supplier's prices, then add concrete, gate hardware and fasteners.

How much concrete do I need for fence posts?

Work out one hole first. The hole is about 3 times the post width wide and as deep as 50 percent of the post's height above ground. A fifty-pound bag of fast-setting concrete yields 0.375 cubic feet, so divide the volume of the hole, minus the post, by that yield. Then multiply by the number of posts. The concrete calculator for round forms does this math for you.

Can I use this fence calculator for chain link, wire or metal fences?

Yes for posts. It counts posts for any straight fence from the length and the spacing. For chain link, line posts should be no more than 10 ft apart. The rail and picket counts only fit fences built from rails and pickets, so ignore them for chain link or wire.

How many fence panels do I need?

A panel fills one section between two posts, so the number of sections is the number of panels. Prebuilt panels come in set widths, such as 8 ft for one vinyl maker, so set the post spacing to match the panel you plan to buy, then check the actual spacing in the results.