function calculateROI() {
// 1. Get Values
var price = parseFloat(document.getElementById("propPrice").value);
var closing = parseFloat(document.getElementById("closingCosts").value);
var downPercent = parseFloat(document.getElementById("downPaymentPercent").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. Validate Inputs
if (isNaN(price) || isNaN(downPercent) || isNaN(rent)) {
alert("Please fill in at least the Purchase Price, Down Payment %, and Monthly Rent to calculate.");
return;
}
// Handle defaults for empty optional fields
if (isNaN(closing)) closing = 0;
if (isNaN(rate)) rate = 0;
if (isNaN(term)) term = 30;
if (isNaN(opsExpenses)) opsExpenses = 0;
// 3. Calculate Financing
var downPaymentAmount = price * (downPercent / 100);
var loanAmount = price – downPaymentAmount;
var totalInvested = downPaymentAmount + closing;
var monthlyMortgage = 0;
if (rate > 0 && loanAmount > 0) {
var monthlyRate = (rate / 100) / 12;
var numberOfPayments = term * 12;
// PMT Formula: M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1]
monthlyMortgage = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) / (Math.pow(1 + monthlyRate, numberOfPayments) – 1);
} else if (loanAmount > 0 && rate === 0) {
monthlyMortgage = loanAmount / (term * 12);
}
// 4. Calculate Cash Flow
var totalMonthlyExpenses = monthlyMortgage + opsExpenses;
var monthlyCashFlow = rent – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
// 5. Calculate ROI
var cocReturn = 0;
if (totalInvested > 0) {
cocReturn = (annualCashFlow / totalInvested) * 100;
}
// 6. Display Results
document.getElementById("resTotalInvested").innerText = formatCurrency(totalInvested);
document.getElementById("resMortgage").innerText = formatCurrency(monthlyMortgage);
document.getElementById("resTotalExp").innerText = formatCurrency(totalMonthlyExpenses);
document.getElementById("resMonthlyCash").innerText = formatCurrency(monthlyCashFlow);
document.getElementById("resAnnualCash").innerText = formatCurrency(annualCashFlow);
var cocElement = document.getElementById("resCoC");
cocElement.innerText = cocReturn.toFixed(2) + "%";
// Color coding for negative flow
if (cocReturn < 0) {
cocElement.style.color = "#c0392b";
} else {
cocElement.style.color = "#27ae60";
}
document.getElementById("resultsArea").style.display = "block";
}
function formatCurrency(num) {
return "$" + num.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
}
Understanding the Rental Property Cash on Cash Return Calculator
Investing in real estate is a numbers game. Whether you are a seasoned investor or buying your first rental property, understanding your potential return on investment (ROI) is crucial. This Cash on Cash Return Calculator is designed specifically for rental property investors to determine the efficiency of their capital.
What is Cash on Cash Return?
Cash on Cash Return (CoC) is a metric used in real estate transactions to calculate 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 ROI metrics because it focuses solely on the actual cash you have invested, rather than the total purchase price of the property.
Formula:
Cash on Cash Return = (Annual Pre-Tax Cash Flow / Total Cash Invested) × 100%
How to Use This Calculator
To get the most accurate results from our rental property calculator, ensure you have the following data points ready:
Purchase Price: The agreed-upon price of the property.
Closing Costs & Rehab: Estimate 2-5% of the price for closing, plus any immediate repair costs needed to make the property rentable.
Down Payment %: The percentage of the purchase price you are paying upfront (typically 20-25% for investment properties).
Loan Details: Your interest rate and loan term (usually 30 years).
Monthly Expenses: This is critical. Include property taxes, insurance, HOA fees, property management fees, and an allowance for vacancies and maintenance.
Example Calculation
Let's say you purchase a property for $200,000. Here is how the numbers might look:
Total Cash Invested: You put 20% down ($40,000) and pay $5,000 in closing costs. Total invested = $45,000.
Income: The property rents for $1,800/month.
Expenses: Mortgage is ~$1,000, and other expenses are $400. Total cost = $1,400.
Result: ($4,800 / $45,000) = 10.66% Cash on Cash Return.
What is a "Good" Cash on Cash Return?
While this varies by market and investor goals, a Cash on Cash return of 8% to 12% is generally considered good for long-term buy-and-hold investments. Returns above 15% are often considered excellent but may come with higher risks or require more active management. Use this calculator to analyze multiple properties and find the deal that meets your financial goals.