Mortgage calculator code
Canadian mortgage calculator - 1
In the third installment of our explanation of this Mortgage calculator code series, we finished by saying that the mortgage formula had 2 parts, the first part was to set the Interest Rate (IntRate)
IntRate = AnnualIntRate / PPay
And the second part was to do the actual mortgage calculations:
The Canadian mortgages are compounded semi-annually while the US mortgages are compounded monthly. The basic mortgage formula is the same as the previous formula (see part 2), but the interest rate has to be adjusted:
IntRate = Math.pow((1+AnnualIntRate/2),(2/12)) - 1
and then we finish the process with the basic mortgage formula:
Pa = (PrValue * IntRate) / (1 - Math.pow(1 + IntRate, -Period))
This is fine for annual payments, but what about monthly or bi-monthly payments?
To complex to program? Just click here to purchase 4 mortgage calculators that you can install instantly on your website or for offline use on your computer!
© Copyright (C) 2003-2010 by Dominique Peladeau • 1stop-mortgagecalculator.com.
All Rights Reserved
886 de L'Epee ave., Outremont, QC, H3V 3V3 • (514) 571-9747 (9-5 EST)