Analyze cash flow, cap rate, and cash-on-cash return for real estate investments.
Purchase Details
Financing
Income & Expenses
(Repairs, CapEx, HOA, Management)
Investment Analysis
Monthly Principal & Interest:–
Total Monthly Expenses:–
Monthly Cash Flow:–
Net Operating Income (Annual):–
Cap Rate:–
Cash on Cash ROI:–
function calculateRentalROI() {
// 1. Get Inputs
var price = parseFloat(document.getElementById('purchasePrice').value) || 0;
var closingCosts = parseFloat(document.getElementById('closingCosts').value) || 0;
var downPayment = parseFloat(document.getElementById('downPayment').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 monthlyOtherExpenses = parseFloat(document.getElementById('monthlyExpenses').value) || 0;
var annualTax = parseFloat(document.getElementById('annualTax').value) || 0;
var annualInsurance = parseFloat(document.getElementById('annualInsurance').value) || 0;
// 2. Calculate Mortgage (P&I)
var loanAmount = price – downPayment;
var monthlyRate = (interestRate / 100) / 12;
var numberOfPayments = loanTerm * 12;
var monthlyMortgage = 0;
if (interestRate > 0) {
monthlyMortgage = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) / (Math.pow(1 + monthlyRate, numberOfPayments) – 1);
} else {
monthlyMortgage = loanAmount / numberOfPayments;
}
// 3. Calculate Expenses
var monthlyTax = annualTax / 12;
var monthlyInsurance = annualInsurance / 12;
var totalMonthlyExpenses = monthlyMortgage + monthlyOtherExpenses + monthlyTax + monthlyInsurance;
var totalAnnualExpensesWithoutDebt = (monthlyOtherExpenses * 12) + annualTax + annualInsurance;
// 4. Calculate Net Operating Income (NOI)
// NOI = Annual Income – Annual Operating Expenses (Excluding Debt Service)
var annualIncome = monthlyRent * 12;
var annualNOI = annualIncome – totalAnnualExpensesWithoutDebt;
// 5. Calculate Cash Flow
var monthlyCashFlow = monthlyRent – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
// 6. Calculate Metrics
var totalCashInvested = downPayment + closingCosts;
var capRate = 0;
if (price > 0) {
capRate = (annualNOI / price) * 100;
}
var cashOnCashROI = 0;
if (totalCashInvested > 0) {
cashOnCashROI = (annualCashFlow / totalCashInvested) * 100;
}
// 7. Format Functions
function formatCurrency(num) {
return '$' + num.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
}
function formatPercent(num) {
return num.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2}) + '%';
}
// 8. Update DOM
document.getElementById('displayMortgage').innerText = formatCurrency(monthlyMortgage);
document.getElementById('displayTotalExpenses').innerText = formatCurrency(totalMonthlyExpenses);
var cashFlowEl = document.getElementById('displayCashFlow');
cashFlowEl.innerText = formatCurrency(monthlyCashFlow);
if(monthlyCashFlow >= 0) {
cashFlowEl.className = "result-value result-highlight";
} else {
cashFlowEl.className = "result-value result-highlight negative";
}
document.getElementById('displayNOI').innerText = formatCurrency(annualNOI);
document.getElementById('displayCapRate').innerText = formatPercent(capRate);
var roiEl = document.getElementById('displayROI');
roiEl.innerText = formatPercent(cashOnCashROI);
if(cashOnCashROI >= 0) {
roiEl.style.color = "#38a169";
} else {
roiEl.style.color = "#e53e3e";
}
document.getElementById('resultsArea').classList.add('active');
}
Understanding Real Estate Investment Metrics
Investing in rental properties is a proven strategy for building long-term wealth, but success relies on accurate mathematics. Using a Rental Property ROI Calculator helps investors distinguish between a good deal and a money pit. The three most critical metrics to understand are Cash Flow, Cap Rate, and Cash-on-Cash Return.
1. Cash on Cash Return (CoC ROI)
This is arguably the most important metric for beginner investors. It measures the annual return on the actual cash you invested, rather than the total purchase price. It answers the question: "How hard is my money working for me?"
Formula: (Annual Pre-Tax Cash Flow / Total Cash Invested) x 100
Good Target: Many investors aim for 8-12% or higher, depending on the market and risk level.
2. Capitalization Rate (Cap Rate)
The Cap Rate measures the property's natural rate of return assuming you paid all cash. It allows you to compare the profitability of one property against another, regardless of how they are financed.
Formula: (Net Operating Income / Purchase Price) x 100
Usage: A higher cap rate generally implies higher returns but often comes with higher risk or a less desirable location. A lower cap rate typically indicates a safer, stabilized asset.
3. Net Operating Income (NOI)
NOI is the total income the property generates minus all necessary operating expenses. Crucially, NOI does not include mortgage payments (debt service). Lenders look at NOI to determine if the property generates enough income to cover the loan.
How to Use This Calculator
To get the most accurate results, ensure you are accounting for all expenses. "Other Monthly Expenses" should include:
Vacancy Rate: Estimate 5-8% of rent to cover months when the unit is empty.
Maintenance/Repairs: Set aside 5-10% of rent for ongoing fixes.
CapEx (Capital Expenditures): Budget for big-ticket items like roof or HVAC replacement.
Property Management: If you hire a pro, this is usually 8-10% of the monthly rent.
By inputting conservative estimates for these costs, you can protect yourself from negative cash flow surprises.