The aircraft weight and balance problem (WBP) defined in terms of selecting unit load devices (ULDs) from an available set and allocating them to specified positions in cargo holds. It is critical to aircraft safety as well as operational efficiency and profit. It is an NPhard problem combining characteristics of the knapsack problem and generalized assignment problems, as well as complex practical constraints. A mixed integer programming model is constructed to maximize the total payload and minimize the center of gravity (CG) deviation by considering the constraints of positions, weights, balance etc. In contrast to prior studies using a constant delta to limit CG deviation, a new set of CG envelope constraints is proposed based on the variation in actual CG under different statuses and precise describing CG. A linearizing strategy is further designed to simplify the nonlinear CG envelope constraints. The proposed model can be solved using commercial optimization software within a few seconds and maintain the CG within the designated CG envelope in all test instances; in contrast, the other (CG deviation-based) method may result in flight hazards in some scenarios.This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.