A computer program to design an optimal shape of airfoil is developed. It is based on a computationally efficient Euler solver with a numerical optimization algorithm. The design goal in the present study is to obtain the airfoil geometry which produces the minimum possible wave drag while maintaining the lift at a specified design condition. To do this, the drag coefficient is used as the objective function and the design sensitivity is obtained by finite-difference method. Finally, airfoil designs for the transonic flow condition are performed with various shape functions and the comparison of the results is presented.