The method combining linear programming theory and computer technology, affords the possibility for the Optimization problem of food prescription in engineering design. Excel's Solver function may be used to solve problems with up to 200 decision variables, enough to calculate the most problems about food prescription. Combined design requirement of mayonnaise prescription, the decision variables, constraint condition and mathematics model of cost are established. The optimization prescription of minimum cost is gotten through the function of Excel programming calculation. It may provide valuable reference for the application of computer in prescription design.