Periodic texturing is one of the main techniques for light-trapping in thin-film solar cells. Periodicity allows for the excitation of guided modes in the structure and, thus, largely enhances absorption. Understanding how much a guided resonance can increase the absorption is therefore of great importance. There is a common method to understand if an absorption peak is due to the excitation of a guided mode, using dispersion diagrams. In such graphs, a resonance is identified as the intersection of a guided-mode-line of a uniform waveguide (with the same optical thickness as the grating structure) with the center of a Brillouin zone of the grating. This method is unfortunately not reliable when the grating height is comparable with the thickness of the wave-guide, or when the thickness of the wave-guide is much larger than the wavelength. In this work, we provide a novel approach to calculate the contribution of a guided resonance to the total absorption in a periodic waveguide, without using the dispersion diagram. In this method, the total electric field in the periodic structure is described by its spatial frequencies, using a Fourier expansion. Fourier coefficients of the electric field were used to calculate the absorption of each diffraction order of the grating. Rigorous numerical calculations are provided to support our theoretical approach. This work paves the way for a deeper understanding of light behavior inside a periodic structure and, consequently, for developing more efficient light-trapping techniques for solar cells applications.