function calculateRentalROI() {
// 1. Get Inputs
var price = parseFloat(document.getElementById('propPrice').value);
var down = parseFloat(document.getElementById('downPayment').value);
var closing = parseFloat(document.getElementById('closingCosts').value);
var rate = parseFloat(document.getElementById('interestRate').value);
var term = parseFloat(document.getElementById('loanTerm').value);
var rent = parseFloat(document.getElementById('monthlyRent').value);
var opsExpenses = parseFloat(document.getElementById('monthlyExpenses').value);
// 2. Validation
if (isNaN(price) || isNaN(down) || isNaN(rent) || isNaN(opsExpenses)) {
alert("Please enter valid numbers for Price, Down Payment, Rent, and Expenses.");
return;
}
// Set defaults for optional fields to avoid NaN
if (isNaN(closing)) closing = 0;
if (isNaN(rate)) rate = 0;
if (isNaN(term)) term = 30;
// 3. Calculate Mortgage
var loanAmount = price – down;
var monthlyMortgage = 0;
if (loanAmount > 0 && rate > 0) {
var monthlyRate = (rate / 100) / 12;
var numPayments = term * 12;
// Formula: M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1 ]
monthlyMortgage = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numPayments)) / (Math.pow(1 + monthlyRate, numPayments) – 1);
}
// 4. Calculate Key Metrics
var totalMonthlyExpenses = monthlyMortgage + opsExpenses;
var monthlyCashFlow = rent – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
var totalInvestment = down + closing;
// Net Operating Income (NOI) = (Rent – Operating Expenses) * 12.
// Note: NOI does NOT include mortgage payments (Debt Service).
var annualNOI = (rent – opsExpenses) * 12;
// Cap Rate = (NOI / Purchase Price) * 100
var capRate = 0;
if (price > 0) {
capRate = (annualNOI / price) * 100;
}
// Cash on Cash Return = (Annual Cash Flow / Total Cash Invested) * 100
var cocReturn = 0;
if (totalInvestment > 0) {
cocReturn = (annualCashFlow / totalInvestment) * 100;
}
// 5. Display Results
document.getElementById('resMortgage').innerText = "$" + monthlyMortgage.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
var cfElement = document.getElementById('resCashFlow');
cfElement.innerText = "$" + monthlyCashFlow.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
cfElement.style.color = monthlyCashFlow >= 0 ? "#27ae60" : "#c0392b";
document.getElementById('resNOI').innerText = "$" + annualNOI.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('resCapRate').innerText = capRate.toFixed(2) + "%";
var cocElement = document.getElementById('resCoC');
cocElement.innerText = cocReturn.toFixed(2) + "%";
cocElement.style.color = cocReturn >= 0 ? "#27ae60" : "#c0392b";
document.getElementById('resultsArea').style.display = "block";
}
Understanding Cash on Cash Return in Real Estate
When investing in rental properties, determining the profitability of an asset is crucial before signing any papers. While metrics like "Cap Rate" measure the potential return of the property regardless of financing, Cash on Cash (CoC) Return measures the return on the actual cash you invested. It provides a realistic picture of your money's velocity.
How is Cash on Cash Return Calculated?
The formula for Cash on Cash return is straightforward but requires accurate inputs regarding your income and expenses:
Cash on Cash Return = (Annual Pre-Tax Cash Flow / Total Cash Invested) × 100%
Here is a breakdown of the components:
Annual Cash Flow: This is your gross rental income minus all operating expenses (taxes, insurance, maintenance, vacancy, management fees) AND minus your annual debt service (mortgage payments).
Total Cash Invested: This includes your down payment, closing costs, and any immediate repair or renovation costs required to make the property rentable.
Why Use a Cash on Cash Return Calculator?
Unlike stocks, where you buy 100% of the asset with cash, real estate allows for leverage. You might only put down 20% of the purchase price. This calculator helps you answer:
Is my money working hard enough? If a property yields 3% CoC, you might be better off in a high-yield savings account or index fund.
What is the effect of leverage? A lower interest rate increases cash flow, thereby boosting your CoC return.
Comparison tool: You can compare two properties with different prices and financing structures to see which one yields a better return on your actual out-of-pocket cash.
What is a Good Cash on Cash Return?
There is no single rule, as "good" depends on your market and strategy:
8% to 12%: Generally considered a solid return for most buy-and-hold residential investors.
15%+: Often found in lower-cost markets or properties requiring significant "sweat equity" (renovations).
Below 5%: In high-appreciation markets (like coastal cities), investors often accept lower cash flow returns in exchange for long-term equity growth.
Difference Between Cap Rate and Cash on Cash
Our calculator provides both metrics. Cap Rate (Capitalization Rate) looks at the property's yield as if you bought it all cash. It is useful for comparing the intrinsic value of properties. Cash on Cash accounts for your mortgage. If you have a high-interest loan, your Cap Rate might look good, but your Cash on Cash return could be negative. Always analyze both!