It is easiest to give an example so I'll go with my first setup as I can remember all of the figures

The flattener/reducer had a back focus of 55mm (pretty standard). I had a QHY9, CFW and Astrodon filters which are 3mm thick.
The QHY9 had 17.5mm back focus.
Filter Wheel 17mm back focus.
As you add 1/3 of filter thickness to optical back focus the calculation ends up being:
55+1-17-17.5= 21.5mm
So I need a 21.5mm spacer.