Calculating interest rate