I think all you need is the centre of gravity position (whether it be a distance from a the datum or a body station) and the location (again, distance from the datum or a body station) of the leading and trailing edge of the wing. Given the last two parameters, you know the length of the MAC.
I assume you're converting a CG position aft / forward of a datum to the %MAC?
% MAC = CG Position - LE MAC
********(TE MAC - LE MAC)
I think that works?