We have developed a numerical diffraction tool for cases in which the incident field is a focused spot and the diffracting structure is a single structure or an aperiodic surface. Our approach uses the integral formulation to solve Maxwell's equations and is different from previously published methods in its choice of basis function. We compared numerical results with experimental measurements of the far-field intensity for a focused spot incident on an aluminum grating, and the comparison was favorable. Finally, we predict the diffraction behaviour the reflected signal for this format has a strong dependence on the polarization of the incident light. (C) 1997 Optical Society of America.