function calculateRentalROI() {
// Get Input Values
var price = parseFloat(document.getElementById('purchasePrice').value);
var down = parseFloat(document.getElementById('downPayment').value);
var rate = parseFloat(document.getElementById('interestRate').value);
var term = parseFloat(document.getElementById('loanTerm').value);
var closing = parseFloat(document.getElementById('closingCosts').value);
var rent = parseFloat(document.getElementById('monthlyRent').value);
var vacancy = parseFloat(document.getElementById('vacancyRate').value);
var tax = parseFloat(document.getElementById('annualTax').value);
var insurance = parseFloat(document.getElementById('annualInsurance').value);
var hoa = parseFloat(document.getElementById('monthlyHOA').value);
var repairs = parseFloat(document.getElementById('monthlyRepairs').value);
// Validation
if (isNaN(price) || isNaN(down) || isNaN(rent)) {
alert("Please enter valid numbers for Price, Down Payment, and Rent.");
return;
}
// 1. Calculate Mortgage Payment
var loanAmount = price – down;
var monthlyRate = (rate / 100) / 12;
var numPayments = term * 12;
var mortgagePayment = 0;
if (rate > 0) {
mortgagePayment = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numPayments)) / (Math.pow(1 + monthlyRate, numPayments) – 1);
} else {
mortgagePayment = loanAmount / numPayments;
}
// 2. Calculate Effective Gross Income
var vacancyLoss = rent * (vacancy / 100);
var effectiveRent = rent – vacancyLoss;
// 3. Calculate Monthly Expenses (excluding mortgage for NOI)
var monthlyTax = tax / 12;
var monthlyIns = insurance / 12;
var totalOperatingExpenses = monthlyTax + monthlyIns + hoa + repairs;
// 4. Calculate Net Operating Income (NOI) – Annual
var monthlyNOI = effectiveRent – totalOperatingExpenses;
var annualNOI = monthlyNOI * 12;
// 5. Calculate Cash Flow
var monthlyCashFlow = monthlyNOI – mortgagePayment;
var annualCashFlow = monthlyCashFlow * 12;
// 6. Calculate Returns
var totalInvestment = down + closing;
var capRate = (annualNOI / price) * 100;
var cashOnCash = (annualCashFlow / totalInvestment) * 100;
// Display Results
document.getElementById('results').style.display = 'block';
document.getElementById('resGrossRent').textContent = "$" + effectiveRent.toFixed(2);
document.getElementById('resMortgage').textContent = "$" + mortgagePayment.toFixed(2);
document.getElementById('resExpenses').textContent = "$" + (totalOperatingExpenses + mortgagePayment).toFixed(2);
var cfElement = document.getElementById('resCashFlow');
cfElement.textContent = "$" + monthlyCashFlow.toFixed(2);
cfElement.className = monthlyCashFlow >= 0 ? 'result-value positive' : 'result-value negative';
document.getElementById('resNOI').textContent = "$" + annualNOI.toFixed(2);
document.getElementById('resCapRate').textContent = capRate.toFixed(2) + "%";
var cocElement = document.getElementById('resCoC');
cocElement.textContent = cashOnCash.toFixed(2) + "%";
cocElement.className = cashOnCash >= 0 ? 'result-value positive' : 'result-value negative';
}
Understanding Your Rental Property Investment
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, you must understand the numbers behind the deal. This Rental Property Cash Flow Calculator is designed to help investors analyze the profitability of a potential real estate purchase by breaking down income, expenses, and return on investment (ROI).
Key Metrics Explained
1. Net Operating Income (NOI)
NOI is a fundamental figure in real estate analysis. It represents the total annual income generated by the property minus all operating expenses (taxes, insurance, HOA, repairs), but before mortgage payments are deducted. It measures the raw profitability of the asset itself, regardless of how it is financed.
2. Cap Rate (Capitalization Rate)
Calculated as NOI / Purchase Price, the Cap Rate helps you compare the return of different properties as if you paid all cash. A higher Cap Rate generally indicates a better annual return, though it may come with higher risks (e.g., properties in less desirable neighborhoods often have higher cap rates).
3. Cash on Cash Return
This is arguably the most important metric for investors using leverage (mortgages). It is calculated as Annual Cash Flow / Total Cash Invested. It tells you exactly how hard your actual invested money (down payment + closing costs) is working for you. A Cash on Cash return of 8-12% is often considered a solid target for rental properties.
How to Maximize Cash Flow
If your calculation shows negative or low cash flow, consider these adjustments:
Increase Rent: Are you charging market rates? Small increases can significantly impact the bottom line.
Reduce Vacancy: High vacancy rates kill returns. Quality tenant screening and property maintenance keep tenants longer.
Lower Expenses: Shop around for cheaper insurance or appeal your property tax assessment.
Larger Down Payment: Putting more money down reduces your monthly mortgage payment, instantly increasing monthly cash flow.
Use this calculator to test different scenarios before making an offer. Remember, a "good deal" is one that meets your specific financial goals and risk tolerance.