Fence length ÷ Post spacing = Sections
The total fence length is divided by the distance between posts. Since partial sections are not possible, the result is rounded up to the nearest whole number.
Sections + 1 = Posts
Every section needs a post at each end, so the total post count is always one more than the number of sections — including the starting post.
Sections × (1 + Waste) = Panels to buy
Each section holds one panel. The panel count is increased by the waste factor and rounded up to give you the number of panels to purchase.