The present invention is a method to determine the cetane number of a diesel fuel containing a fatty acid alkyl ester including determining the infrared spectrum of the fuel and correlating the spectrum to the cetane number using a multivariate-based Mid-FTIR model. The fatty acid alkyl ester may be rapeseed methyl ester and the infrared spectrum includes the frequency ranges 4900-3500 cm-1 and 2200-1624 cm-1 or the frequency ranges 4900-3500 cm-1 2200-1800 cm-1 and 1700-1624 cm-1.