Calculation of unit rate and cost