function calculateRentalROI() {
// Get inputs
var price = parseFloat(document.getElementById('rpc_purchase_price').value) || 0;
var downPayment = parseFloat(document.getElementById('rpc_down_payment').value) || 0;
var rate = parseFloat(document.getElementById('rpc_interest_rate').value) || 0;
var term = parseFloat(document.getElementById('rpc_loan_term').value) || 30;
var rent = parseFloat(document.getElementById('rpc_monthly_rent').value) || 0;
var taxes = parseFloat(document.getElementById('rpc_annual_taxes').value) || 0;
var insurance = parseFloat(document.getElementById('rpc_annual_insurance').value) || 0;
var otherCosts = parseFloat(document.getElementById('rpc_monthly_costs').value) || 0;
// 1. Calculate Mortgage (P&I)
var loanAmount = price – downPayment;
var monthlyRate = rate / 100 / 12;
var numberOfPayments = term * 12;
var mortgagePayment = 0;
if (rate > 0 && term > 0) {
mortgagePayment = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) / (Math.pow(1 + monthlyRate, numberOfPayments) – 1);
} else if (rate === 0 && term > 0) {
mortgagePayment = loanAmount / numberOfPayments;
}
// 2. Calculate Expenses
var monthlyTaxes = taxes / 12;
var monthlyInsurance = insurance / 12;
var totalMonthlyExpenses = mortgagePayment + monthlyTaxes + monthlyInsurance + otherCosts;
var operatingExpensesOnly = monthlyTaxes + monthlyInsurance + otherCosts; // Excludes mortgage for NOI
// 3. Calculate Cash Flow
var monthlyCashFlow = rent – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
// 4. Calculate NOI (Net Operating Income) – Annual
var annualNOI = (rent * 12) – (operatingExpensesOnly * 12);
// 5. Calculate Metrics
var cashOnCash = 0;
if (downPayment > 0) {
cashOnCash = (annualCashFlow / downPayment) * 100;
}
var capRate = 0;
if (price > 0) {
capRate = (annualNOI / price) * 100;
}
// Display Results
document.getElementById('res_mortgage').innerHTML = "$" + mortgagePayment.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
document.getElementById('res_total_expenses').innerHTML = "$" + totalMonthlyExpenses.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
var cashFlowEl = document.getElementById('res_cash_flow');
cashFlowEl.innerHTML = "$" + monthlyCashFlow.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
if(monthlyCashFlow < 0) {
cashFlowEl.className = "result-value negative-result";
} else {
cashFlowEl.className = "result-value highlight-result";
}
document.getElementById('res_noi').innerHTML = "$" + annualNOI.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
var cocEl = document.getElementById('res_coc_roi');
cocEl.innerHTML = cashOnCash.toFixed(2) + "%";
if(cashOnCash < 0) {
cocEl.className = "result-value negative-result";
} else {
cocEl.className = "result-value highlight-result";
}
document.getElementById('res_cap_rate').innerHTML = capRate.toFixed(2) + "%";
// Show results section
document.getElementById('rpc_results').style.display = 'block';
}
How to Analyze a Rental Property Investment
Purchasing rental property is one of the most reliable ways to build wealth, but simply buying a house and renting it out does not guarantee a profit. To ensure a property is a sound investment, you must analyze the numbers objectively using metrics like Cash Flow and Cash-on-Cash Return.
1. Understanding Monthly Cash Flow
Cash flow is the net amount of money left in your pocket at the end of every month after all expenses are paid. It is calculated as:
Cash Flow = Total Monthly Rent – (Mortgage + Taxes + Insurance + HOA + Repairs + Vacancy)
A positive cash flow ensures the property pays for itself. If the cash flow is negative, you are essentially subsidizing the tenant's housing with your own money.
2. What is Cash-on-Cash Return?
While cash flow tells you "how much" money you make, Cash-on-Cash Return (CoC ROI) tells you how hard your money is working. It measures the annual return on the actual cash you invested (down payment + closing costs), rather than the total loan amount.
Formula: (Annual Pre-Tax Cash Flow / Total Cash Invested) x 100
Example: If you invest $50,000 cash to buy a property and it generates $5,000 in net annual cash flow, your CoC Return is 10%.
3. Cap Rate vs. ROI
The Cap Rate (Capitalization Rate) measures the property's natural rate of return assuming you paid all cash (no mortgage). It allows you to compare different properties "apples-to-apples" without financing variables. However, for most investors using leverage (mortgages), the Cash-on-Cash ROI is the more important metric because it accounts for debt service.
Is Your Deal a Good Investment?
Generally, passive investors look for a Cash-on-Cash return between 8% and 12%. However, in high-appreciation markets, investors might accept a lower cash flow return (e.g., 4-6%) in exchange for long-term equity growth. Use the calculator above to stress-test your numbers—enter a higher interest rate or vacancy rate to see if the property remains profitable.