The present study focused on knocking noises of internal combustion engines. It was shown that the quantification of knocking noise can be calculated by considering time-frequency masking. The knocking noises were synthesized from the characteristics of diesel engine sounds. The subjective rating of these sounds was performed by a jury test. For the objective evaluation, time-frequency masking is applied to the knocking sound signals, and the modulation degree of those signals was calculated. By a correlation test, the diesel sound quality index (DSQI) was developed. The DSQI was successfully applied to the quantification of knocking noise of diesel engines.