To completely evaluate the image quality of grazing incidence optical system, based on aberration theory and principle of Fourier optics, an image quality evaluating code for grazing incidence optical system was developed by using Matlab. Then, a detailed image quality analysis of the Wolter type I and hyperboloid-hyperboloid (H-H) grazing incidence optical system for solar observation was presented. The image quality evaluating code could calculate the point spread function, fractional encircled energy, line spread function and modulation transfer function of grazing incidence optical system with different aperture and focal length at different field and wavelength. This code has directive significance to design and optimization of the grazing incidence optical system.