Finance

Finance based applications that I wrote. For personal development or general use.

Mortgage Calculator

The purpose of this application is to input mortgage details of a potential mortgage and calculate the [approximate] required payments. The results are shown in graphical and table format with other totals. Compare the base scenario which includes no added principal or extra prepayments throughout the life of the mortgage to one with extra principal and prepayments. Typically you have a limit to how much you can pay in total for prepayments for your term, like 20% of the mortgage. I do not have the limit set in the application.

The main driver of this for me was to see how quickly a mortgage could be paid off given realistic extra prepayments or to try and be mortgage free by a specific time. Granted, one could argue that you would be better off (more value in the end) putting the extra prepayments into various investments, but I wasn't concerned with that question for this application. I just wanted to see how each type of extra prepayment affected the outcome.

The application gives only a handful of extra prepayment types (weekly, bi-weekly, monthly, yearly). These are all dependent on your mortgage start date. It is more likely to have extra prepayments done at specific dates, but for more ease, the fixed options provided in the application should suffice.

The calculation is done by taking the input interest rate and getting the effective interest rate (semi-annual compounding; Canadian mortgages are calculated with interest compounded semi-annually). With the mortgage amount, effective interest rates, payment schedule, and amortization, I can find the payment amount required to have the mortgage amount go to zero after the amortization period. I call this the multiplier,
$$ multiplier = P*\frac{ \frac{i_{eff}}{p} * (1.0 + \frac{i_{eff}}{p})^N}{(1.0 + (\frac{i_{eff}}{p}))^N - 1.0} $$ In this equation, the parameters are:

\(P\) = Principal of the mortgage (i.e., the mortgage amount,e.g., $500,000)
\(i_{eff}\) = effective interest rate (your mortgage rate, but compounded semi-annually; e.g., 0.0418 (4.18%)),
\(p\) = number of payments per year (e.g., bi-weekly is 52),
\(N\) = total number of payments over mortgage life (e.g., \(p\) X 30, for a 30 year mortgage )
This amount, is what is required by you at each payment (weekly, bi-weekly, monthly). Every payment, your interest component of the payment amount can be calculated by multiplying the remaining principal by your effective interest (divided by payments per year). Every prepayment then goes directly to the principal. As the term goes on, your payment amount does not change, but if you do additional prepayments your principal/interest breakdown will change; more on principal and less on interest.