Home Loan Calculator
Run the numbers the Dave Ramsey way: 20% down, a 15-year fixed, and a payment that stays at or under 25% of your take-home pay.
Estimates only. PMI is estimated at 0.5% of the loan per year when your down payment is under 20%. Confirm actual taxes, insurance, HOA and PMI figures with your lender.
'; if (total > 0) { var segs = [ [pi, 'b1', 'Principal and interest'], [taxMo, 'b2', 'Taxes'], [insMo, 'b3', 'Insurance'], [pmiMo, 'b4', 'PMI'], [hoaMo, 'b5', 'HOA'] ]; var bar = ''; var legend = ''; segs.forEach(function (s) { if (s[0] > 0) { bar += ''; legend += '' + s[2] + ''; } }); h += '
'; h += '
'; } h += '
'; h += '
'; var tips = []; if (price > 0) { if (downPct >= 20) { tips.push(['good', downPct.toFixed(1) + '% down: no PMI and a smaller loan. That is the Ramsey way.']); } else { tips.push(['warn', 'Your down payment is ' + downPct.toFixed(1) + '%. Ramsey recommends at least 20% down so you avoid PMI and keep the payment small.']); } if (years === 15) { tips.push(['good', 'A 15-year fixed is exactly what Ramsey recommends. The house is paid off in 15 years.']); } else { var tip = 'You chose a ' + years + '-year loan. Ramsey recommends a 15-year fixed.'; if (loan > 0) { var pi15 = payment(loan, rate, 180); var saved = totalInterest - Math.max(0, pi15 * 180 - loan); if (saved > 0) { tip += ' On 15 years, principal and interest would be ' + money(pi15, true) + ' a month and you would save about ' + money(saved, false) + ' in interest.'; } } tips.push(['warn', tip]); } if (income > 0) { var share = (total / income) * 100; if (share > 25) { tips.push(['warn', 'This payment is about ' + share.toFixed(0) + '% of your take-home pay. Ramsey says keep housing at 25% or less.']); } else { tips.push(['good', 'This payment is about ' + share.toFixed(0) + '% of your take-home pay, inside the 25% guideline.']); } } } else { tips.push(['warn', 'Enter a home price to see your estimated payment and guideline check.']); } tips.forEach(function (t) { h += '
'; }); byId('drcOut').innerHTML = h; } var defaults = {}; Array.prototype.slice.call(root.querySelectorAll('input, select')).forEach(function (el) { defaults[el.id] = el.value; el.addEventListener('input', calc); el.addEventListener('change', calc); }); byId('drcBtn').addEventListener('click', function (ev) { ev.preventDefault(); calc(); }); byId('drcReset').addEventListener('click', function (ev) { ev.preventDefault(); Object.keys(defaults).forEach(function (k) { byId(k).value = defaults[k]; }); calc(); }); calc(); })();