Fence calculator

Estimate posts, rails, and pickets across wood fence runs and gate openings.

Measurements and materials

Fence and gate segments

Segment 1
Posts, rails and pickets

Results

Select Calculate to see results for your measurements.

Use your results

How it works

How to measure

Mark each end, corner and gate post centre. Enter each straight fence length centre to centre. Enter each gate as its own segment using the distance between gate post centres, including post width and the gate manufacturer’s required clear opening. Mark a separate run where segments do not share a post. Use actual post and picket face widths.

Formula

Divide each fence run by maximum post spacing and round up to equal sections. Count one initial post per separate chain and one additional post per section or gate. Subtract one post face from the centre spacing for the clear span. Multiply sections by rails per section and fit full pickets using floor((clear span + gap) ÷ (picket width + gap)). Centre the pickets in each section.

Worked example

Enter 4 m of fence, a 1 m gate, then 2 m of fence as one connected run. Use 2 m maximum spacing, 100 mm posts, two rails, 100 mm pickets and a 50 mm gap.

There are three fence sections and a gate, hence five posts. Each fence section is 1.9 m clear and fits 13 pickets. Total is six rails and 39 pickets.

What changes the result

Splitting a run at a gate or corner can change the section count. Post width reduces the room for rails and pickets. The section diagram shows the first fenced bay and centres the pickets with balanced edge gaps.

Assumptions and sources

Post spacing, rail count, widths, and gaps are editable layout examples. Check the requirements of your materials and site.

For open, ordered chains with equal-width posts. Count a shared corner by making consecutive segments connected. For a closed perimeter, the estimate includes both end posts, so account for one shared closing post separately. Gate leaves, gate hardware, offcuts, fasteners, and concrete are separate. Verify site boundaries and installation requirements.

Use this estimate for planning. For engineering or code-compliance questions, consult a qualified professional.

Method version 1.0

Related calculators

Embed this calculator

Estimates for common sizes