Fence Calculator: Posts, Rails, Pickets and Total Cost
A fence estimate comes down to five numbers: posts, rails, pickets or panels, gates, and concrete. Get the post count wrong and the whole layout shifts. This fence calculator works through all five from the run length, post spacing, and fence type. Pick wood privacy, spaced picket, chain link, vinyl, ornamental, or composite, and the tool loads the default spacing and rail count for that style.
Enter the cost per post, per rail, per picket or panel, per gate, and per post of concrete, and the total cost builds itself. Labor can be a flat rate per metre or per foot. The output also gives the cost per linear unit, which is the number most people compare against a contractor quote. It works in metric or imperial units and recalculates on every change.
How to Use the Fence Calculator
Pick your unit system: metric (metres) or imperial (feet).
Choose a fence type from the dropdown. Defaults load automatically.
Enter the total fence run length.
Set the fence height.
Confirm the post spacing. 2.4 m or 8 ft is standard for wood privacy.
Pick how many rails per section. Two rails is typical.
Set the picket width and gap. These are disabled for panel fences.
Add gates and gate width, then enter your unit costs and labor rate.
The Summary tab leads with total cost and material counts. Detailed Breakdown lists every quantity and cost line.
How the Fence Calculator Formula Works
Fence math starts with how many bays fit along the run. Each bay sits between two posts.
Formula: Bays = [ Total length ÷ Post spacing ]
Formula: Posts = Bays + 1
Formula: Actual spacing = Total length ÷ Bays
Formula: Rails = Bays × Rails per section
Formula: Pickets per bay = ⌊ (Actual spacing + Gap) ÷ (Picket width + Gap) ⌋
Formula: Total pickets = Pickets per bay × Bays
Formula: Material cost = (Posts × Cost per post) + (Rails × Cost per rail) + (Items × Cost per item) + (Gates × Cost per gate) + (Posts × Concrete per post)
Formula: Total cost = Material + (Length × Labor rate) + Additional
The bay count rounds up, so the actual spacing comes out slightly shorter than the target. A 30 m run at 2.4 m spacing gives 13 bays and 14 posts, with actual spacing of 2.31 m. That’s the correct way to lay out a fence. The posts land at even intervals, and the last bay isn’t an odd short piece.
Picket count uses the pitch between pickets, which is picket width plus gap. The formula adds one extra gap so the first and last picket sit flush with the posts. For a 2.31 m bay with 0.14 m pickets and 0.02 m gaps, the count is 14 pickets per bay.
Panel fences (chain link, vinyl, ornamental, composite) skip the picket math. One panel fills each bay.
The fence type dropdown loads sensible defaults: rails per section, post spacing, picket size, gate width. Change the type and the fields update. You can override any of them.
Worked Example: A 30 m Wood Privacy Fence
Say you’re pricing a 30 m wood privacy fence, 1.8 m tall, with one gate. Post spacing is 2.4 m, two rails per section. Pickets are 0.14 m wide with a 0.02 m gap. Costs are $18 per post, $9 per rail, $2.50 per picket, $120 per gate, $6 per post of concrete, and $25 per metre of labor.
Bays: ⌈ 30 ÷ 2.4 ⌉ = 13 sections
Posts: 13 + 1 = 14
Actual spacing: 30 ÷ 13 = 2.31 m
Rails: 13 × 2 = 26 rails
Pitch: 0.14 + 0.02 = 0.16 m
Pickets per bay: ⌊ (2.31 + 0.02) ÷ 0.16 ⌋ = ⌊ 14.56 ⌋ = 14 pickets
Total pickets: 14 × 13 = 182 pickets
Post cost: 14 × $18 = $252
Rail cost: 26 × $9 = $234
Picket cost: 182 × $2.50 = $455
Gate cost: 1 × $120 = $120
Concrete cost: 14 × $6 = $84
Material cost: $1,145
Labor cost: 30 × $25 = $750
Total cost: $1,895
Cost per metre: $63.17
That’s $63 per metre for a mid-grade wood privacy fence, materials and labor. The picket count is the biggest material line, which is typical. A spaced picket fence with wider gaps would cut that significantly.