In order to solve the problem that retaining wall cross section design computation is comparatively trouble and it is difficult to obtain the best result, taking top width and bottom width two major indexes in section design of gravity type vertical retaining wall as variable, the minimum cross section area as goal, according to calculating formula of anti-slide, anti-overturning, wall foundation stress and retaining soil request, the mathematical model of non-linear optimization is set up, and applied to the retaining wall section design of Daxin Bridge water control project, Excel is adopted to work out mathematical model, each optimization index of the minimum cross section area is obtained.