---
title: "Fence Calculator – Posts, Rails and Pickets | FigureYard"
description: "Work out the posts, rails and pickets for a fence from its length and post spacing, with gates, equal sections and the actual post spacing."
url: https://figureyard.com/fences-decks/fence-calculator/
image: https://figureyard.com/og/fences-decks/fence-calculator.png
---

[Fences & Decks](https://figureyard.com/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 team · Updated October 8, 2026 · 4 sources

*Interactive calculator on the page (inputs: Fence length; Post spacing; Rails per section; Picket width; Gap between pickets; Gates). The results below are for its default inputs.*

**Posts**

**14** posts

- Sections: **13**
- Actual post spacing: **7.69** ft

Shopping list

- **14** posts
- **26** rails
- **219** pickets

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 length | Post spacing: 6 ft | Post spacing: 8 ft |
| --- | --- | --- |
| 50 ft | 10 | 8 |
| 100 ft | 18 | 14 |
| 150 ft | 26 | 20 |
| 200 ft | 35 | 26 |

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](https://figureyard.com/fences-decks/picket-fence-calculator/) 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](https://figureyard.com/fences-decks/fence-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](https://figureyard.com/concrete/concrete-sonotube-calculator/) 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.

## Related calculators

- [Picket Fence Calculator](https://figureyard.com/fences-decks/picket-fence-calculator/)
- [Fence Post Depth Calculator](https://figureyard.com/fences-decks/fence-post-depth-calculator/)
- [Deck Calculator](https://figureyard.com/fences-decks/deck-calculator/)

Reviewed by FigureYard editorial team on 2026-10-08. Formulas are tested against published values, and material figures come from the sources below. [How we build our calculators](https://figureyard.com/editorial-policy/).

## Sources

- [Millard Lumber: Building Wood Fences](https://www.millardlumber.com/wp-content/uploads/2015/04/Building-Wood-Fences.pdf)
- [Quikrete Fast-Setting Concrete (No. 1004) spec data sheet](https://www.quikrete.com/pdfs/spec_data-fastsettingconcretemix.pdf)
- [Chain Link Fence Manufacturers Institute (CLFMI): DIY Guide to Chain Link Fence Installation - Chain Link Fence Manufacturers Institute](https://chainlinkinfo.org/chain-link-fence-installation/?order_by=phone&order=ASC)
- [CertainTeed Bufftech: Bufftech Molded and Extruded Fence Installation Guideline](https://bufftech.com/wp-content/uploads/sites/2/2023/10/bufftech-install-guide-e-2201cts.pdf)
