What the fence calculator does
A typical wood fence is built from posts set in the ground, horizontal rails running between posts, and vertical pickets (boards) fixed to the rails. This calculator counts each component for one straight fence run, removing gate openings and adding the posts that gates need.
It is designed for picket, privacy and board-on-rail fences. For panel fences, turn off pickets and use the post count; for wire fences, the posts and the total run length are what matter.
How to use it
- Measure the total length of the fence line, including gate openings.
- Enter the fence height and the post spacing, measured centre to centre.
- Enter the number of horizontal rails in each section.
- Add the number of gates and the width of each gate opening.
- Enter the picket width and the gap between pickets (0 for a solid privacy fence).
- Optionally enter unit costs for posts, rails, pickets and gates.
Fence formulas and assumptions
For one straight run with no gates:
Posts = ⌈Fence length ÷ Post spacing⌉ + 1
With gates, the gate openings are removed and each gate adds one post:
Fenced length = Fence length − (Gates × Gate width)
Sections = ⌈Fenced length ÷ Post spacing⌉
Posts = Sections + 1 + Gates
Rails = Sections × Rails per section
Pickets = ⌈(Fenced length + Gap) ÷ (Picket width + Gap)⌉
⌈ ⌉ means round up. The “+1” is the extra post at the end of the run, and the gate rule assumes each gate sits in the line of the fence so that it splits the run and needs a post on each side. Pickets for the gate leaves themselves are not counted.
Worked example
A 100 ft privacy fence, 6 ft high, posts every 8 ft, three rails, one 4 ft gate, 5½ in pickets with no gap:
- Fenced length: 100 − 4 = 96 ft
- Sections: 96 ÷ 8 = 12
- Posts: 12 + 1 + 1 = 14
- Rails: 12 × 3 = 36 (8 ft long)
- Pickets: 96 ft = 1,152 in; 1,152 ÷ 5.5 = 209.45 → 210 pickets, 6 ft long
Metric: a 30 m fence with posts every 2.4 m and no gates has 13 sections (12.5 rounded up) and 14 posts. With 100 mm boards spaced 20 mm apart, it needs 251 boards.
Understanding the results
- Posts – line and end posts for the run plus one per gate.
- Rails – one rail per section per row, with the total linear length.
- Pickets – boards to cover the fenced length, cut to the fence height.
- Fence face area – length × height for one side, useful for estimating stain or paint.
Planning tips
- Confirm your boundary before digging, and contact your local utility locating service.
- Check local rules on height, setbacks and whether a permit or neighbour agreement is required.
- Posts are usually longer than the fence height because part is buried; follow the post and fence manufacturer’s guidance or local practice for burial depth.
- Adjust spacing so sections are equal rather than ending with one short bay.
- Buy a few spare pickets for warped or split boards.
What can change the material list
- Corners and separate runs – each additional straight side adds an end post. Calculate each side separately, or add one post per corner.
- Slopes – stepped fences on uneven ground may need shorter sections and extra posts.
- Wind and structure – exposed sites, tall fences and solid boards may need closer post spacing, larger posts or bracing. Follow local requirements.
- Board width – actual board widths often differ from nominal sizes; measure one before ordering.
Setting posts in concrete? Work out the volume of each hole with the concrete calculator (round hole) and convert it to bags with the concrete bag calculator.