A computer based design methodology was developed to facilitate and improve the preliminary design of wastewater treatment plants. It aids design by choosing the least cost treatment system (including sludge treatment and disposal) which meets all the constraints of the particular application. This methodology not only chooses the best alternative treatment system among numerous alternatives but also finds the optimal values of the independent design variables of the processes forming the optimal treatment system. In addition, it has two advantages over currently available design methodologies in that it optimizes wastewater treatment design with respect to the removal of more than one water quality parameter and it considers that sludges produced by different processes have different qualities. This methodology is based on a nonlinear programming method termed optimization by random search and systematic reduction of the size of search region. The design procedure was used to analyze a particular example problem.