What is the formula for calculating the total cost of a loan with extra payments towards the principal?
The formula you require is the standard one for calculating the time to repay. With larger repayments the time to completely repay the loan is reduced.
n = -(Log[1 - (r s)/d]/Log[1 + r])
Where
n = number of periods
s = principal
d = periodic payment
r = periodic interest rate
The total cost of the loan is then n * d
.
Explanation & Calculation
The formula for a loan is derived from the sum of the cash flows discounted to present value being equal to the principal. For further info see the section here titled: Calculating the Present Value of an Ordinary Annuity
The summation can be reduced to a closed form by induction:
Rearranging for d
and n
d = r (1 + 1/(-1 + (1 + r)^n)) s
n = -(Log[1 - (r s)/d]/Log[1 + r])
With the OP's figures
s = 200000
n = 30 * 12 = 360
r = 4.446 / 100 / 12 = 0.003705
d = r (1 + 1/(-1 + (1 + r)^n)) s = 1006.96
The original monthly repayment is $1,006.96
Adding $200 each month ...
d = d + 200 = 1206.96
n = -(Log[1 - (r s)/d]/Log[1 + r]) = 257.36
With the higher repayment the loan is repaid in 257.36 months instead of 360. (Of course a bank would simply take a reduced payment in month 258, but the amounts work out the same.)
(360 * 1006.96) - (257.36 * 1206.96) = 51882.37
The saving is $51,882.37
Addendum
If the repayments increase was made part-way through the term of the loan the summation and formula would be
Where
m is the number of months that the repayment is d
d2 is a different repayment amount for the remainder of the term
Then
n = -(Log[((1 + r)^-m (-d + d2 + (1 + r)^m (d - r s)))/d2]/Log[1 + r])
For example, if for the first ten years the payments are $1,006.96 and for the remaining time the repayments are $1,206.96
m = 10 * 12 = 120
d = 1006.96
d2 = 1206.96
∴ n = 302.528
The loan is completely repaid in 302.528 months.
The saving is
(360 * 1006.96) - (120 * 1006.96 + (302.528 - 120) * 1206.96) = 21366.4
Plotting over a range of m
months: