Hi,

I am very new to financial mathematics and I am looking for a loan formula to calculate a loan.

I am writing a script (in Perl) to calculate leasing offers out of a price where you got a 10% scrap value (after the end of the contract you can buy the car for 10% of its original value).

The problem is that the formulas (that i can find at least) do not have the FV (future value ) included in it and this is part of my needs. I found a perl module Math::Financial but this does not support the FV parameter in the loan calculation. In Open/Libre Office there is an existent function called PMT that does the trick but I need the actual formula behind that.