We consider the problem of minimizing the fuel consumption of a subsonic turbojet passenger aircraft at the climb phase. In addition to fuel consumption, the objective function to be optimized includes the time spent at the climb phase, since climb optimization is part of the optimization problem for the entire flight with the requirement to arrive at a given point at a given time. Since at the end of the phase it is necessary to reach the given values of speed and altitude from which the cruising flight should begin, penalties for not reaching these values are added to the objective function. The value of the objective function is the result of a numerical solution of a system of differential equations; therefore, for optimization, a gradient-free search method is proposed using candidate points and taking into account constraints. An example of optimizing fuel consumption in comparison with a standard climb profile is considered for two options for the possible implementation of the control system: thrust and pitch control or only pitch control at a constant value of thrust control.