Calculation For Total Costs