Introduction – The mortgage calculator formula
The core part of the calculator code is the mortgage formula:
Pay = PrValue x IntRate / (1 – (1 + IntRate)–Period)
Where Pay is the payment, PrValue the present value of the loan, IntRate the interest rate and Period, the number of years you are borrowing the money.
As I said earlier, it’s easy and at the same time it’s not easy.