how hourly rate is calculated