function calculateCoC() {
// Get Inputs
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 otherExpenses = parseFloat(document.getElementById("otherExpenses").value) || 0;
// Validation
if (purchasePrice <= 0 || monthlyRent 0 && interestRate > 0 && loanTerm > 0) {
var r = (interestRate / 100) / 12;
var n = loanTerm * 12;
// Formula: M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1 ]
monthlyMortgage = loanAmount * ( (r * Math.pow(1 + r, n)) / (Math.pow(1 + r, n) – 1) );
} else if (loanAmount > 0 && interestRate === 0) {
monthlyMortgage = loanAmount / (loanTerm * 12);
}
// 2. Calculate Cash Flow
var totalMonthlyExpenses = monthlyMortgage + otherExpenses;
var monthlyCashFlow = monthlyRent – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
// 3. Calculate Total Cash Invested
var totalCashInvested = downPayment + closingCosts + rehabCosts;
// 4. Calculate Cash on Cash Return
var cocReturn = 0;
if (totalCashInvested > 0) {
cocReturn = (annualCashFlow / totalCashInvested) * 100;
}
// Display Results
document.getElementById("res-total-invested").innerText = "$" + totalCashInvested.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById("res-mortgage").innerText = "$" + monthlyMortgage.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
var monthlyEl = document.getElementById("res-monthly-cf");
monthlyEl.innerText = "$" + monthlyCashFlow.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
monthlyEl.style.color = monthlyCashFlow >= 0 ? "#27ae60" : "#c0392b";
var annualEl = document.getElementById("res-annual-cf");
annualEl.innerText = "$" + annualCashFlow.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
annualEl.style.color = annualCashFlow >= 0 ? "#27ae60" : "#c0392b";
var cocEl = document.getElementById("res-coc");
cocEl.innerText = cocReturn.toFixed(2) + "%";
cocEl.style.color = cocReturn >= 0 ? "#27ae60" : "#c0392b";
// Show Results Div
document.getElementById("coc-results-area").style.display = "block";
}
What is Cash-on-Cash Return?
Cash-on-Cash (CoC) Return is a fundamental metric in real estate investing that calculates the annual return the investor made on the property in relation to the amount of mortgage paid during the same year. It is considered one of the most important figures for buy-and-hold rental investors because it provides a clear picture of the investment's performance relative to the actual cash deployed, rather than the total value of the asset.
Unlike a standard "Return on Investment" (ROI) which might include appreciation or loan paydown, Cash-on-Cash return focuses strictly on the cash flow generated by the property relative to the cash invested.
How to Calculate Cash-on-Cash Return
The formula for Cash-on-Cash Return is relatively straightforward:
Cash on Cash Return = (Annual Pre-Tax Cash Flow / Total Cash Invested) x 100%
To use this calculator effectively, you need to understand the two main components:
Annual Cash Flow: This is your Gross Rental Income minus all operating expenses (taxes, insurance, HOA fees, maintenance, vacancy reserves) and debt service (mortgage payments).
Total Cash Invested: This is the total amount of liquidity you used to acquire the property. It includes your Down Payment, Closing Costs, and any immediate Repair or Rehab costs required to make the property rentable.
What is a Good Cash-on-Cash Return?
"Good" is subjective and depends heavily on the risk profile of the property and the current economic environment. However, many real estate investors use the following benchmarks:
8% – 12%: Generally considered a solid, safe return for residential rental properties in stable markets.
15%+: Often found in lower-cost markets or properties that require significant sweat equity (rehab), carrying slightly higher risk.
Below 5%: Might be acceptable in high-appreciation markets (like San Francisco or NYC) where the primary goal is long-term capital gains rather than immediate cash flow.
Why Use a Cash-on-Cash Calculator?
Using a specialized calculator helps investors separate emotion from mathematics. By inputting accurate estimates for repairs, vacancy, and operating expenses, you can determine if a property will generate positive cash flow from day one. It is particularly useful when comparing different financing options, as a lower down payment might increase your leverage and CoC return, even if it raises your monthly mortgage payment.