The power grid loss reduction is an important technical measure for energy conservation and emission reduction. And line loss rate calculation is an important way for electric utilities to formulate loss reduction targets and forecast the carbon emission. The existing research on line loss calculation mainly focuses on the construction of the model, ignoring the issues of feature analysis. To this end, this paper proposes a line loss calculation method in the station area based on the LightGBM. The selection of electrical features is analyzed, and then, the model input is established by exploring the distribution of electrical feature index and its correlation with the line loss rate. According to the results of feature engineering, a line loss rate calculation model is established based on the LightGBM, and the influence of different model parameters and electrical features on model calculation results is revealed. The validity of the proposed method is verified through the historical data of more than 8,000 low-voltage station areas in a city. The experimental results show that, compared with the existing related research methods, the proposed method has 0.020 MSE and 2.459% MAPE respectively.