## Understanding mortgages/loans

### How mortgages or loans companies make money from you

In our mortgage example we are going to borrow 140,000 pounds at an interest of 6.5% annually for a term lasting 30 years. The main calculation will be how much of the principal (amount borrowed is paid back every month). For this we will use the annuity formula, where r is the monthly interest rate expressed as a decimal (r=yearly_rate/12/100), P is the principal or the amount borrowed and N the number of months in the full term.

c=(r*P)/((1-(1+r)^-N))

Using this formula we can calculate our monthly payment (c=885 pounds). The other formula we need is for the debt schedule which tells us how much of the principal gets paid off every month which we will term p.

p=((1+r)*P’)-c

Where P’ is the previous months outstanding amount (p) which at the beginning of the term will be equal to P (More information on the formulas used can be found here).

I have generated a few plots from the formulas given above to try to demonstrate what happens to your money when you pay back a mortgage or loan. For example the plot of p vs N below shows a typical repayment curve for the borrowed money