Refinance Savings

$
%
%
Monthly Savings
$0
Break-Even Point
0 Months
Current Estimated P&I Payment: $0
New Projected P&I Payment: $0
Projected Lifetime Savings: $0
Estimated Closing Costs (2%): $0
✨ Dynamic Scenario AI Insight

Analyzing rate variance optimization parameters...

Get Your Official Pre-Approval Letter
🏡 Get Your Pre-Approval Letter
const inputs = ['loan-balance', 'remaining-term', 'current-rate', 'new-rate', 'new-term']; inputs.forEach(id => { document.getElementById(id).addEventListener('input', calculateRefinance); }); function calculateRefinance() { const loanBalance = parseFloat(document.getElementById('loan-balance').value) || 0; const remainingTermYears = parseFloat(document.getElementById('remaining-term').value) || 30; const currentRate = parseFloat(document.getElementById('current-rate').value) || 0; const newRate = parseFloat(document.getElementById('new-rate').value) || 0; const newTermMonths = parseInt(document.getElementById('new-term').value) || 360; const currentTermMonths = remainingTermYears * 12; const currentMonthlyRate = (currentRate / 100) / 12; let currentPI = 0; if (currentMonthlyRate > 0) { currentPI = (loanBalance * currentMonthlyRate * Math.pow(1 + currentMonthlyRate, currentTermMonths)) / (Math.pow(1 + currentMonthlyRate, currentTermMonths) - 1); } else { currentPI = loanBalance / currentTermMonths; } const newMonthlyRate = (newRate / 100) / 12; let newPI = 0; if (newMonthlyRate > 0) { newPI = (loanBalance * newMonthlyRate * Math.pow(1 + newMonthlyRate, newTermMonths)) / (Math.pow(1 + newMonthlyRate, newTermMonths) - 1); } else { newPI = loanBalance / newTermMonths; } const monthlySavings = Math.max(0, currentPI - newPI); const estimatedClosingCosts = loanBalance * 0.02; // True lifetime savings comparison (Total remaining payments minus total new payments & closing costs) const totalCurrentCost = currentPI * currentTermMonths; const totalNewCost = (newPI * newTermMonths) + estimatedClosingCosts; const lifetimeSavings = totalCurrentCost - totalNewCost; let breakEvenMonths = 0; if (monthlySavings > 0) { breakEvenMonths = Math.ceil(estimatedClosingCosts / monthlySavings); } let aiInsightString = `Swapping your current rate vector from ${currentRate.toFixed(3)}% down to a targeted ${newRate.toFixed(3)}% structure captures an immediate premium optimization path. `; if (monthlySavings > 0 && lifetimeSavings > 0) { aiInsightString += `This conversion clears a net drop of $${Math.round(monthlySavings).toLocaleString()}/month from your primary debt line. Anticipating standard upfront closing mechanics of $${Math.round(estimatedClosingCosts).toLocaleString()} (estimated at 2%), your operational costs hit a complete break-even point in ${breakEvenMonths} months (${(breakEvenMonths/12).toFixed(1)} years).`; } else if (monthlySavings > 0) { aiInsightString += `While you save $${Math.round(monthlySavings).toLocaleString()}/month, resetting your loan clock to ${newTermMonths / 12} years creates a NEGATIVE true lifetime return. You will pay more total interest over the life of the new loan compared to keeping your current loan.`; } else { aiInsightString += `The entered target configuration does not show an immediate reduction in monthly debt payment velocity. Review your input rates or consider adjusting your loan horizon objectives to capture alternative compression goals.`; } displayResults(monthlySavings, breakEvenMonths, currentPI, newPI, lifetimeSavings, estimatedClosingCosts, aiInsightString); } function displayResults(monthly, breakEven, currentPi, newPi, lifetime, closing, aiInsight) { document.getElementById('monthly-savings-output').innerText = formatCurrency(monthly) + "/mo"; let breakEvenText = "N/A"; if (monthly > 0) { breakEvenText = `${breakEven} Months (${(breakEven/12).toFixed(1)} Yrs)`; } document.getElementById('breakeven-output').innerText = breakEvenText; document.getElementById('breakdown-current-pi').innerText = formatCurrency(currentPi); document.getElementById('breakdown-new-pi').innerText = formatCurrency(newPi); document.getElementById('breakdown-lifetime').innerText = formatCurrency(lifetime); document.getElementById('breakdown-lifetime').style.color = lifetime > 0 ? '#34d399' : '#f87171'; document.getElementById('breakdown-closing').innerText = formatCurrency(closing); document.getElementById('ai-insight-output').innerText = aiInsight || "Processing profile metrics optimization parameters..."; } function formatCurrency(value) { return '$' + Math.round(value || 0).toLocaleString('en-US'); } calculateRefinance();