In this paper an algorithm for solving optimal power flow problem through the application of a Genetic Algorithm (GA). The objective of an optimal power flow (OPF) is to find steady state operation point which minimizes total generating unit (thermal) fuel cost and the real power loss while maintaining an acceptable system performance in terms of limits on generator real and reactive power outputs. Genetic Algorithm is one of evolutionary algorithms, which has been used in many optimization problems due to its simplicity and efficiency. To test the efficacy of the algorithm, it is applied to IEEE30-bus power system. The optimal power flow results obtained using GA are compared with conventional methods. The simulation results reveal that the GA optimization technique provides better results when compared to other conventional methods.