Calculate Cash Flow, Cap Rate, and Cash on Cash Return for your real estate investment.
(Taxes, Insurance, HOA, Maintenance)
Investment Analysis
Net Operating Income (NOI) / Year:$0.00
Annual Mortgage Payments:$0.00
Annual Cash Flow:$0.00
Monthly Cash Flow:$0.00
Cap Rate:0.00%
Cash on Cash Return:0.00%
function calculateROI() {
// 1. Get Values
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 interestRate = parseFloat(document.getElementById('interestRate').value) || 0;
var loanTerm = parseFloat(document.getElementById('loanTerm').value) || 0;
var monthlyRent = parseFloat(document.getElementById('monthlyRent').value) || 0;
var monthlyExpenses = parseFloat(document.getElementById('monthlyExpenses').value) || 0;
var vacancyRate = parseFloat(document.getElementById('vacancyRate').value) || 0;
// 2. Validate essential inputs
if (purchasePrice <= 0 || monthlyRent 0 && loanTerm > 0 && loanAmount > 0) {
// PMT Formula: P * (r(1+r)^n) / ((1+r)^n – 1)
monthlyMortgage = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) / (Math.pow(1 + monthlyRate, numberOfPayments) – 1);
}
// 4. Logic: Income & Expenses
var grossAnnualRent = monthlyRent * 12;
var vacancyLoss = grossAnnualRent * (vacancyRate / 100);
var effectiveGrossIncome = grossAnnualRent – vacancyLoss;
var annualOperatingExpenses = monthlyExpenses * 12;
var netOperatingIncome = effectiveGrossIncome – annualOperatingExpenses; // NOI
var annualDebtService = monthlyMortgage * 12;
var annualCashFlow = netOperatingIncome – annualDebtService;
var monthlyCashFlow = annualCashFlow / 12;
// 5. Logic: Returns
var totalCashInvested = downPayment + closingCosts;
var capRate = 0;
if (purchasePrice > 0) {
capRate = (netOperatingIncome / purchasePrice) * 100;
}
var cashOnCash = 0;
if (totalCashInvested > 0) {
cashOnCash = (annualCashFlow / totalCashInvested) * 100;
} else if (annualCashFlow > 0) {
// Infinite return case handled by UI text? Or just cap it.
cashOnCash = 0; // Avoid infinity display issues
}
// 6. Formatting Money
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2
});
// 7. Update DOM
document.getElementById('resNOI').innerHTML = formatter.format(netOperatingIncome);
document.getElementById('resDebt').innerHTML = formatter.format(annualDebtService);
// Handle coloring for Cash Flow
var cfEl = document.getElementById('resCashFlow');
cfEl.innerHTML = formatter.format(annualCashFlow);
cfEl.className = annualCashFlow >= 0 ? "roi-result-value roi-highlight" : "roi-result-value roi-highlight-neg";
var mcfEl = document.getElementById('resMonthlyCashFlow');
mcfEl.innerHTML = formatter.format(monthlyCashFlow);
mcfEl.className = monthlyCashFlow >= 0 ? "roi-result-value roi-highlight" : "roi-result-value roi-highlight-neg";
document.getElementById('resCapRate').innerHTML = capRate.toFixed(2) + "%";
var cocEl = document.getElementById('resCoC');
cocEl.innerHTML = cashOnCash.toFixed(2) + "%";
cocEl.className = cashOnCash >= 0 ? "roi-result-value roi-highlight" : "roi-result-value roi-highlight-neg";
// Show Results
document.getElementById('resultsArea').style.display = 'block';
}
Understanding Rental Property ROI
Calculating the Return on Investment (ROI) for a rental property is crucial for making informed real estate decisions. Unlike simple stock investments, real estate profitability depends on multiple variables including mortgage terms, operating expenses, and vacancy rates. This calculator breaks down the two most important metrics for investors: Cap Rate and Cash on Cash Return.
Key Metrics Explained
Net Operating Income (NOI): This is your total income (rent) minus vacancy losses and operating expenses (taxes, insurance, maintenance). It excludes mortgage payments. NOI is essential for calculating the Cap Rate.
Cap Rate (Capitalization Rate): Calculated as (NOI / Purchase Price) × 100. This metric helps you compare the profitability of a property irrespective of how it is financed. It represents the raw return of the asset if bought with all cash.
Cash Flow: The money remaining after all expenses and mortgage payments are made. Positive cash flow ensures the property pays for itself and generates income.
Cash on Cash Return: Calculated as (Annual Cash Flow / Total Cash Invested) × 100. This is often the most important metric for leveraged investors, as it measures the return on the actual cash you put into the deal (down payment + closing costs).
How to Use This Calculator
Enter Purchase Details: Input the purchase price, your down payment amount, and estimated closing costs.
Configure the Loan: If you are financing the property, enter your interest rate and loan term (usually 30 years). If buying cash, enter 0 for the interest rate or term.
Estimate Income & Expenses: Enter the expected monthly rent. Be realistic about your monthly expenses; don't forget property taxes, insurance, HOA fees, and maintenance reserves.
Set Vacancy Rate: A 5-8% vacancy rate is standard in many markets to account for turnover periods where the property sits empty.
What is a Good ROI?
A "good" ROI varies by strategy and location. Generally, a Cash on Cash return of 8-12% is considered solid for long-term buy-and-hold investors. However, in high-appreciation markets, investors might accept lower cash flow yields (4-6%) in exchange for future equity growth. Always compare your results against safe alternatives like government bonds or index funds to ensure the risk of real estate management is justified.