> Hi Experts,
>
> I want to calculate interest amount for a period i.e. between date1 and date2 on amt1 i.e.1000
> the formula is
> Interest=Amt1 + Amt1*(date2-date1)*(12/100)
> = 1120
>
> Now this formula works fine for a period upto 365 days. But for a longer period, it fails, becuase interest for 1st year is to be added to the principal and on the gross amount, interest for the 2nd year is to be calculated.
>
> I am sure, there must be a mathematical function available in foxpro. If someone knows about it, please let me know.
>
> Thanks.
n = amount invested
i = intrest rate in percentage
t = number of years
((1+(i/100)^t)*n
so if you have 650 euro to invest for 5 years against a rate of 6.5% the calculation is
((1+(6.5/100)^5)*650 = 890.55633122015625
If the year is broken, let's say you want to invest some money for 5 years and 3 months (1/4 year) you should add the interest of the last year seperately, by dividing the interest rate by 4.
This however is completely depending on the bank policy. Some will only pay interest at end of period. Any money withdrawn from the account inbetween payment dates will not receive interest with some banks.
Boudewijn Lutge®ink
http://www.vfpdevelopers-online.comThe truth will set you free, Ken knew the truth!