I have used a spreadsheet for a number of years to calculate weight and balance and then plot both the ZFW, TOW and LDW on a graph in the spreadsheet. I don't use any serious math.
What I do is place the weight and arm limits from the POH into the spreadsheet and using that info, plot a line graph which (provded that the first weight/arm is the same as the last weight/arm), produces an envelope just like the one often produced in the POH.
Now simply plot the appropriate weight and arm on the same graph as a point and there you have the C of G.....as one varies weight or loading position one can watch the result move about.
Regards,
DFC