Star formation rate and stellar mass calibrations based on infrared photometry and their dependence on stellar population age and extinction