How to check this calculation
Formula & conventions
Usable width excludes margins. Count mode divides remaining space among internal gaps and selected end gaps. Fixed-gap mode centres the assembly; target-gap mode compares the neighbouring whole-number counts.
g = (W − m₁ − m₂ − n × b) / (n − 1 + e₁ + e₂)
Position origin: left edge or base indicated in the drawing.