function calculateROI() {
// Get Input Values
var purchasePrice = parseFloat(document.getElementById('purchasePrice').value) || 0;
var downPayment = parseFloat(document.getElementById('downPayment').value) || 0;
var closingCosts = parseFloat(document.getElementById('closingCosts').value) || 0;
var rehabCosts = parseFloat(document.getElementById('rehabCosts').value) || 0;
var interestRate = parseFloat(document.getElementById('interestRate').value) || 0;
var loanTerm = parseFloat(document.getElementById('loanTerm').value) || 0;
var monthlyRent = parseFloat(document.getElementById('monthlyRent').value) || 0;
var otherIncome = parseFloat(document.getElementById('otherIncome').value) || 0;
var propertyTax = parseFloat(document.getElementById('propertyTax').value) || 0;
var insurance = parseFloat(document.getElementById('insurance').value) || 0;
var maintenance = parseFloat(document.getElementById('maintenance').value) || 0;
// 1. Calculate Total Cash Invested
var totalCashInvested = downPayment + closingCosts + rehabCosts;
// 2. Calculate Mortgage (Principal & Interest)
var loanAmount = purchasePrice – downPayment;
var monthlyMortgage = 0;
if (loanAmount > 0 && interestRate > 0 && loanTerm > 0) {
var monthlyRate = (interestRate / 100) / 12;
var numberOfPayments = loanTerm * 12;
monthlyMortgage = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) / (Math.pow(1 + monthlyRate, numberOfPayments) – 1);
}
// 3. Calculate Total Monthly Expenses (Mortgage + OpEx)
var totalMonthlyExpenses = monthlyMortgage + propertyTax + insurance + maintenance;
// 4. Calculate Income
var totalMonthlyIncome = monthlyRent + otherIncome;
// 5. Calculate Cash Flow
var monthlyCashFlow = totalMonthlyIncome – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
// 6. Calculate Cash on Cash ROI
var cocRoi = 0;
if (totalCashInvested > 0) {
cocRoi = (annualCashFlow / totalCashInvested) * 100;
}
// Display Results
var currencyFormatter = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' });
document.getElementById('resTotalInvested').innerText = currencyFormatter.format(totalCashInvested);
document.getElementById('resMortgage').innerText = currencyFormatter.format(monthlyMortgage);
document.getElementById('resTotalExpenses').innerText = currencyFormatter.format(totalMonthlyExpenses);
var cfElement = document.getElementById('resMonthlyCashFlow');
cfElement.innerText = currencyFormatter.format(monthlyCashFlow);
if (monthlyCashFlow >= 0) {
cfElement.className = "roi-result-value roi-highlight";
} else {
cfElement.className = "roi-result-value roi-negative";
}
var cocElement = document.getElementById('resCoC');
cocElement.innerText = cocRoi.toFixed(2) + "%";
if (cocRoi >= 0) {
cocElement.className = "roi-result-value roi-highlight";
} else {
cocElement.className = "roi-result-value roi-negative";
}
document.getElementById('roiResult').style.display = "block";
}
Understanding Rental Property ROI
Investing in real estate is one of the most reliable ways to build wealth, but not every property is a good deal. To ensure profitability, investors rely on specific metrics to evaluate performance. The Rental Property ROI Calculator above helps you determine the viability of an investment by analyzing the Cash on Cash Return and monthly Cash Flow.
What is Cash on Cash Return?
Cash on Cash Return (CoC) is arguably the most important metric for rental property investors. Unlike a standard Return on Investment (ROI) calculation that might look at the total value of the asset, CoC measures the annual return on the actual cash you invested out-of-pocket.
The formula used in this calculator is:
Cash on Cash ROI = (Annual Pre-Tax Cash Flow / Total Cash Invested) × 100
Total Cash Invested includes your down payment, closing costs, and any immediate repair or rehabilitation costs.
How to Interpret Your Results
Cash Flow: This is your "take-home" profit each month after the mortgage, taxes, insurance, and maintenance are paid. Positive cash flow is essential for a sustainable investment.
8-12% ROI: Generally considered a solid return for rental properties, outperforming the historical average of the stock market.
15%+ ROI: Excellent return, often found in high-yield markets or properties purchased below market value (fixer-uppers).
Negative ROI: Indicates the property costs more to hold than it generates in income. This should be avoided unless you are banking purely on massive property appreciation.
Real-World Example
Imagine you are purchasing a single-family home to rent out. Here is how the numbers might look for a profitable deal:
Item
Amount
Purchase Price
$200,000
Total Cash Invested (Down Payment + Closing)
$50,000
Total Monthly Income (Rent)
$2,000
Total Monthly Expenses (Mortgage + OpEx)
$1,600
Monthly Cash Flow
$400
Cash on Cash ROI
9.6%
In this scenario, earning $400 a month passively results in a 9.6% return on your $50,000 cash investment, representing a healthy asset.