With the development of the market of electric vehicles, the issue of efficient battery charging becomes even more urgent. Thanks to the continuous increase in the level of development of electronics, new opportunities appear to create power electrical equipment with previously unattainable characteristics. For these purposes, a universal algorithm for fast charging of LiFePO4 batteries been developed. It assumes the fastest charging of the battery without damage due to overheating or overcharging. The algorithm includes several main parts: the algorithm of initial temperature testing, the algorithm of initial trickle charging, the main current charging algorithm, the algorithm of permanent temperature testing, the main voltage charging algorithm, algorithm of permanent temperature testing, the algorithm for final trickle charging. The efficiency of the fast battery-charging algorithm studied by mathematical modeling. Computer modeling carried out using open source software. This approach to modeling allows young specialists, students, graduate students and other interested parties to be involved in research to find new ideas and solutions. It also allows you easily adapt the parameters of the mathematical model to the equipment of specific manufacturers. One of the modern lines of development of vehicles is the creation of freight and passenger transport, powered by electric traction. The adjustment of the mathematical model carried out taking into account the features of vehicles of this type. The results of the simulation are applied in the creation of mobile and stationary devices that provide high-speed charging of batteries and power supply of on-board equipment when moving vehicles and in parking.