function calculateRentalROI() {
// 1. Get Inputs
var price = parseFloat(document.getElementById('purchasePrice').value) || 0;
var down = parseFloat(document.getElementById('downPayment').value) || 0;
var closing = parseFloat(document.getElementById('closingCosts').value) || 0;
var rate = parseFloat(document.getElementById('interestRate').value) || 0;
var years = parseFloat(document.getElementById('loanTerm').value) || 0;
var rent = parseFloat(document.getElementById('monthlyRent').value) || 0;
var taxes = parseFloat(document.getElementById('annualTaxes').value) || 0;
var insurance = parseFloat(document.getElementById('annualInsurance').value) || 0;
var hoa = parseFloat(document.getElementById('monthlyHOA').value) || 0;
var vacancyMaintRate = parseFloat(document.getElementById('maintVacancy').value) || 0;
// 2. Calculate Mortgage (Principal & Interest)
var loanAmount = price – down;
var monthlyRate = rate / 100 / 12;
var totalPayments = years * 12;
var monthlyPI = 0;
if (loanAmount > 0 && rate > 0) {
monthlyPI = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, totalPayments)) / (Math.pow(1 + monthlyRate, totalPayments) – 1);
} else if (loanAmount > 0 && rate === 0) {
monthlyPI = loanAmount / totalPayments;
}
// 3. Calculate Expenses
var monthlyTaxes = taxes / 12;
var monthlyInsurance = insurance / 12;
var monthlyVacancyMaint = rent * (vacancyMaintRate / 100);
var totalMonthlyExpenses = monthlyPI + monthlyTaxes + monthlyInsurance + hoa + monthlyVacancyMaint;
var operatingExpenses = monthlyTaxes + monthlyInsurance + hoa + monthlyVacancyMaint; // Excludes mortgage for Cap Rate
// 4. Calculate Cash Flow
var monthlyCashFlow = rent – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
// 5. Calculate Investment Basis
var totalCashInvested = down + closing;
// 6. Calculate Returns
var cocReturn = 0;
if (totalCashInvested > 0) {
cocReturn = (annualCashFlow / totalCashInvested) * 100;
}
// Calculate NOI (Net Operating Income) for Cap Rate
// NOI = Annual Income – Annual Operating Expenses (Excluding Mortgage)
var annualNOI = (rent * 12) – (operatingExpenses * 12);
var capRate = 0;
if (price > 0) {
capRate = (annualNOI / price) * 100;
}
// 7. Update DOM
var formatter = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' });
var percentFormatter = new Intl.NumberFormat('en-US', { style: 'percent', minimumFractionDigits: 2, maximumFractionDigits: 2 });
document.getElementById('resTotalCash').innerText = formatter.format(totalCashInvested);
document.getElementById('resMortgage').innerText = formatter.format(monthlyPI);
document.getElementById('resExpenses').innerText = formatter.format(totalMonthlyExpenses);
var cfEl = document.getElementById('resMonthlyCashFlow');
cfEl.innerText = formatter.format(monthlyCashFlow);
cfEl.style.color = monthlyCashFlow >= 0 ? '#38a169' : '#e53e3e';
var annualCfEl = document.getElementById('resAnnualCashFlow');
annualCfEl.innerText = formatter.format(annualCashFlow);
annualCfEl.style.color = annualCashFlow >= 0 ? '#38a169' : '#e53e3e';
document.getElementById('resCoC').innerText = cocReturn.toFixed(2) + '%';
document.getElementById('resCapRate').innerText = capRate.toFixed(2) + '%';
document.getElementById('resultsArea').style.display = 'block';
}
Understanding the Rental Property ROI Calculator
Investing in real estate is one of the most reliable ways to build wealth, but simply buying a property doesn't guarantee a profit. To succeed, investors must accurately calculate their metrics before signing a contract. Our Cash on Cash Return Calculator is designed to help you analyze rental properties by breaking down income, expenses, and mortgage obligations to reveal the true profitability of a deal.
What is Cash on Cash Return?
Cash on Cash (CoC) Return is widely considered the most important metric for rental property investors. Unlike a standard Return on Investment (ROI) calculation that might account for loan paydown or appreciation, CoC focuses purely on liquid cash flow relative to the actual cash you invested.
Formula:
Cash on Cash Return = (Annual Pre-Tax Cash Flow / Total Cash Invested) x 100
For example, if you invest $50,000 to buy a rental property (down payment + closing costs) and that property generates $5,000 in positive cash flow per year after all expenses, your Cash on Cash return is 10%. This allows you to compare real estate returns directly against other investment vehicles like stocks or bonds.
Key Metrics in This Calculator
Monthly Cash Flow: This is your profit margin every month. It is calculated by subtracting all expenses (mortgage, taxes, insurance, HOA, maintenance) from your monthly rental income. Positive cash flow is essential for long-term sustainability.
Cap Rate (Capitalization Rate): This metric measures the natural rate of return on the property assuming you paid all cash. It helps compare the quality of the property itself, independent of financing terms.
Total Cash Invested: This includes your down payment, closing costs, and any immediate repairs or renovation costs required to get the property rent-ready.
How to Use the Calculator
To get the most accurate results, ensure you input realistic numbers for expenses:
Vacancy & Maintenance: Never assume 100% occupancy. A safe estimate is often setting aside 5-10% of rent for vacancies and another 5-10% for future repairs (CapEx).
Operating Expenses: Don't forget property taxes, insurance, and HOA fees if applicable. These are "hard" costs that must be paid regardless of whether the property is rented.
Financing: Interest rates significantly impact your bottom line. Use current market rates to see how they affect your monthly cash flow.
What is a "Good" ROI for Rentals?
While targets vary by investor and location, many real estate investors aim for a Cash on Cash return of 8-12%. In highly appreciative markets (where property values rise quickly), investors might accept a lower cash flow (4-6%). In markets with lower appreciation, investors often demand higher immediate cash flow (10-15%) to justify the risk.