In order to obtain an image of the solar corona, coronagraph optical design needs to be optimized with respect to stray light reduction. Despite the accurate optical design, some stray light is present on the focal plane in addition to the coronal signal. The stray light level has to be estimated in order to test the quality of the optical design. The stray light is given by scattering off the surfaces of the optical elements and by diffraction from the instrument apertures. In order to estimate the stray light level on the focal plane, a diffraction calculation is necessary. In this paper we describe the diffraction calculation for a coronagraph with an innovative stray light reduction design. For the same optical configuration we used two different algorithms, based on different approaches to Fresnel diffraction computation. By using the Fresnel-Kirchhoff scalar theory we developed an algorithm, and we used it to write codes in IDL (Interactive Data Language, by Research System Inc.), and C programming languages. By using the GLAD (General Laser Analysis and Design, by AOR) software, which diffraction algorithm is based on the principles of Fourier optics, we wrote a further code. In this paper we compare the results of the different codes and we discuss their efficiencies.