The interest depends on how often this loan is compounded. Is it compounded daily, weekly, monthly, or annually? In the following formula, CF stands for Compound Frequency (how often compounded). So, here are the definitions of the variables in the formula:
P = Principal
ar = Annual percentage rate
CF = Compound frequency (Yearly = 1, Monthly = 12, Weekly = 52, Daily = 360)
Days = Number of days of the loan.
Therefore, the calculation of interest due for the number of days given would be:
(((P*(1+(ar/CF))^CF)-P) /360) * Days
This formula ONLY works for loans less than 360 days!
Hope this helps,