This study considers existing methods of mathematical modeling of lithium-ion batteries based on the Shepherd formula, as well as using formulas from the general course of physics. In order to measure experimental data in automatic mode, a special measuring facility was developed, the main element of the setup is a programmable platform based on the ATmega328p microprocessor. It controls the process, measures the voltage on the battery and transmits data to the computer every 5 seconds via the UART interface of the microprocessor for further analysis. On the basis of the data obtained, an experimental dependence of the battery discharge by direct current over a certain peri-od of time was built. This was followed by a calculation of battery capacity. The load is 20 resistors connected in series-parallel, in order to dissipate the thermal power released on them when an electric current flows. Since the resistors are carbon with precision accuracy class, heating does not raise ambient temperature by more than 10 degrees. Thus any change in their resistance can be neglected. The values obtained were used to implement and test the mathematical model in the MATLAB/Simulink simulation environment. The test results showed the similarity of the obtained values with the ide-alized Shepherd model, since the standard deviation of all points from this model was 2.6%.