function calculateRentalROI() {
// 1. Get Inputs
var price = parseFloat(document.getElementById('roi_price').value) || 0;
var closing = parseFloat(document.getElementById('roi_closing').value) || 0;
var repair = parseFloat(document.getElementById('roi_repair').value) || 0;
var downPercent = parseFloat(document.getElementById('roi_down_percent').value) || 0;
var interestRate = parseFloat(document.getElementById('roi_interest').value) || 0;
var loanTerm = parseFloat(document.getElementById('roi_term').value) || 0;
var monthlyRent = parseFloat(document.getElementById('roi_rent').value) || 0;
var vacancyRate = parseFloat(document.getElementById('roi_vacancy').value) || 0;
var annualTaxes = parseFloat(document.getElementById('roi_taxes').value) || 0;
var annualInsurance = parseFloat(document.getElementById('roi_insurance').value) || 0;
var mgmtPercent = parseFloat(document.getElementById('roi_mgmt').value) || 0;
var monthlyHOA = parseFloat(document.getElementById('roi_hoa').value) || 0;
// 2. Calculate Investment Metrics
var downPaymentAmount = price * (downPercent / 100);
var loanAmount = price – downPaymentAmount;
var totalCashInvested = downPaymentAmount + closing + repair;
// 3. Calculate Mortgage
var monthlyPI = 0;
if (loanAmount > 0 && interestRate > 0 && loanTerm > 0) {
var r = (interestRate / 100) / 12;
var n = loanTerm * 12;
monthlyPI = loanAmount * ( (r * Math.pow(1 + r, n)) / (Math.pow(1 + r, n) – 1) );
} else if (loanAmount > 0 && interestRate === 0 && loanTerm > 0) {
monthlyPI = loanAmount / (loanTerm * 12);
}
// 4. Calculate Expenses
var vacancyCost = monthlyRent * (vacancyRate / 100);
var mgmtCost = monthlyRent * (mgmtPercent / 100);
var monthlyTax = annualTaxes / 12;
var monthlyIns = annualInsurance / 12;
var totalMonthlyExpenses = monthlyPI + vacancyCost + mgmtCost + monthlyTax + monthlyIns + monthlyHOA;
// 5. Calculate Returns
var monthlyCashFlow = monthlyRent – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
var cocReturn = 0;
if (totalCashInvested > 0) {
cocReturn = (annualCashFlow / totalCashInvested) * 100;
}
// 6. Display Results
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
});
document.getElementById('res_total_invested').innerText = formatter.format(totalCashInvested);
document.getElementById('res_mortgage').innerText = formatter.format(monthlyPI);
document.getElementById('res_expenses').innerText = formatter.format(totalMonthlyExpenses);
var mcfEl = document.getElementById('res_monthly_cf');
mcfEl.innerText = formatter.format(monthlyCashFlow);
mcfEl.className = monthlyCashFlow >= 0 ? 'roi-highlight' : 'roi-highlight roi-neg';
var acfEl = document.getElementById('res_annual_cf');
acfEl.innerText = formatter.format(annualCashFlow);
acfEl.className = annualCashFlow >= 0 ? 'roi-highlight' : 'roi-highlight roi-neg';
var cocEl = document.getElementById('res_coc');
cocEl.innerText = cocReturn.toFixed(2) + "%";
cocEl.className = cocReturn >= 0 ? 'roi-highlight' : 'roi-highlight roi-neg';
document.getElementById('roi_results_area').style.display = 'block';
}
Understanding Cash on Cash Return in Real Estate
For rental property investors, not all return on investment (ROI) metrics are created equal. While Cap Rate measures the potential of the property itself assuming an all-cash purchase, Cash on Cash Return is the gold standard for investors utilizing financing (leverage).
This metric compares the annual pre-tax cash flow generated by the property to the total amount of cash actually invested. It answers the critical question: "For every dollar I put into this deal, how many cents am I getting back this year?"
How the Formula Works
The formula used in this calculator is:
Cash on Cash Return = (Annual Pre-Tax Cash Flow / Total Cash Invested) Ă— 100%
Annual Cash Flow: This is your gross rent minus all operating expenses (taxes, insurance, HOA, management, vacancy) and debt service (mortgage payments).
Total Cash Invested: This is not the purchase price. It is the sum of your down payment, closing costs, and any immediate repair or renovation costs paid out of pocket.
Why is a Good Cash on Cash Return?
There is no single answer, as it depends on your local market, risk tolerance, and investment goals. However, general benchmarks include:
8% – 12%: Often considered a solid return for long-term buy-and-hold residential rentals in stable markets.
15%+: Considered excellent, though often associated with higher-risk neighborhoods, short-term rentals (Airbnb), or properties requiring significant "sweat equity" (BRRRR method).
Below 5%: In high-appreciation markets (like coastal cities), investors may accept lower cash returns in exchange for significant property value growth over time.
Key Factors That Impact Your ROI
Using the calculator above, you can see how sensitive your return is to small changes. A slight increase in the Interest Rate can drastically reduce cash flow. Conversely, reducing the Vacancy Rate through good tenant management, or lowering the Down Payment (increasing leverage), can significantly boost your percentage return—though the latter increases risk.
Use this tool to analyze deals before you make an offer, ensuring your rental property meets your financial goals from day one.