Calculate Cash Flow, Cap Rate, and Cash on Cash Return
Purchase & Loan Details
Income & Expenses (Monthly)
Monthly Principal & Interest:–
Total Monthly Expenses:–
Net Operating Income (NOI) / Month:–
Monthly Cash Flow:–
Cap Rate:–
Cash on Cash Return:–
function calculateROI() {
// 1. Get Inputs
var price = parseFloat(document.getElementById('purchasePrice').value);
var downPercent = parseFloat(document.getElementById('downPaymentPercent').value);
var rate = parseFloat(document.getElementById('interestRate').value);
var years = parseFloat(document.getElementById('loanTerm').value);
var closeCost = parseFloat(document.getElementById('closingCosts').value);
var rent = parseFloat(document.getElementById('monthlyRent').value);
var vacancyRate = parseFloat(document.getElementById('vacancyRate').value);
var tax = parseFloat(document.getElementById('propertyTax').value) || 0;
var ins = parseFloat(document.getElementById('insurance').value) || 0;
var maint = parseFloat(document.getElementById('maintenance').value) || 0;
// Validation
if (isNaN(price) || isNaN(rent) || isNaN(downPercent) || isNaN(rate) || isNaN(years)) {
alert("Please enter valid numbers for Price, Rent, Down Payment, Rate, and Term.");
return;
}
// 2. Calculations
// Loan Calculation
var downPaymentAmount = price * (downPercent / 100);
var loanAmount = price – downPaymentAmount;
var monthlyRate = (rate / 100) / 12;
var totalPayments = years * 12;
// Mortgage Payment Formula: M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1]
var monthlyPI = 0;
if (rate === 0) {
monthlyPI = loanAmount / totalPayments;
} else {
monthlyPI = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, totalPayments)) / (Math.pow(1 + monthlyRate, totalPayments) – 1);
}
// Income Logic
var vacancyLoss = rent * (vacancyRate / 100);
var effectiveGrossIncome = rent – vacancyLoss;
// Expenses Logic
var operatingExpenses = tax + ins + maint;
var totalMonthlyExpenses = operatingExpenses + monthlyPI;
// Metrics
var monthlyNOI = effectiveGrossIncome – operatingExpenses;
var monthlyCashFlow = effectiveGrossIncome – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
var annualNOI = monthlyNOI * 12;
// Investment Base
var totalCashInvested = downPaymentAmount + closeCost;
// Returns
var capRate = (annualNOI / price) * 100;
var cashOnCash = (annualCashFlow / totalCashInvested) * 100;
// 3. Display Results
var resultBox = document.getElementById('roiResults');
resultBox.style.display = 'block';
// Helper for currency formatting
var fmtUSD = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' });
var fmtPct = new Intl.NumberFormat('en-US', { style: 'percent', minimumFractionDigits: 2, maximumFractionDigits: 2 });
document.getElementById('displayMortgage').innerHTML = fmtUSD.format(monthlyPI);
document.getElementById('displayTotalExp').innerHTML = fmtUSD.format(totalMonthlyExpenses);
// NOI
var noiEl = document.getElementById('displayNOI');
noiEl.innerHTML = fmtUSD.format(monthlyNOI);
noiEl.className = monthlyNOI >= 0 ? "roi-result-value" : "roi-result-value roi-negative";
// Cash Flow
var cfEl = document.getElementById('displayCashFlow');
cfEl.innerHTML = fmtUSD.format(monthlyCashFlow);
cfEl.className = monthlyCashFlow >= 0 ? "roi-result-value roi-highlight" : "roi-result-value roi-negative";
// Percentages
document.getElementById('displayCapRate').innerHTML = fmtPct.format(capRate / 100);
var cocEl = document.getElementById('displayCoC');
cocEl.innerHTML = fmtPct.format(cashOnCash / 100);
cocEl.className = cashOnCash >= 0 ? "roi-result-value roi-highlight" : "roi-result-value roi-negative";
}
Understanding Your Rental Property ROI
Investing in real estate is one of the most reliable ways to build wealth, but simply buying a property and renting it out doesn't guarantee a profit. To succeed, investors must analyze the numbers. Our Rental Property ROI Calculator helps you determine the viability of a potential investment by breaking down cash flow, capitalization rate (Cap Rate), and Cash on Cash (CoC) return.
Key Metrics Explained
1. Monthly Cash Flow
Cash flow is the profit you bring in each month after all expenses are paid. It is calculated as:
A positive cash flow means the property pays for itself and generates income. A negative cash flow means you are losing money every month to hold the property.
2. Cash on Cash Return (CoC)
This metric measures the annual return on the actual cash you invested (Down Payment + Closing Costs), rather than the total loan amount. It gives you a clear picture of how hard your money is working.
Formula: (Annual Cash Flow / Total Cash Invested) × 100
Example: If you invest $50,000 cash to buy a property and it generates $4,000 in profit per year, your CoC is 8%.
3. Cap Rate (Capitalization Rate)
The Cap Rate measures the property's natural rate of return assuming you paid all cash (no mortgage). It helps compare the profitability of similar properties regardless of financing financing.
Formula: (Net Operating Income / Purchase Price) × 100
How to Improve Your ROI
If your calculation shows a low or negative return, consider these adjustments:
Increase Rent: Are you charging below market value? Small increases can significantly boost Net Operating Income.
Lower Expenses: Shop around for cheaper insurance or handle minor maintenance tasks yourself.
Adjust Financing: A lower interest rate or a larger down payment can reduce monthly mortgage costs, thereby increasing monthly cash flow.