The least square method was used to fit the ground level line into a bidirectional lateral grade, and then to calculate the cross-sectional areas of earth work, effectively ensuring the calculation accuracy together with improving the calculation speed.