Fence Calculator
Work out how much fencing a run needs — panels, posts and rails, from the fence length and your panel width.
A fence is panels, posts and rails — and the counts follow one another: panels from the length, posts one more than panels, rails two per panel. This calculator gives you all three.
Measure the run, enter the panel width, and the materials follow.
Your results
Enter your measurements and press Calculate.
Quantities are rounded up to whole tiles, planks, boxes or bags, after the wastage allowance. Cost appears only when you enter a price.
Formula
All lengths are converted to a single unit before the calculation: 1 ft = 0.3048 m, 1 in = 25.4 mm, 1 ft² = 0.09290304 m², 1 yd² = 9 ft². Material quantities are rounded up — you cannot buy part of a tile, plank or bag.
How to use this calculator
- Measure the fence run along the ground.
- Enter the panel width (usually 8 ft).
- Add a price per panel if you want a cost estimate.
Worked example
| Fence length | 100 ft |
|---|---|
| Panel width | 8 ft |
| Panels | ⌈100 ÷ 8⌉ = 13 panels |
| Posts | 13 + 1 = 14 posts |
| Rails | 13 × 2 = 26 rails |
Check it by hand: every step above uses the formula in the box. If your numbers match the example inputs but the calculator gives a different answer, please report it via the contact page.
Frequently asked questions
How many fence panels do I need?
Divide the fence length by the panel width and round up. A 100 ft run with 8 ft panels needs 13 panels — the last panel is cut to fit. This calculator does the same maths for your run.
How many fence posts do I need?
One more than the number of panels — a post at each end and one between every two panels. 13 panels need 14 posts.
How deep should fence posts be?
At least one-third of the post length in the ground — 2 ft deep for a 6 ft fence — set in concrete. Post depth is structural: in frost areas, set posts below the frost line, and check local codes.
What about gates?
A gate replaces one panel and needs its own posts and hardware. Measure the gate opening separately and subtract one panel per gate from the count above.
Related calculators
Estimates only. Results are for planning. Measure twice, confirm box coverage and tile sizes on the packaging you buy, and follow the manufacturer's instructions. See the disclaimer.