It is important to calculate mortgage interest when deciding the length of your mortgage term. The percentage of interest paid is almost 95% for the first five years of a 30year mortgage. Over time, the rate decreases, so that more of the payment is applied to the principle.
The formula used to calculate mortgage interest is a standard formula used by all financial institutions and the income tax department. Mortgage interest is also known as monthly compounding interest. There is a twopart method to identify how much you have paid in mortgage interest.
The first step is to determine the monthly payment required to pay off the amount owed in a specific number of payments. The formula is M = P[i(1 + i)n] / [(1 + i)n  1] divided by 12. M is the monthly payment, P is the amount of principle or the amount borrowed and i is the interest rate divided by 12 and n is the total number of payments.
To demonstrate how this formula works, use the following values. The purchase price of the home is $200,000 US Dollars (USD), with a seven percent interest rate on a 30year term.
i = 0.07 / 12 = 0.00583 and n = 12 x 30 = 360
Calculate (1 + i)n by substituting 0.00583 for i and 360 for n. The answer is 8.10.
M = P [(0.07)(8.10)] / [8.10 – 1] then divide by 12
M = $1,330 USD monthly payment.
To find the total mortgage interest paid for this period, subtract the total payments for the period from the principle amount owing. This amount is the interest. (M x n) – P = ($1,330 x 360) – 200,000 = 278,800. The total amount of interest paid over the length of the term is $278,800 USD.
It is important to note that this calculation uses a monthly compounding formula to calculate mortgage interest. Mortgages issued in the United States compound on a monthly basis, but other countries have different legislation surrounding this. In Canada and the United Kingdom, mortgage interest is compounded semiannually.
There are three ways to reduce the amount of mortgage interest that you pay: lower the interest rate, shorten the time frame and increase the frequency of your payments. Most mortgages are signed for a specific time frame at a particular interest rate. The interest rate available is dependent on your credit rating, property value and the government lending rate. When your mortgage is up for renewal, negotiate a lower interest rate.
Shorten the time frame for the mortgage by paying it off early. Increase your monthly payments. The difference is automatically applied to your principle or the amount borrowed. An increase of just $100 USD per month can take years off your mortgage.
Changing your mortgage payments to accelerated biweekly instead of monthly adds three additional payments to your mortgage without you even noticing. These additional payments are applied directly to your mortgage. Over time, this will reduce your principle and pay off your mortgage faster.
anon347636 Post 7 
Just as a note to the Post 1 about prepayment penalty: They are not allowed any longer. This is a guideline by fannie and freddie. 


anon93650 Post 2 
Important! You get the correct value of M, however your method to get the answer here is wrong. M = P[i(1 + i)^n] / [(1 + i)^n  1] not divided by 12 actually (Note the exponents also). 
Babalaas Post 1 
I want to add that you should be sure to carefully review your current mortgage terms if you are planning on refinancing to decrease the interest you will pay on your mortgage. Many lenders enticed buyers into adjustable rate mortgages by offering low rates and sneaking in prepayment penalty clauses. The penalty for paying off a mortgage early through refinancing can sometimes wipe out the savings from refinancing. If you are just getting into a mortgage, be sure to read and understand all of the terms before signing. Try to negotiate terms that will ensure you have the most flexibility when it comes to renegotiating terms in the future. 