If you borrowed $100,000 from a lender with an agreement that at the end of 30 years you would repay the original loan amount plus 7%, then your total repayment would be $107,000. This is not how mortgage loans work, as mortgages utilize a nominal interest rate (the interest rate per year).
The interest rate of 7.00% per year is compounded 12 times a year, resulting in a monthly rate of 0.58% (dividing 7.00% by 12).
To calculate the interest due for a given month, the monthly rate is multiplied by the current loan balance. If you borrowed $100,000 at 7%, at the end of the first month your interest due would be $583.33 ($100,000 x (0.07 / 12)).
Monthly Payment Calculation
LB(0) = Original loan balance (the $100,000.00 you borrowed)
ID(1) = Interest due at the end of the first payment period
I = Effective interest rate per payment period (0.07 / 12)
ID(1) = LB(0) * i
PP(1) = Principal part of the first monthly payment (the part that goes toward the loan balance)
PMT = Monthly payment
PP(1) = PMT - ID(1)
LB(1) = Loan balance after the first payment
LB(1) = LB(0) - PP(1)
LB(1) = LB(0) - (PMT - ID(1))
LB(1) = LB(0) - (PMT - LB(0) * i)
LB(1) = LB(0)*(1 + i) - PMT
LB(2) = Loan balance after the second payment
LB(2) = LB(1)*(1 + i) - PMT
LB(2) = (LB(0)*(1 + i) - PMT)*(1 + i) - PMT
LB(2) = LB(0)*(1 + i)^2 - PMT*((1 + i) + 1)
LB(3) = Loan balance after the third payment
LB(3) = LB(0)*(1 + i)^3 - PMT*((1 + i)^2 + (1 + i) + 1)
LB(n) = Loan balance after n payments
LB(n) = LB(0)*(1 + i)^n - PMT*((1 + i)^(n-1) + ... + (1 + i) + 1)
The sum of the finite series: 1 + a + (a^2) + (a^3) + ... + (a^n) is (1-a^(n+1))/(1-a)
Now, with a simple re-arrangement, our equation for loan balance after n payments becomes
LB(n) = LB(0)*(1 + i)^n - PMT*(1-(1 + i)^n)/(1-(1 + i))
LB(n) = LB(0)*(1 + i)^n - PMT*((1 + i)^n-1)/i
LB(0) = Loan balance after 360 payments which is $0.00
LB(0)*(1 + i)^360 = PMT*((1 + i)^360-1)/i
PMT = i * LB(0)*(1 + i)^360 / ((1 + i)^360-1)
PMT = (0.07/12) * 100000*(1 + 0.07/12)^360 / ((1 + 0.07/12)^360-1) = 665.30
The first 9 months of an amortization schedule for a $100,000, 30 year, 7%, fixed-rate mortgage will look like this: