Although unfinished, this project I had left idle for a while and just thought to share with the community.  Not fancy by any means, no graphs or anything, was just having fun creating a worksheet on mortgages but then ran out of free time to work on things as usual, anywyas.  I skipped the derivation for the formula after n payments at the end and just provided the formula and dove right into an example.  For interest, my applications usually have numbers after them referring to the number of revisions. 


Mortgage variations

 

I've seen different variations on the Mortgage equations for monthly payments but they are all just different forms of the same thing.

 

Here's one:

M := A*i*(1+i)^n/((1+i)^n-1)

A*i*(1+i)^n/((1+i)^n-1)

(1.1)

And the other more simplified version

P := i*A/(1-(1+i)^(-n))

i*A/(1-(1+i)^(-n))

(1.2)

or sometimes written like

expand(P)

i*A/(1-1/(1+i)^n)

(1.3)

Are they the same?  Well we can check...

is(M = P)

true

(1.4)

``

Proof that the above M and P are the same

 

We can first divide the numerator and denominator by (1+i)^n

M1 := ``(numer(M)*``(1/(1+i)^n))/``(denom(M)*``(1/(1+i)^n))

``(A*i*(1+i)^n*``(1/(1+i)^n))/``(((1+i)^n-1)*``(1/(1+i)^n))

(1.1.1)

expand(M1)

A*i*(1+i)^n/((1+i)^n-1)

(1.1.2)

simplify(%)

``(A*i*(1+i)^n*``((1+i)^(-n)))/``(1-(1+i)^(-n))

(1.1.3)

expand(%)

A*i/(1-1/(1+i)^n)

(1.1.4)

expand(%)

i*A/(1-1/(1+i)^n)

(1.1.5)

expand(%)

A*i/(1-1/(1+i)^n)

(1.1.6)

expand(M1)

A*i*(1+i)^n/((1+i)^n-1)

(1.1.7)

NULLNULL

Interest demystified

 

Another thing that usually confuses people is the interest.  The banks don't actually use the number they give you in the calculations.  The rate they give you is usually the nominal interest rate, the rate they use in the calculations is usually called the effective interest rate.

Take for example your mortgage is borrowed at 6% (that's the nominal rate the bank quoted you) however Canadian mortgages are compounded semi-annually and usually paid on a monthly basis.  So that 6% is actually.

  restart; gc() 

inew := (1+i/m)^(m*n)-1

(1+i/m)^(m*n)-1

(1.2.1)

i := 0.6e-1

0.6e-1

(1.2.2)

m := 2

2

(1.2.3)

n := 1

1

(1.2.4)

inew

0.60900000e-1

(1.2.5)

6.09% is the effective yearly interest rate.

 

Now we normally pay on a monthly basis so we need to find out what the monthly effective interest is.

n := 1/12

1/12

(1.2.6)

inew

0.4938622e-2

(1.2.7)

So 0.49% is our monthly interest rate.  

 

Usually the confusion is in taking the 6% and dividing it by twelve. 0.6e-1*(1/12) = 0.5000000000e-2 a difference of slightly less than 0.01% than the actual value.  But it's enough to make your numbers not match up and not understand what the bank is doing, then you just throw up your hands and decide to just leave it all up to them.

Examples

 

We take out a $200,000 30 year mortgage for a house at 6%.  For a fixed rate over the life of the mortgage what is our monthly payments and how long will it take to pay it off?

``

How long?  30years.  It's a 30 year mortgage - that question was just to see if you were paying attention.

``

``

restart; gc()

M := A*i*(1+i)^n/((1+i)^n-1)

A*i*(1+i)^n/((1+i)^n-1)

(1.3.1)

A := 200000

200000

(1.3.2)

i := (1+0.6e-1*(1/2))^(2*(1/12))-1

0.4938622e-2

(1.3.3)

n := 30*12

360

(1.3.4)

M

1189.646836

(1.3.5)

So if we have a monthly payment of $1189.65 we will have our $200,000 mortgage payed off in 30 years.

 

How much did we actaully spend on our house?

 

12*M*30

428272.8610

(1.3.6)

So we spent $428,272.86 on our house.  More than double the actual cost.  And 428272.86-200000 = 228272.86 was all spent on interest alone !!  No wonder so many people are in debt.

 

``

Could we have spent less if we paid it off quicker?  You bet.  Okay so let's instead decide to pay it off in 20 years instead of 30.  In that case.

 

n := 20*12

240

(1.3.7)

and solving M we have:

M

1424.376879

(1.3.8)

So our monthly payments should be $1424.38 per month and we have spent 240*M = 341850.4510 almost a full $100,000 less.  The difference 428272.86-341850.45 = 86422.41NULLThat's a couple of new cars if we can afford the monthly payments.  $1424 is a little steep, however let's suppose we could afford to pay $1500 a month.  Families with both parents working full time, $1500 is fairly easy to come up with but extremely hard for the single working parent families, both parents working low wages or part time, given the everyday expenses we all have to deal with (rising grocery prices, rising hydro prices, etc...)  

 

First we need to solve for n in our monthly payment equation.

restart; gc()

mortgage := M = A*i*(1+i)^n/((1+i)^n-1)

M = A*i*(1+i)^n/((1+i)^n-1)

(1.3.9)

numberpayments := solve(mortgage, n)

ln(-M/(-M+A*i))/ln(1+i)

(1.3.10)

M := 1500

1500

(1.3.11)

A := 200000

200000

(1.3.12)

i := (1+0.6e-1*(1/2))^(2*(1/12))-1

0.4938622e-2

(1.3.13)

numberpayments

218.0787213

(1.3.14)

Great!  So we'll get our number of payments down from 240 to 218 and pay it off instead of in 20 years we'll pay it off in 218.0787213*(1/12) = 18.17322678 years.

Now how much do we save by increasing our monthly payments?

``

240*1424.376879-218.0787213*1500 = 14732.3690  - We'll save over $14,000 just by increasing our monthly payments by $75.62 to $1500 a month.

     

 

Now what if we want to find out how much is left on our balance, let's say after 24 payments?  

Deriving the formula for remaining principle after n payments (unfinished)

   

restart; gc()

``

remainingbalance := proc (n) options operator, arrow; P*(1+i)^n-m*(sum((1+i)^(k-1), k = 1 .. n)) end proc

proc (n) options operator, arrow; P*(1+i)^n-m*(sum((1+i)^(k-1), k = 1 .. n)) end proc

(1.3.15)

P := 90000; i := (1+0.539e-1*(1/2))^(1/6)-1; m := 650

650

(1.3.16)

remainingbalance(0)

90000.0

(1.3.17)

remainingbalance(215)

251.9226

(1.3.18)

215/(12.)

17.91666667

(1.3.19)

And to see how many payments (months) are left until we pay it all off we just solve remainingbalance=0

solve(remainingbalance(x) = 0)

215.3887680

(1.3.20)

and divide by 12 for years or insert the value into the

solve(remainingbalance(12*x) = 0)

17.94906400

(1.3.21)

How about how long will it take until we have 1/2 our original principle left?

solve(remainingbalance(x) = (1/2)*P)

132.4764076

(1.3.22)

So after 132 payments we will have almost half our principle remaining.  And how much is that?

remainingbalance(132)

45213.7344

(1.3.23)

NULL

``

``


Download mortgage_3a.mw


Please Wait...