With the development of society and continuous scientific and technological innovation, accurate accounting technology has become an indispensable part of current economic life. The accurate calculation of electricity charge is very important and practical in accurate management and statistical analysis. Based on the machine learning method, this paper studies the optimization of electricity charges, and proposes a new idea that is based on the characteristics of time series to achieve efficient and accurate pricing of electricity. At the same time, in view of the following problems of traditional large sample algorithm, such as insufficient accuracy, low stability, poor real-time and other shortcomings, an improved in-depth combination of neural network technology and accounting machine data fusion scheme is proposed. After that, the optimization effect of the machine learning based accurate electricity charge calculation algorithm is tested. The test results show that the method has high accuracy, stability and scalability.