calculate interest from rate, time and principal