This study deals with the minimization of the operational and investment cost in the distribution and operation of the power flow considering the installation of fixed-step capacitor banks. This issue is represented by a nonlinear mixed-integer programming mathematical model which is solved by applying the Chu and Beasley genetic algorithm (CBGA). While this algorithm is a classical method for resolving this type of optimization problem, the solutions found using this approach are better than those reported in the literature using metaheuristic techniques and the General Algebraic Modeling System (GAMS). In addition, the time required for the CBGA to get results was reduced to a few seconds to make it a more robust, efficient, and capable tool for distribution system analysis. Finally, the computational sources used in this study were developed in the MATLAB programming environment by implementing test feeders composed of 10, 33, and 69 nodes with radial and meshed configurations.