Mortgage Calculator

Auto & Home Insurance Expert | Writer & Editor
Andrew Lee is insurance content writer and editor for BudgetMethod.com. Andrew holds a Bachelor's degree from Ryerson University and has extensive experience of writing content for financial websites. His expertise is especially strong in home and auto insurance.

We ensure content accuracy by following our editorial guidelines. We add our partners’ links that compensate us after the content is written. This means that our reviews and comparisons are independent of any paid products featured on our site.

Mortgage Calculator

Mortgage Calculator

Loan Parameters

30
Amortization Schedule
Principal vs Time
Total Amount Paid
function createAmortizationGraph(principal, downPayment, rate, term) { // Will be implemented with SVG } function createBalanceGraph(principal, downPayment, rate, term) { const data = []; for (let i = 0; i < term * 12; i++) { let balance = principal - downPayment; if (i % 12 === 11) { balance -= monthlyPayment; } data.push({ period: Math.floor(i / 12), remaining: balance }); } return createLineGraph(data, 'Principal vs Time'); } function createTotalGraph(principal, downPayment, rate, term) { const data = []; for (let i = 0; i < term * 12; i++) { let totalPaid = monthlyPayment * ((Math.pow(1 + rate, i + 1)) / rate); if (i % 12 === 11) { totalPaid += downPayment; } data.push({ period: Math.floor(i / 12), total: totalPaid }); } return createLineGraph(data, 'Total Amount Paid'); } function createLineGraph(data, title) { const graph = document.createElement('svg'); graph.setAttribute('width', '800px'); graph.setAttribute('height', '300px'); graph.setAttribute('title', title); let currentX = 0; let currentY = 20; for (const item of data) { const xPosition = currentX + (item.period * (graph.getAttribute('width') / term)); const yPosition = currentY - (item.remaining * (graph.getAttribute('height') / principal)); graph.setAttribute(`rect${Math.floor(xPosition)}'`, 'stroke', 'currentColor'); } return graph; }