This paper presents a simple method to obtain the coefficients of the 2 control loops of power factor correction synchronously by using genetic algorithm, particle swarm optimization, and differential evolution. The control coefficients are obtained easily by this way. It is shown by the simulations that the results are more efficient than classical proportional integral tuning methods regarding to dynamic performance criteria. A new cost function that involves total harmonic distortion parameter is formed to apply the heuristic algorithms. The performances of the proposed algorithms are experienced under line, and load variations and the algorithms have been compared with each other considering program size, complexity, and convergence time of algorithms.