A wavelength modulation spectroscopy method for measuring the concentration (c Meas) of a gas component of interest in a gas sample comprising the steps of: - passing a portion of the light of a light source through a reference gas and thereafter to a reference detector, the reference gas comprising the gas component of interest or another suitable gas component in a known concentration, - passing another portion of the light through the gas sample and thereafter to a measuring detector, - modulating the wavelength of said light with a frequency (f m), while the wavelength is swept over an absorption line of the gas component, - demodulating the reference detector output (S(ν) Ref) at a higher harmonic (Nf m) of said frequency (f m), - demodulating the measuring detector output (S(ν) Meas) at said higher harmonic (Nf m) of said frequency (f m) and - determining said concentration (c Meas) of the gas component from the demodulated measuring and reference detector outputs (S(ν) N,Meas, S(ν) N,Ref), characterized by - providing a mathematical description of the demodulated reference detector output (S(ν) N,Ref) based on Fourier analysis of the modulated light and on a mathematical expression for the absorption line, said mathematical description comprising unknown modulation parameters with respect to the modulation of the light, - determining said modulation parameters from the demodulated reference detector output (S(ν) N,Ref) and its mathematical description, - providing a further mathematical description of the demodulated measuring detector output (S(ν) N,Meas) based on Fourier analysis of the modulated light and on a mathematical expression for the absorption line, said further mathematical description comprising said unknown modulation parameters and the unknown concentration (c Meas) of the gas component of interest in the gas sample, and - determining said concentration (c Meas) of the gas component from the demodulated measuring detector output (S(ν) N,Meas), its mathematical description and the determined modulation parameters. - passing a portion of the light of a light source through a reference gas and thereafter to a reference detector, the reference gas comprising the gas component of interest or another suitable gas component in a known concentration, - passing another portion of the light through the gas sample and thereafter to a measuring detector, - modulating the wavelength of said light with a frequency (f m), while the wavelength is swept over an absorption line of the gas component, - demodulating the reference detector output (S(ν) Ref) at a higher harmonic (Nf m) of said frequency (f m), - demodulating the measuring detector output (S(ν) Meas) at said higher harmonic (Nf m) of said frequency (f m) and - determining said concentration (c Meas) of the gas component from the demodulated measuring and reference detector outputs (S(ν) N,Meas, S(ν) N,Ref), characterized by - providing a mathematical description of the demodulated reference detector output (S(ν) N,Ref) based on Fourier analysis of the modulated light and on a mathematical expression for the absorption line, said mathematical description comprising unknown modulation parameters with respect to the modulation of the light, - determining said modulation parameters from the demodulated reference detector output (S(ν) N,Ref) and its mathematical description, - providing a further mathematical description of the demodulated measuring detector output (S(ν) N,Meas) based on Fourier analysis of the modulated light and on a mathematical expression for the absorption line, said further mathematical description comprising said unknown modulation parameters and the unknown concentration (c Meas) of the gas component of interest in the gas sample, and - determining said concentration (c Meas) of the gas component from the demodulated measuring detector output (S(ν) N,Meas), its mathematical description and the determined modulation parameters.