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.
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.
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:
- Posts set between panels push the line out. On the 96 ft run above, 13 posts at 3.5 in each add 3.79 ft (1.16 m) to the finished length. This is the case for panels routed into vinyl posts or hung on brackets between wood posts. If your rails instead screw to the face of the posts, the post width sits behind the panel rather than in the line, and the run holds — so know which way your system mounts before you trust the finished-length figure.
- A factory panel is a fixed width you can't round up like a bag. The last bay is whatever the run leaves. A 100 ft (30.48 m) run of 8 ft panels ends on a panel cut to 4 ft (1.22 m) — 4 ft of offcut you pay for and bin. Two honest fixes: cut the end panel, which costs you one factory-finished edge and the rail nailer that came with it, or re-space every post so the run divides evenly.
- It plans one straight run. A corner post is shared by the two panels that meet on it, so corners add no posts — but each leg rounds its own last panel up separately. Two 20 ft (6.10 m) legs meeting at a corner need 6 panels, one more than the 5 a single 40 ft (12.19 m) run would take. Run each straight leg through the calculator on its own and add the posts, minus one shared post per corner.
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.