Haven't done this for awhile, but....
You would need the length of the MAC, call it X. Take the total moment for the aircraft, and divide by the total weight. This gives you your arm, from the datum (reference point where all arms are taken from). I presume you mean the datum is defined to be at 25% mac. Then, if forward of the datum is defined to be positive, and if your arm is positive, the %mac is 25-(arm*100/X). Think this works.