How the calculation works
Divide total length by panel width and round up for sections. This assumes one continuous straight run, with a post at each end and on each side of each gate.
Simple example
A 48 ft run with 8 ft panels and one gate uses about six panels and eight posts.