Calculation of power flows is one of the basic calculations used in stationary plant analysis and planning of the power system (EES). Unlike transmission networks, distribution networks in regular operation are fed radially, which enables a simpler and faster calculation of power flows. The goal of this paper is to create a computer program for calculating power flows in radial distribution networks based on the backward-forward algorithm. It is also necessary to explain and computer-implement algorithms for topological sorting and detection of loops in networks. The developed computer program will be applied to typical distribution networks and the results will be compared with commercially available programs for this type of analysis.