trowelmath
Fence panel
Fencing · Calculator

Fence panel calculator

How many pre-built panels and posts a straight run takes — plus the post-width correction that quietly turns a clean 96 ft line into 99.79 ft, and the on-center spacing that lets the panels actually drop in.

A
Detail A — Panel run
— Panels
Posts—
Post spacing (on-center)—
Finished line (panels between posts)—
Final panel—
Offcut (trimmed & binned)—

01 How the math works

Panel count is the paneled run divided by the panel width, rounded up. The paneled run is the whole run minus any gate openings, because a gate takes the place of a panel. Posts follow from the bays: a straight run of bays — panels and gates together — carries one more post than it has bays, since every post between two bays is shared by both.

paneled run = run − (gates × gate width)
panels = ⌈ paneled run ÷ panel width ⌉
posts = panels + gates + 1
post spacing (on-center) = panel width + post width

Two things that plain division hides. The last panel is almost never full — whatever run is left after the full panels come off the roll gets trimmed onto the final one. And a panel that drops between two posts leaves each post's own width standing in the line, so the finished fence runs longer than the tape by one post width at every post.

02 Worked example

Take a 96 ft (29.26 m) run of privacy fence built from 8 ft (2.44 m) pre-assembled panels on 4×4 posts — actual 3.5 in (89 mm), per PS 20.

The count is clean: 96 ÷ 8 = 12 panels, and 12 bays take 13 posts. Post spacing on-center is 8 ft + 3.5 in = 8 ft 3.5 in (2.53 m), not a flat 8 ft.

Now the correction. Each of the 13 posts stands 3.5 in wide in the line, so the finished fence runs 96 ft + 13 × 3.5 in = 99.79 ft (30.42 m) — 3.79 ft (1.16 m) past the 96 ft you measured. A tape measure counts the gap; the finished fence counts the posts too.

03 When this calculator is wrong

The count is only ever as good as its assumptions. Three places the tidy number and the built fence part ways:

04 What to do with the result

Order the panel count as it stands — it already includes the final panel, which you buy whole and cut on site. Set the end and corner posts first, pull a string, and space the intermediate posts at the on-center figure (panel width plus post width), not at the bare panel width. Spacing them at a flat panel width is the most common panel-fence mistake, and it is why a run comes up a post short of the last panel at the far end.

If the finished length overshoots something fixed — a property line, a house wall, an existing gate — settle now whether you will trim the end panel or draw every post in by a fraction. It is a five-minute decision on paper and a weekend of re-digging once the posts are in concrete.

05 Common questions

How many fence panels do I need for a given length?
Run length divided by panel width, rounded up. A 100 ft (30.48 m) run of 8 ft panels is 13 panels and 14 posts; the 13th panel gets cut to 4 ft (1.22 m). Subtract any gate openings from the run before you divide.
How far apart should fence posts be for pre-built panels?
Panel width plus the post's actual width, measured on-center. Eight-foot panels on 4×4 posts (actual 3.5 in / 89 mm, PS 20) sit 8 ft 3.5 in (2.53 m) on-center. Set them at a flat 8 ft and the last panel will not drop in.
Do I count the last post?
Yes. A straight run always has one more post than it has bays. Ten panels take eleven posts. Each gate opening adds one more.
Are fence panels a standard width?
There is no single standard. Pre-assembled wood and vinyl privacy panels are commonly sold around 6 ft and 8 ft wide, but the exact width varies by product line. Measure the panel you are actually buying and enter that — don't assume 8 ft.
How does a gate change the count?
A gate is a bay, like a panel, so it takes the two posts around it (sharing one with the panel on each side). The calculator subtracts each gate's clear opening from the run before counting panels, then adds the gate back as a bay when it counts posts.