What this fence calculator estimates
Give it the length of your fence line, the height, the style and how far apart you want the posts, and it works out the main materials to buy: posts, rails, pickets, boards or panels, and bags of concrete to set the posts. It also tells you the real post spacing, the minimum post length and a breakdown of end, corner, gate and line posts.
It is built for planning and shopping lists. For a single material in more detail, use the fence post calculator, the wood fence calculator or the picket calculator. To price the job, use the fence cost calculator.
How to measure your fence line
- Mark the corners and ends of the fence with stakes. If you are near a boundary, confirm where it is first.
- Measure each straight run between stakes and add them together. A measuring wheel is quickest for long runs.
- Include gate openings in the total. The calculator removes them for you.
- Count the corners: every place the fence changes direction.
How the numbers are calculated
Sections and posts
A section is the span between two posts. The fenced length (total length minus gate openings) is divided by your post spacing and rounded up:
sections = ⌈ fenced length ÷ post spacing ⌉
A straight run needs one more post than it has sections. Corners and gates split the fence into separate runs; each is rounded up on its own, so the calculator allows up to one extra section per run. Corner posts are shared by the two runs that meet there. The gate posts are the posts either side of each opening.
Rails
Vertical-board fences get 2 rails per section up to about 4 ft (1.25 m) tall, 3 rails up to about 6½ ft (2 m), and 4 rails above that. Rails are counted per section and then the waste allowance is added. Horizontal board fences and panel fences don't need separate rails.
Pickets, boards and panels
Vertical pickets are counted along the whole fenced length:
pickets = ⌈ (fenced length + gap) ÷ (picket width + gap) ⌉
Horizontal fences get one board per row per section, with enough rows to reach the fence height. Panel fences get one panel per section.
Concrete
Each hole is treated as a cylinder, and the volume the post takes up is subtracted. The total is divided by the yield of your bag size and rounded up to whole bags.
Worked example
The calculator opens with this example: a 150 ft wood privacy fence, 6 ft high, posts at most 8 ft apart, one 4 ft gate, and 10% waste.
- Fenced length: 150 − 4 = 146 ft.
- Sections: 146 ÷ 8 = 18.25 → 19, plus 1 because the gate splits the fence into two runs = 20 sections.
- Posts: 20 sections + 1 gate + 1 to finish the run = 22 posts (as few as 21 if both runs divide evenly).
- Rails: 3 per section × 20 = 60, plus 10% = 66 rails.
- Pickets: 146 ft = 1,752 in ÷ 5½ in = 318.5 → 319, plus 10% = 351 pickets.
- Concrete: 22 holes, 10 in × 24 in around a 4×4, ≈ 20.26 ft³ ÷ 0.375 ft³ per 50 lb bag = 54.01 → 55 bags.
Fence styles in this calculator
| Style | What it assumes |
|---|---|
| Wood privacy | 5½ in (1×6) pickets butted together, rails by height. |
| Picket | 3½ in (1×4) pickets with 2½ in gaps, rails by height. |
| Horizontal wood | 5½ in boards with ½ in gaps, fixed post to post, no rails. |
| Panel | One pre-built panel per section; enter the panel's on-center spacing. |
Need a different board size, board-on-board or shadowbox? The wood fence calculator lets you set every dimension.
What this estimate leaves out
Every fence is a little different. This calculator doesn't know your slope, soil, wind exposure or local rules, and it doesn't count gate materials, post caps, fasteners, gravel, stain or tools. Treat the quantities as a solid starting list and check them against your plan before you buy.