How is the change of moment handled in a Weight and Balance calculation with a swept wing aircraft?
In supplement to @Dave's answer and as he said depending on the airplane, the complexity of calculating the c.g. can vary greatly. The manufacturer of every large aircraft I've programmed weight &amp; balance for has had tables for each tank. In Boeing's case for the 747-400, each table line is a tank volume in gallons and the tank c.g. at that volume in inches. For example, and using JSON notation since the OP is JavaScript fluent:

{"vol":3200,"ba":1453.7},
{"vol":3250,"ba":1454.8},
{"vol":3300,"ba":1456.0},
{"vol":3350,"ba":1457.2},
{"vol":3400,"ba":1458.4},
{"vol":3450,"ba":1459.7},

"vol" is the fuel volume in the tank in gallons

"ba" is the balance arm at that volume in inches

Since fuel is loaded by weight, one has to use the fuel density to convert to volume.

Typically, at least for large aircraft, you have to satisfy the c.g. envelope for:


zero fuel weight
ramp weight after fueling
takeoff weight
landing weight


Also there has to be provision for carrying ballast fuel if that is necessary.