Fence Calculator
Work out the posts, rails and pickets or panels for a fence, with its gates, and the concrete to set each post: enter each side of the fence in order.
Above the ground.
8 ft at most for 8 ft rails; 6 ft is stronger. Panels: panel width + post.
Three for a 6 ft fence (top, middle, bottom).
A 1 × 6 picket is about 5½ in wide.
None for a privacy fence; leave a gap for a spaced picket fence.
Posts to buy
Enter your measurements to see a result.
Measure each straight side of the fence line, corner to corner, and the width of each gate between its posts. Not sure how far apart to set the posts or how deep? How far apart fence posts go, and how deep.
Worked example
Backyard: 50, 100 and 46 ft sides plus a 4 ft gate
| Fence | 196 linear ft |
|---|---|
| Gate openings | 4 linear ft |
| Gates | 1 gate |
| Most space between posts | 8 ft |
| Sections | 26 sections |
| End, corner and gate posts | 5 posts |
| Line posts | 23 posts |
| Posts | 28 posts |
| Rails (3 per section) | 78 rails |
| Pickets, gates included | 439 pickets |
| Concrete per post (hole − post, from the gravel up to the ground) | 0.06 cu yd |
| Concrete, all posts | 1.61 cu yd |
| 50 lb fast-setting bags, rounded up | 116 bags |
| 80 lb bags, rounded up | 73 bags |
| Gravel, all holes | 0.31 cu yd |
| Post length, at least | 9 ft |
Answer: 28 posts. Every side and gate ends at a post, shared at corners, with line posts between sections.
Formula and method
sections in a side = ⌈ side length ÷ post spacing ⌉
posts = one at each end, corner and gate + one between each two sections
pickets in a side = ⌈ (side + gap) ÷ (picket width + gap) ⌉
concrete per post = (π × (hole ÷ 2)² − post²) × depth above the gravel
Each side is split into equal sections no longer than the post spacing, so a 20 ft side with posts at most 8 ft apart has 3 sections. Neighbouring sides share their corner post; a fence that goes all the way around has no loose ends. A gate hangs between two posts, and its pickets are counted so it can be clad like the fence. Rails run between posts, so each section takes its own rails.
The concrete fills the hole around the post, above the gravel at the bottom. Bags are counted by their yield: about 0.375 cu ft for a 50 lb bag of fast-setting mix and 0.60 cu ft for an 80 lb bag of concrete mix (Quikrete). For footings or a pad, use the concrete calculator.
Defaults and where they come from
- Post spacing 8 ft: Simpson Strong-Tie's fence plan marks a post every 8 ft, and fence guides keep wood posts no more than 8 ft apart so standard rails reach; 6 ft is stronger. For panels, use the panel's width plus a post.
- 3 rails per section for a 6 ft privacy fence (Simpson, Outdoor Essentials). UFP's 4 ft picket panels use 2.
- Pickets 5.5 in wide, no gap for privacy: a 1 × 6 is 5½ in wide (PS 20); Outdoor Essentials butts privacy pickets together.
- Holes: 3 times as wide as the post, a third of the post in the ground, and 6 in of gravel at the bottom (Quikrete; Sakrete and Outdoor Essentials agree). At least 2 ft in the ground, and below the frost line.
Materials for common lengths
A straight 6 ft privacy fence with the defaults above, 4 × 4 posts in concrete:
| Fence | Posts | Rails | Pickets | 50 lb bags |
|---|---|---|---|---|
| 24 ft | 4 posts | 9 rails | 53 pickets | 17 bags |
| 50 ft | 8 posts | 21 rails | 110 pickets | 34 bags |
| 100 ft | 14 posts | 39 rails | 219 pickets | 58 bags |
| 150 ft | 20 posts | 57 rails | 328 pickets | 83 bags |
Common mistakes
- Dividing the length by the spacing. A 48 ft fence has 6 sections but 7 posts, and every corner and gate adds posts.
- Buying posts the fence's height. A third of each post goes in the ground: a 6 ft fence needs posts at least 9 ft long.
- Forgetting the gates. Each one needs a post on both sides, and a frame and hinges of its own.
- Building near the property line without checking. Find the line, and check local rules on height and setbacks before you dig; call 811 to mark buried utilities.
Frequently asked questions
How many fence posts do I need?
One at each end, corner and gate, plus one every 8 ft or less between them. A straight 100 ft fence needs 14 posts; the backyard in the worked example, with three sides and a gate, needs 28 posts.
How many bags of concrete per fence post?
For a 4 × 4 post in a 10.5 in hole, with a third of a 6 ft fence's post in the ground, about 4.1 bags of 50 lb fast-setting mix per post. Quikrete's own example, a smaller hole 2 ft deep, takes two bags. The calculator works it out for your holes.
How many pickets do I need?
Divide each side by the picket width plus the gap. With 5½ in pickets and no gap, 100 ft of fence takes 219 pickets. For a total length in linear feet, the linear feet calculator adds sides up.
Related tools and guides
- CalculatorConcrete CalculatorWork out the concrete for a slab, footings, post holes or steps: cubic yards with waste, the ready-mix order, and how many 40, 60 or 80 lb bags to buy.
- CalculatorLinear Feet CalculatorAdd up linear feet from pieces in feet and inches, inches or meters, or find the linear feet of boards that cover an area, with the total cost per foot.
- GuideHow Far Apart Should Fence Posts Be, and How Deep?How far apart to set fence posts, how deep and wide to dig the holes, how much gravel and concrete each post takes, and how many posts your fence needs.