Mortgage Comparison Calculator Formula
Understand the math behind the mortgage comparison calculator. Each variable explained with a worked example.
Formulas Used
Loan A Monthly Payment
payment_a = pmt_aLoan B Monthly Payment
payment_b = pmt_bMonthly Payment Difference
payment_diff = abs(pmt_a - pmt_b)Loan A Total Interest
total_interest_a = pmt_a * na - loan_amount_aLoan B Total Interest
total_interest_b = pmt_b * nb - loan_amount_bInterest Savings (lower total)
interest_savings = abs((pmt_a * na - loan_amount_a) - (pmt_b * nb - loan_amount_b))Variables
| Variable | Description | Default |
|---|---|---|
loan_amount_a | Loan A Amount(USD) | 350000 |
rate_a | Loan A Interest Rate(%) | 6.5 |
term_a | Loan A Term(years) | 30 |
loan_amount_b | Loan B Amount(USD) | 350000 |
rate_b | Loan B Interest Rate(%) | 6 |
term_b | Loan B Term(years) | 15 |
ra | Derived value= rate_a / 100 / 12 | calculated |
na | Derived value= term_a * 12 | calculated |
pmt_a | Derived value= ra > 0 ? loan_amount_a * ra * pow(1 + ra, na) / (pow(1 + ra, na) - 1) : loan_amount_a / na | calculated |
rb | Derived value= rate_b / 100 / 12 | calculated |
nb | Derived value= term_b * 12 | calculated |
pmt_b | Derived value= rb > 0 ? loan_amount_b * rb * pow(1 + rb, nb) / (pow(1 + rb, nb) - 1) : loan_amount_b / nb | calculated |
How It Works
Comparing Mortgage Options
Comparing mortgages requires looking beyond the monthly payment to understand total cost over the loan life.
Key Comparison Factors
Common Comparisons
Decision Framework
Choose the lower payment if cash flow is tight or you can invest the difference at a return exceeding the rate savings. Choose the lower total cost if you plan to hold the loan to maturity.
Worked Example
Comparing a $350,000 loan at 6.5% for 30 years vs 6.0% for 15 years.
- 01Loan A (30yr at 6.5%): $2,212.24/month
- 02Loan B (15yr at 6.0%): $2,953.98/month
- 03Monthly difference: $2,953.98 - $2,212.24 = $741.74
- 04Loan A total interest: $2,212.24 x 360 - $350,000 = $446,406
- 05Loan B total interest: $2,953.98 x 180 - $350,000 = $181,716
- 06Interest savings with Loan B: $446,406 - $181,716 = $264,690
Frequently Asked Questions
Is a 15-year mortgage always better than 30-year?
Not necessarily. A 15-year mortgage saves substantial interest but requires higher monthly payments. If the payment difference invested elsewhere earns more than the rate savings, the 30-year could be financially better. Also, the higher 15-year payment reduces cash flow flexibility.
Should I compare based on monthly payment or total cost?
Both matter. Monthly payment determines affordability and cash flow. Total cost measures the true price of the loan. For most homeowners, the right balance depends on their financial situation, investment options, and how long they plan to keep the loan.
How do I compare loans with different amounts?
When comparing loans of different amounts (e.g., with different down payments), look at total cost of homeownership: down payment + total interest + PMI costs. A larger down payment reduces the loan but ties up cash that could be invested.
Ready to run the numbers?
Open Mortgage Comparison Calculator