A little help goes a long way. Find a tool/

Home & DIY

Fence Calculator

Free fence calculator: enter total fence run and panel width to get panel count, post count for loops or straight runs, rails, and gate allowances.

YOUR WORKSPACEFree to use. No sign-up.
—
Enter your fence run and panel width above.

Deep dive guides

A LITTLE CONTEXT · 4 MIN READFence Arithmetic: Bays, Posts, and the Gate That Eats a Panel

How fence calculator works

A fence run divides into bays: one panel width each. Divide the total length by the panel width and round up — that is your bay count, the number of panel gaps the layout needs. Standard wood privacy panels are 6 ft wide (1.83 m); chain-link and some panel systems differ, so the width is editable.

Posts live at the joints, so a closed loop (a full perimeter) needs one post per bay, with the last panel meeting the first at the starting corner. A straight run needs one more post: bays + 1, because both ends get a terminal post. Each gate occupies one bay, so gates subtract from the panel count but not from the post count — a gate bay still needs two posts to hinge and latch against.

Rails multiply the panel bays: two rails per bay is the common wood-fence layout, three for taller or picket-heavy styles. The output is a materials count, not a quote — slope, corners, and wind load change post depth and hardware, which no flat-ground calculator can see from here.

Frequently asked questions

How many fence posts do I need for 100 feet?
At 6 ft panels: 100 ÷ 6 rounds up to 17 bays, so 17 posts around a closed loop, or 18 on a straight run where both ends need a terminal post. A gate swaps one panel for a gate bay without changing the post count.
How far apart should fence posts be?
Post spacing equals panel width — 6 to 8 ft is typical for wood privacy fences, up to 10 ft for some rail styles. Wider spacing sags under wind load and snow. This calculator assumes posts fall at every panel joint, which is how panel systems are designed to be built.
Do gates change the panel count?
Yes: each gate occupies one bay, so a 17-bay loop with one gate buys 16 panels. The gate’s two posts are already inside the post count, though you will want heavier-duty gate posts and hardware since gates carry their own swinging weight.
How many rails per panel section?
Two rails (top and bottom) is standard for 6-foot privacy fences. Three rails is common for picket and ranch styles and for anything taller than 6 ft. The calculator multiplies your rails-per-section choice by the panel count to give a total rail length in pieces.