Mortgage Calculator Formula
How Mortgage Payments Are Calculated
M = P × [ r(1 + r)n ] / [ (1 + r)n - 1 ]
M
Monthly PaymentP
Principal (Loan Amount)r
Monthly Rate (Annual Rate ÷ 12)n
Number of Payments (Years × 12)Interactive Example
Step-by-Step Calculation
Step 1: Find 'r' (Monthly Rate as decimal)
0.065 / 12 = 0.005416...
0.065 / 12 = 0.005416...
Step 2: Find 'n' (Total Payments)
30 × 12 = 360
30 × 12 = 360
Step 3: Calculate (1 + r)n
(1.005416)360 = 7.002...
(1.005416)360 = 7.002...
Step 4: Plug into formula M = P × [ r(1+r)n ] / [ (1+r)n - 1 ]
M = 300000 × [ 0.005416(7.002) ] / [ 7.002 - 1 ]
M = 300000 × [ 0.005416(7.002) ] / [ 7.002 - 1 ]
Final Monthly Payment (M):
$1,896.20
$1,896.20
Explanation of Variables
This is the starting balance of your loan. It is the home price minus any down payment you make.
When a bank quotes you a 6% interest rate, that is an annual rate. However, mortgages compound monthly. Therefore, the formula requires the monthly interest rate expressed as a decimal. You divide the annual rate by 100 (to get a decimal), then divide by 12.
This is the total number of monthly payments over the life of the loan. For a standard 30-year fixed-rate mortgage, this is 30 × 12 = 360 payments.
Why is the formula so complex?
The formula calculates an amortized loan. In an amortized loan, your monthly payment stays exactly the same every month for 30 years, but the composition of that payment changes.
In the first month, your principal is highest, so the interest charged that month is highest. Because the total payment is fixed, very little of it goes toward principal. As years go by, the principal shrinks, the monthly interest charge shrinks, and a larger portion of your fixed payment goes toward principal.
The mathematical expression [ r(1+r)^n ] / [ (1+r)^n - 1 ] is the amortization factor that perfectly balances this curve so the balance reaches exactly $0.00 on the final payment.