`; output += `
To replace that income at a ${(returnRate * 100)}% return, you need $${totalInvestmentNeeded.toLocaleString(undefined, { maximumFractionDigits: 0 })} invested.
`; if (totalDoorsNeeded) { output += `
That equals about ${Math.ceil(totalDoorsNeeded)} properties with $${downPaymentPerProperty.toLocaleString(undefined, { maximumFractionDigits: 0 })} down on each.
`; } if (doorsPerYear) { output += `
To hit that goal by retirement, you’d need to buy about ${doorsPerYear.toFixed(2)} properties per year.
`; } resultsDiv.innerHTML = output; } inputs.forEach(input => input.addEventListener('input', calculate)); calculate();