Use the net fence run
Start with the full measured length. Multiply the number of gates by the width of each opening, then subtract that total from the measured length. The result is the net fence run: the length that needs fence fabric or pickets and rails.
net fence run = total measured length − (gate count × gate opening width)
A gate opening is not a short fence section. Treating it as one can overstate the rails and infill you need.
Add gate posts separately
A gate still needs support at both sides. For the planning method used by this site, each gate adds two posts after the straight-run post count is calculated.
posts = ceil(net fence run ÷ post spacing) + 1 + (gate count × 2)
This is a material-planning rule for a single straight run, not a structural or permit specification. Confirm the final post design, hardware, and local requirements before building.
What changes and what does not
- Rails: calculate them from the straight-run sections after gate openings are removed.
- Pickets, slats, or fence fabric: calculate them from the net fence run, not the original measured length.
- Posts: include the straight-run posts and the two posts for every gate.
- Concrete and fasteners: depend on the resulting post count and your chosen gate and fence details.
Enter gate details in the calculator
Enter your total fence length, then add the number of gates and the width of one opening. The calculator shows the length after gate openings in its formula notes and includes gate posts in the result.