how to calculate discount rate