Transformer life is critical to ensuring the reliability and stability of the power system. However, making decisions about the optimal time to replace a transformer is challenging due to the complexity of the interactions between equipment aging and applied maintenance. This study employs a risk analysis method based on the health status of the equipment and the consequences of its failure to develop a mathematical optimization methodology aimed at identifying the optimal timing for transformer replacement or monitoring activities, thus facilitating effective preventive maintenance strategies. The methodology was developed in AMPL with the objective of minimizing the risk index of the transformer fleet, taking as a constraint a given annual budget. It was applied to a study case covering a period of six years for a fleet of 39 110 kV transformers using real data. The results presented show that the developed methodology provides valuable information to the power system operator who is thus able to manage the transformer fleet and ensure a safe and financially efficient operation of the grid, providing a list of the 10 most risky units and suggesting a replacement and improvement scheme for them.