madCAM is able to calculate the X,Y and Z difference when rotating the 4th and 5th-axis, but you have to set this in the post processor.
Below is a picture of the tool length (L) and the Axis Offset that has to be set in the post processor file.
You can open the post processor and edit the axis offset. (See below for an example of how to change in the post processor)
TRANSFORM <== This tells madCAM to transform the coordinates calculated from the axis offset and rotation angles.
0 <== Here you can set the distance from the rotation center to the bottom of your chuck or toolholder. (It's also important that the tool length is set with the saved cutter)