As a key economic index to measure the planning and management level of power grid company, line loss is not only the main content of completing the construction and transformation task of power grid company, but also an important assessment standard for the operation level of power grid company. In order to improve the generalization ability and prediction accuracy of extreme learning machine (ELM), particle swarm optimization (PSO) algorithm is applied to extreme learning machine (ELM), and a line loss prediction method based on PSO combined with ELM is proposed. The particle swarm optimization algorithm is used to select the optimal hidden layer deviation and input weight matrix to calculate the output weight matrix, so as to improve the accuracy and stability of the extreme learning machine. Experimental results show that the proposed method can effectively improve the accuracy of line loss prediction.