# Fence Calculator

URL: https://speedycalculator.com/calculators/construction/fence/
Last updated: 2026-10-25

> The fence calculator estimates posts, rails, pickets and concrete for a wood picket or privacy fence from its length, post spacing, rails, picket width and gap, and totals the material cost per foot.

## Inputs

- Fence length (ft, m, in, yd, cm)
- Post spacing
- Gates
- Gate width (ft, m, in, yd, cm)
- Rails per section
- Picket width (in, cm, mm, ft, m)
- Gap between pickets (in, cm, mm, ft, m)
- Concrete bags per post
- Price per post (/piece)
- Price per rail (/piece)
- Price per picket (/piece)
- Price per bag of concrete (/piece)

## Results

- Fence run (excluding gates)
- Sections
- Posts
- Rails
- Pickets
- Bags of concrete
- Material cost
- Cost per length

## Formula

```
Sections = ceil((length − gates) ÷ post spacing)
Posts = sections + 1 + gates; rails = sections × rails per section
Pickets = ceil((length − gates) ÷ (picket width + gap))
```

## Explanation

A typical wood fence has posts every 6–8 ft, two or three horizontal rails between them and vertical pickets nailed to the rails. Privacy fences use pickets butted together (no gap); picket fences have gaps of 2–3 in. Every post is set in concrete, usually with one to two bags per hole.

### How to use the Fence Calculator

- **Fence length**
- **Post spacing**
- **Gates**
- **Gate width**
- **Rails per section**
- **Picket width**
- **Gap between pickets**
- **Concrete bags per post**
- **Price per post**
- **Price per rail**
- **Price per picket**
- **Price per bag of concrete**

Results update as you type, and every field accepts the units shown in its menu.

### How it works

Enter the fence length, post spacing, number and width of gates, rails per section, picket width and gap, bags of concrete per post and prices. The calculator counts every component and totals the material cost.

### Tips for an accurate estimate

- Take measurements at floor level and at the ceiling – walls and rooms are often slightly out of square.
- Use the manufacturer's coverage, spacing and installation data when it differs from the typical values here.
- Keep a little extra of every finish material for touch-ups and repairs later.
- Check local building codes and permits before structural, electrical, plumbing or gas work.

### Common mistakes to avoid

- Sizing heating or cooling equipment by area alone when insulation, windows and climate make a big difference.
- Buying too little paint, stain or flooring and ending up with mismatched batches.
- Overlooking the extra material for steps, railings, gables and trim.

### Inputs explained

FieldWhat to enterFence lengthUnits: ft, m, in, yd, cmPost spacingChoose one: 6 ft, 8 ft, 2.4 m, 1.8 mGatesA numberGate widthUnits: ft, m, in, yd, cmRails per sectionA numberPicket widthUnits: in, cm, mm, ft, mGap between picketsUnits: in, cm, mm, ft, mConcrete bags per postA numberPrice per postUnits: /piecePrice per railUnits: /piecePrice per picketUnits: /piecePrice per bag of concreteUnits: /piece

### What each result means

- **Fence run (excluding gates)** = max([Fence length] - [Gates]×[Gate width], 0)
- **Sections** = ceil([Fence run (excluding gates)]÷[Post spacing] - 0.000001)
- **Posts** = [Sections] + 1 + [Gates]
- **Rails** = [Sections]×[Rails per section]
- **Pickets** = ceil([Fence run (excluding gates)]÷([Picket width] + [Gap between pickets]) - 0.000001)
- **Bags of concrete** = [Posts]×[Concrete bags per post]
- **Material cost** = [Posts]×[Price per post] + [Rails]×[Price per rail] + [Pickets]×[Price per picket] + [Bags of concrete]×[Price per bag of concrete]
- **Cost per length** = [Material cost]÷[Fence length]

### Example values

How the main result changes when **Fence length** changes and everything else stays at the example values above:

Fence length (ft)Pickets75155112.5237150319187.5401225483300646

## Worked example

Inputs — Fence length: 150 ft; Post spacing: 8 ft; Gates: 1; Gate width: 4 ft; Rails per section: 3; Picket width: 5.5 in; Gap between pickets: 0 in; Concrete bags per post: 2; Price per post: $18 /piece; Price per rail: $9 /piece; Price per picket: $3 /piece; Price per bag of concrete: $6.5 /piece.

Results — Fence run (excluding gates) = 146 ft; Sections = 19; Posts = 21; Rails = 57; **Pickets = 319**; Bags of concrete = 42; Material cost = $2,121.00; Cost per length = $14.14 /ft.

## FAQ

**How many pickets do I need for 100 ft of fence?**
With 5½ in pickets and no gap, 219 pickets; with a 2½ in gap, 150.

**How far apart should fence posts be?**
6–8 ft; 8 ft is standard for wood, 6 ft for heavier privacy panels or windy sites.

**How many rails does a fence need?**
Two for fences up to 4 ft, three for 6 ft privacy fences.

**How deep should fence posts be?**
About one-third of the post length – 2–3 ft for a 6 ft fence – and below the frost line.

**What formula does the Fence Calculator use?**
Sections = ceil((length − gates) ÷ post spacing).

