We investigated the temperature distribution induced by laser irradiation of ultrathin magnetic films by applying a finite element method (FEM) to the finite difference time domain (FDTD) representation for the analysis of thermal induced spin currents. The dependency of the thermal gradient (∇T) of ultrathin magnetic films on material parameters, including the reflectivity and absorption coefficient were evaluated by examining optical effects, which indicates that reflectance (R) and the apparent absorption coefficient (α*) play important roles in the calculation of ∇T for ultrathin layers. The experimental and calculated values of R and α* for the ultrathin magnetic layers irradiated by laser-driven heat sources estimated using the combined FDTD and FEM method are in good agreement for the amorphous CoFeB and crystalline Co layers of thicknesses ranging from 3~20 nm. Our results demonstrate that the optical parameters are crucial for the estimation of the temperature gradient induced by laser illumination for the study of thermally generated spin currents and related phenomena.