We present a new algorithm for the design of phase-only gratings. In general, a successful grating design will shape the relative intensities of the diffracted orders while simultaneously maximizing the light contained in the orders of interest. This iterative algorithm achieves both of these goals. Solutions typically have efficiencies of .90 to 1.00 and can be made arbitrarily close to the desired intensity profile. Convergence to a solution is quick for small numbers of orders (about 20) and the performance of the final solution is fairly independent of the starting point.© (1991) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.