function calculateRentalROI() {
// 1. Get Inputs
var purchasePrice = parseFloat(document.getElementById("purchasePrice").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 closingCosts = parseFloat(document.getElementById("closingCosts").value) || 0;
var monthlyRent = parseFloat(document.getElementById("monthlyRent").value) || 0;
var vacancyRate = parseFloat(document.getElementById("vacancyRate").value) || 0;
var propertyTax = parseFloat(document.getElementById("propertyTax").value) || 0;
var homeInsurance = parseFloat(document.getElementById("homeInsurance").value) || 0;
var hoaFees = parseFloat(document.getElementById("hoaFees").value) || 0;
var maintenanceRate = parseFloat(document.getElementById("maintenanceRate").value) || 0;
var managementFee = parseFloat(document.getElementById("managementFee").value) || 0;
// 2. Calculations
// Loan Amount
var loanAmount = purchasePrice – downPayment;
// Mortgage Payment (P&I)
var monthlyMortgage = 0;
if (loanAmount > 0 && interestRate > 0 && loanTerm > 0) {
var monthlyRate = (interestRate / 100) / 12;
var numPayments = loanTerm * 12;
monthlyMortgage = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numPayments)) / (Math.pow(1 + monthlyRate, numPayments) – 1);
} else if (loanAmount > 0 && interestRate === 0) {
monthlyMortgage = loanAmount / (loanTerm * 12);
}
// Variable Monthly Expenses
var vacancyCost = monthlyRent * (vacancyRate / 100);
var maintenanceCost = monthlyRent * (maintenanceRate / 100);
var managementCost = monthlyRent * (managementFee / 100);
// Fixed Monthly Expenses
var monthlyTax = propertyTax / 12;
var monthlyInsurance = homeInsurance / 12;
// Total Operating Expenses (Excluding Mortgage)
var totalOperatingExpensesMonthly = monthlyTax + monthlyInsurance + hoaFees + vacancyCost + maintenanceCost + managementCost;
// Total Monthly Expenses (Including Mortgage)
var totalExpensesMonthly = totalOperatingExpensesMonthly + monthlyMortgage;
// Cash Flow
var monthlyCashFlow = monthlyRent – totalExpensesMonthly;
var annualCashFlow = monthlyCashFlow * 12;
// Net Operating Income (NOI) = (Rent – Vacancy) – Operating Expenses (No Mortgage)
// Effective Gross Income
var effectiveGrossIncome = (monthlyRent * 12) – (vacancyCost * 12);
var annualOperatingExpenses = (monthlyTax * 12) + (monthlyInsurance * 12) + (hoaFees * 12) + (maintenanceCost * 12) + (managementCost * 12);
var annualNOI = effectiveGrossIncome – annualOperatingExpenses;
// Cap Rate = Annual NOI / Purchase Price
var capRate = 0;
if (purchasePrice > 0) {
capRate = (annualNOI / purchasePrice) * 100;
}
// Cash on Cash Return = Annual Cash Flow / Total Cash Invested
var totalCashInvested = downPayment + closingCosts;
var cashOnCash = 0;
if (totalCashInvested > 0) {
cashOnCash = (annualCashFlow / totalCashInvested) * 100;
}
// 3. Update DOM
document.getElementById("resMortgage").innerText = "$" + monthlyMortgage.toFixed(2);
document.getElementById("resExpenses").innerText = "$" + totalExpensesMonthly.toFixed(2);
document.getElementById("resNOI").innerText = "$" + annualNOI.toFixed(2);
document.getElementById("resCapRate").innerText = capRate.toFixed(2) + "%";
document.getElementById("resCoC").innerText = cashOnCash.toFixed(2) + "%";
var cashFlowEl = document.getElementById("resCashFlow");
cashFlowEl.innerText = "$" + monthlyCashFlow.toFixed(2);
if(monthlyCashFlow >= 0) {
cashFlowEl.className = "result-value positive-cf";
} else {
cashFlowEl.className = "result-value negative-cf";
}
document.getElementById("resultsArea").style.display = "block";
}
Understanding Rental Property Cash Flow
Investing in real estate is a powerful way to build wealth, but analyzing a potential deal correctly is crucial for success. This Rental Property Cash Flow Calculator helps investors evaluate the profitability of a residential rental property by calculating key metrics like monthly cash flow, Capitalization Rate (Cap Rate), and Cash on Cash Return.
Key Metrics Explained
1. Monthly Cash Flow
Cash flow is the net amount of money moving in or out of your investment each month. It is calculated by subtracting all monthly expenses (including the mortgage) from your monthly rental income. Positive cash flow means the property pays for itself and generates profit, while negative cash flow means you must contribute money every month to keep the property running.
2. Net Operating Income (NOI)
NOI is a calculation used to analyze the profitability of income-generating real estate investments. NOI equals all revenue from the property, minus all necessary operating expenses. NOI excludes the mortgage payments, making it a pure measure of the property's efficiency regardless of financing.
3. Cap Rate (Capitalization Rate)
The Cap Rate is the rate of return on a real estate investment property based on the income that the property is expected to generate. It is calculated by dividing the Net Operating Income (NOI) by the current market value (or purchase price) of the property. A higher cap rate generally implies a better return (and potentially higher risk), while a lower cap rate implies a lower return (and potentially lower risk).
Formula: Cap Rate = Net Operating Income / Purchase Price
4. Cash on Cash Return (CoC ROI)
This metric measures 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 metrics because it tells you how hard your actual cash investment is working for you.
When using this calculator, it is vital to be realistic about expenses. Many new investors make the mistake of ignoring vacancy and maintenance.
Vacancy Rate: Always assume the property will sit empty for a portion of the year. 5% to 8% is a standard industry average (roughly 2-4 weeks per year).
Maintenance: Properties degrade over time. Setting aside 5% to 10% of the rent for repairs ensures you have funds available when the water heater breaks or the roof needs patching.
Property Management: Even if you plan to self-manage, it is wise to calculate the deal with a management fee (usually 8-10%) to see if the property would still be profitable if you decided to hire a manager later.
Use this tool to run scenarios on different properties to determine which investment aligns best with your financial goals.