# How much fence material do I need?

Counts the posts, rails and pickets for a fence from its length, post spacing, rails per section and picket width and gap, with the material cost when you add prices.

- Page: https://www.acalculator.org/construction/fence-calculator
- JSON spec: https://www.acalculator.org/construction/fence-calculator.json
- Version: 638ba5eb5dc6

## Default answer

Example with the default inputs (Fence length 100 ft, Post spacing 8 ft, Rails per section 3, Picket width 5.5 in, Gap between pickets 0 in, Extra pickets 5%): A 100 ft fence with posts 8 ft apart needs 14 posts, 39 rails and 230 pickets.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| l | Fence length | The total length of the fence line. |
| sp | Post spacing | The distance between post centres: 8 ft is common, 6 ft for tall or heavy fences. |
| r | Rails per section | Horizontal rails between each pair of posts: 2 for a low picket fence, 3 for a 6 ft privacy fence. |
| pw | Picket width | The actual width of one picket: a 1×6 board is 5½ in wide. |
| gap | Gap between pickets | The space left between pickets: 0 for a privacy fence. |
| x | Extra pickets | Pickets to add for cuts and bad boards, in percent. |
| pp | Price per post | What one post costs. Leave all three prices empty to skip the cost. |
| rp | Price per rail | What one rail board costs. |
| kp | Price per picket | What one picket costs. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| posts | Posts | Sections + 1: one post at each end and one between each section. |
| sections | Sections | Fence length ÷ post spacing, rounded up. |
| railCount | Rails | Sections × rails per section. |
| pickets | Pickets | Fence length × (1 + extra ÷ 100) ÷ (picket width + gap), rounded up. |
| cost | Material cost | Posts, rails and pickets times their prices. |

## Method

Sections = ⌈length ÷ post spacing⌉; posts = sections + 1; rails = sections × rails per section; pickets = ⌈length × (1 + extra ÷ 100) ÷ (picket width + gap)⌉; cost = posts × post price + rails × rail price + pickets × picket price.

## Assumptions

- One straight run with a post at each end. Each corner or gate adds posts; work out each straight side on its own and add them.
- Each rail spans one section, so buy rails at least as long as the post spacing.
- Defaults: posts 8 ft apart and 3 rails, as fence makers suggest for a 6 ft privacy fence (NMI Fence); 5½ in pickets (a 1×6 board) with no gap; 5% extra pickets.

## Worked examples

1. l = 30.48, sp = 2.4384, r = 3, pw = 0.1397, gap = 0, x = 0% gives sections = 13, posts = 14, railCount = 39, pickets = 219. Source: NMI Fence, Fence Post Spacing Guide (privacy fence: posts 8 ft apart, 3 rails on fences 6 ft and taller; picket fence: 8 ft, 2 rails), https://nmifence.com/blog/fence-post-spacing; Extreme How-To, How To Build a Wood Fence (posts no wider apart than the rails, usually 6 to 8 ft on center), https://extremehowto.com/diy-privacy-fence/.
2. l = 29.2608, sp = 2.4384, r = 2, pw = 0.0889, gap = 0.0635, x = 0%, pp = $12.00, rp = $6.50, kp = $2.25 gives sections = 12, posts = 13, railCount = 24, pickets = 192, cost = $744.00. Source: NMI Fence, Fence Post Spacing Guide (privacy fence: posts 8 ft apart, 3 rails on fences 6 ft and taller; picket fence: 8 ft, 2 rails), https://nmifence.com/blog/fence-post-spacing.
3. l = 30, sp = 2.4, r = 3, pw = 0.14, gap = 0.01, x = 10% gives sections = 13, posts = 14, railCount = 39, pickets = 220. Source: Extreme How-To, How To Build a Wood Fence (posts no wider apart than the rails, usually 6 to 8 ft on center), https://extremehowto.com/diy-privacy-fence/.

## FAQ

### How many fence posts do I need?

Divide the fence length by the post spacing, round up to whole sections, and add one post. 100 ft at 8 ft spacing is 12.5, so 13 sections and 14 posts. Each corner and gate needs its own posts, so work out each straight side on its own.

### How far apart should fence posts be?

Usually 8 ft on centre for wood fences, the length of a standard rail board. Extreme How-To advises never spacing posts wider than the rails, usually 6 to 8 ft; NMI Fence suggests 6 to 8 ft for heavy board-on-board fences.

### How many rails does a fence need?

NMI Fence suggests 2 rails per section for a 3 to 4 ft picket fence and 3 rails for a privacy fence 6 ft or taller. Rails = sections × rails per section, so 13 sections with 3 rails need 39 rails.

### How many pickets do I need?

Divide the fence length by the picket width plus the gap, and round up. 100 ft is 1,200 in; 5½ in pickets with no gap need 1,200 ÷ 5.5 = 218.2, so 219 pickets, plus a few extra for cuts and split boards.

### How much does a fence cost in materials?

Multiply each count by its price and add them up. A 96 ft picket fence with 13 posts at $12, 24 rails at $6.50 and 192 pickets at $2.25 costs $156 + $156 + $432 = $744 in posts, rails and pickets. Concrete, hardware and labour are extra.

### Why is a 1×6 picket 5½ inches wide?

Lumber is named by its rough size before it is dried and planed. A board sold as 1×6 is about ¾ in thick and 5½ in wide, so type the actual width of your pickets.

## Sources

- NMI Fence (National Metal Industries), Fence Post Spacing Guide: wood privacy fence posts 8 ft apart with 3 rails on fences 6 ft and taller; picket fence 8 ft with 2 rails. https://nmifence.com/blog/fence-post-spacing (retrieved 2026-10-01)
- Extreme How-To, How To Build a Wood Fence: space posts no wider than the rails, usually 6 to 8 ft on center. https://extremehowto.com/diy-privacy-fence/ (retrieved 2026-10-01)
- NIST Handbook 44, Appendix C, General Tables of Units of Measurement: 1 ft = 12 in = 0.3048 m. https://www.nist.gov/document/2026-nist-handbook-44-appendix-c (retrieved 2026-10-01)
