Refinance Calculator Formula

Understand the math behind the refinance calculator. Each variable explained with a worked example.

Formulas Used

Current Monthly Payment

current_payment = current_monthly_rate > 0 ? current_balance * current_monthly_rate * pow(1 + current_monthly_rate, current_num_payments) / (pow(1 + current_monthly_rate, current_num_payments) - 1) : current_balance / current_num_payments

New Monthly Payment

new_payment = new_monthly_rate > 0 ? current_balance * new_monthly_rate * pow(1 + new_monthly_rate, new_num_payments) / (pow(1 + new_monthly_rate, new_num_payments) - 1) : current_balance / new_num_payments

Monthly Savings

monthly_savings = current_payment - new_payment

Current Total Cost

current_total_cost = current_payment * current_num_payments

New Total Cost

new_total_cost = new_payment * new_num_payments

Variables

VariableDescriptionDefault
current_balanceCurrent Loan Balance(USD)250000
current_rateCurrent Interest Rate(%)7
current_remaining_yearsYears Remaining on Current Loan(years)25
new_rateNew Interest Rate(%)5.5
new_term_yearsNew Loan Term(years)30
current_monthly_rateDerived value= current_rate / 12 / 100calculated
current_num_paymentsDerived value= current_remaining_years * 12calculated
new_monthly_rateDerived value= new_rate / 12 / 100calculated
new_num_paymentsDerived value= new_term_years * 12calculated

How It Works

How Refinance Savings Work

Refinancing replaces your existing mortgage with a new one, ideally at a lower interest rate. Savings come from the difference in monthly payments.

Key Factors

  • Lower rate = lower monthly payment
  • New term length affects total interest paid
  • Closing costs must be factored into break-even analysis
  • Compare the total cost of remaining on your current loan vs the total cost of the new loan.

    Worked Example

    You owe $250,000 at 7% with 25 years remaining. You can refinance at 5.5% for 30 years.

    current_balance = 250000current_rate = 7current_remaining_years = 25new_rate = 5.5new_term_years = 30
    1. 01Current monthly payment: $250,000 at 7% for 25 years = $1,767.63
    2. 02New monthly payment: $250,000 at 5.5% for 30 years = $1,419.47
    3. 03Monthly savings: $1,767.63 - $1,419.47 = $348.16
    4. 04Current total remaining cost: $1,767.63 * 300 = $530,289.00
    5. 05New total cost: $1,419.47 * 360 = $511,009.20

    Ready to run the numbers?

    Open Refinance Calculator