Usually, when we talk about losses in a transformer, we classify the losses into two basic categories: losses in the iron (voltage-dependent losses) of the transformer and losses in the copper (current-dependent losses) of the transformer. By increasing the number of active transformers in the substation, we reduce the losses in the copper of the transformer, but on the other hand, we increase the total losses in the iron of the transformer. Considering the above, it is possible to conclude that for each operating condition it is possible to determine the optimal number of active transformers in the substation and the method of their connection. In this paper, a description of the optimization algorithm is given, which enables the determination of the optimal switch-on state of the substation in order to minimize the losses of working energy in the entire substation while avoiding frequent switching on and off of the transformer, while taking into account the provision of sufficient power in the transformation for the normal supply of distribution consumption. The described algorithms are applicable for 110/x kV and 35/10(20) kV substations that have more than one installed transformer.