The effects of thermal boundary layers on tunable diode laser absorption spectroscopy (TDLAS) measurement results must be quantified when using the line-of-sight (LOS) TDLAS under conditions with spatial temperature gradient. In this paper, a new methodology based on spectral simulation is presented quantifying the LOS TDLAS measurement deviation under conditions with thermal boundary layers. The effects of different temperature gradients and thermal boundary layer thickness on spectral collisional widths and gas concentration measurements are quantified. A CO TDLAS spectrometer, which has two gas cells to generate the spatial temperature gradients, was employed to validate the simulation results. The measured deviations and LOS averaged collisional widths are in very good agreement with the simulated results for conditions with different temperature gradients. We demonstrate quantification of thermal boundary layers' thickness with proposed method by exploitation of the LOS averaged the collisional width of the path-integrated spectrum.