A computer program has been developed for the optimum design of prestressed concrete beams under flexure. Optimum values of prestressing force, tendon configuration, and cross-sectional dimensions are determined subject to constraints on the design variables and stresses. 28 constraints have been used including flexural stresses, cover requirement, the aspect ratios for top and bottom flanges and web part of a beam and ultimate moment. The objective function contains cost of concrete, prestressing force and formwork. Using this function, it is possible to obtain minimum cost design, minimum weight or cross-sectional area of concrete design and minimum prestressing force design. Besides the idealized I-shaped cross-section, which is widely used in literature, a general I-shaped cross-section with eight geometrical design variables are used here. Four examples, one of which is available in the literature and the others are modified form of it, have been solved for minimum cost and minimum cross-sectional area designs and the results are compared. The computer program, which employs modified grid search optimization method, can assist a designer in producing efficient designs rapidly and easily. Considerable savings in computational work are thus made possible.