function calculateROI() {
// Get Inputs
var downPayment = parseFloat(document.getElementById('downPayment').value);
var closingCosts = parseFloat(document.getElementById('closingCosts').value);
var monthlyRent = parseFloat(document.getElementById('monthlyRent').value);
var monthlyMortgage = parseFloat(document.getElementById('monthlyMortgage').value);
var monthlyExpenses = parseFloat(document.getElementById('monthlyExpenses').value);
var vacancyRate = parseFloat(document.getElementById('vacancyRate').value);
// Validation
if (isNaN(downPayment) || isNaN(closingCosts) || isNaN(monthlyRent) || isNaN(monthlyMortgage) || isNaN(monthlyExpenses)) {
alert("Please enter valid numbers in all fields.");
return;
}
// Logic
// 1. Calculate Total Cash Invested
var totalCashInvested = downPayment + closingCosts;
// 2. Calculate Effective Monthly Income (Adjusting for Vacancy)
// If vacancy is 5%, we keep 95% of rent.
var vacancyFactor = vacancyRate / 100;
var vacancyLoss = monthlyRent * vacancyFactor;
var effectiveRent = monthlyRent – vacancyLoss;
// 3. Calculate Monthly Cash Flow
var monthlyCashFlow = effectiveRent – monthlyMortgage – monthlyExpenses;
// 4. Calculate Annual Cash Flow
var annualCashFlow = monthlyCashFlow * 12;
// 5. Calculate Cash on Cash Return
// Avoid division by zero
var cocReturn = 0;
if (totalCashInvested > 0) {
cocReturn = (annualCashFlow / totalCashInvested) * 100;
}
// Display Results
var resultBox = document.getElementById('result');
resultBox.style.display = 'block';
// Format and set innerHTML
document.getElementById('cocResult').innerHTML = cocReturn.toFixed(2) + "%";
// Color coding for negative flow
if (cocReturn < 0) {
document.getElementById('cocResult').style.color = "#e74c3c";
} else {
document.getElementById('cocResult').style.color = "#27ae60";
}
// Formatting currency helper
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
});
document.getElementById('totalInvestedDisplay').innerHTML = formatter.format(totalCashInvested);
document.getElementById('annualCashFlowDisplay').innerHTML = formatter.format(annualCashFlow);
document.getElementById('monthlyCashFlowDisplay').innerHTML = formatter.format(monthlyCashFlow);
}
Understanding Cash-on-Cash Return in Real Estate
When investing in rental properties, determining the profitability of an asset is crucial before signing any contracts. While there are many metrics to evaluate real estate performance, Cash-on-Cash Return (CoC) is arguably the most important for investors focusing on cash flow rather than long-term appreciation.
This calculator helps you determine the percentage return on the actual cash you have invested, providing a clear picture of how hard your money is working for you.
What is Cash-on-Cash Return?
Cash-on-Cash Return is a pre-tax metric that measures the annual cash flow generated by a property relative to the total amount of initial capital invested. Unlike "Return on Investment" (ROI), which might include loan paydown and appreciation, CoC strictly looks at the liquid cash available at the end of the year divided by the cash used to acquire the asset.
The formula used in our calculator is:
CoC Return = (Annual Pre-Tax Cash Flow / Total Cash Invested) x 100%
Key Inputs Explained
Down Payment & Closing Costs: This represents your "skin in the game." It is the total liquid capital you must pay upfront to secure the property.
Monthly Rental Income: The gross amount of rent collected from tenants.
Vacancy Rate: No property is occupied 100% of the time. A standard conservative estimate is 5% to 8%, which accounts for turnover periods between tenants.
Operating Expenses: These are recurring costs such as property management fees, maintenance, property taxes, insurance, and HOA fees.
What is a Good Cash-on-Cash Return?
The definition of a "good" return varies by market and investor strategy. However, generally speaking:
8% to 12%: Often considered a solid return in stable markets.
15%+: Considered excellent, though often associated with higher-risk properties or markets requiring more active management.
Below 5%: May not be worth the effort compared to passive index fund investing, unless the property has significant appreciation potential.
Use this calculator to analyze potential deals quickly. If the CoC is negative, the property costs you money to hold every month, which is a risky position for most investors.