function calculateRentalROI() {
// Get Inputs
var price = parseFloat(document.getElementById('rpPrice').value);
var down = parseFloat(document.getElementById('rpDown').value);
var rate = parseFloat(document.getElementById('rpRate').value);
var term = parseFloat(document.getElementById('rpTerm').value);
var rent = parseFloat(document.getElementById('rpRent').value);
var vacancy = parseFloat(document.getElementById('rpVacancy').value);
var tax = parseFloat(document.getElementById('rpTax').value);
var insurance = parseFloat(document.getElementById('rpIns').value);
var hoa = parseFloat(document.getElementById('rpHoa').value);
// Validation
if (isNaN(price) || isNaN(down) || isNaN(rent)) {
alert("Please enter valid numbers for Price, Down Payment, and Rent.");
return;
}
// 1. Mortgage Calculation
var loanAmount = price – down;
var monthlyRate = (rate / 100) / 12;
var numPayments = term * 12;
var monthlyMortgage = 0;
if (rate === 0) {
monthlyMortgage = loanAmount / numPayments;
} else {
monthlyMortgage = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numPayments)) / (Math.pow(1 + monthlyRate, numPayments) – 1);
}
if (isNaN(monthlyMortgage)) monthlyMortgage = 0;
// 2. Income Calculation
var annualGrossRent = rent * 12;
var vacancyLoss = annualGrossRent * (vacancy / 100);
var effectiveGrossIncome = annualGrossRent – vacancyLoss;
// 3. Expense Calculation (Operating)
var annualHOA = hoa * 12;
var annualOperatingExpenses = tax + insurance + annualHOA;
// 4. Returns Calculation
var noi = effectiveGrossIncome – annualOperatingExpenses;
var annualDebtService = monthlyMortgage * 12;
var annualCashFlow = noi – annualDebtService;
var monthlyCashFlow = annualCashFlow / 12;
var capRate = (noi / price) * 100;
var cashOnCash = (annualCashFlow / down) * 100;
// 5. Display Results
document.getElementById('rpResult').style.display = "block";
document.getElementById('resNOI').innerText = "$" + noi.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2}) + " / yr";
document.getElementById('resMortgage').innerText = "$" + monthlyMortgage.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
var cfElem = document.getElementById('resCashFlow');
cfElem.innerText = "$" + monthlyCashFlow.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
cfElem.className = monthlyCashFlow >= 0 ? "rp-result-value rp-highlight" : "rp-result-value rp-highlight-neg";
document.getElementById('resCapRate').innerText = capRate.toFixed(2) + "%";
var cocElem = document.getElementById('resCoC');
cocElem.innerText = cashOnCash.toFixed(2) + "%";
cocElem.className = cashOnCash >= 0 ? "rp-result-value rp-highlight" : "rp-result-value rp-highlight-neg";
}
How to Analyze a Rental Property Investment
Investing in real estate is one of the most reliable ways to build wealth, but simply buying a property doesn't guarantee profit. To ensure a rental property is a sound investment, you must analyze the numbers objectively. This Rental Property ROI Calculator helps investors determine two critical metrics: Cash Flow and Return on Investment (ROI).
Key Metrics Explained
1. Cash Flow
Cash flow is the profit left over after all expenses are paid. It is calculated as:
Gross Income: Total rent collected.
Minus Vacancy: Estimated income lost due to empty units.
Minus Operating Expenses: Taxes, insurance, maintenance, and HOA fees.
Minus Debt Service: Your monthly mortgage principal and interest.
Positive Cash Flow means the property pays for itself and provides monthly income. Negative Cash Flow means you are losing money every month to hold the property.
2. Cap Rate (Capitalization Rate)
The Cap Rate measures the natural return of a property regardless of how it is financed. It is calculated by dividing the Net Operating Income (NOI) by the Purchase Price. A higher Cap Rate generally indicates a better return, though it may also come with higher risk (e.g., properties in less desirable neighborhoods often have higher Cap Rates).
3. Cash on Cash ROI
This is arguably the most important metric for investors using leverage (loans). It measures the annual return on the actual cash you invested (Down Payment + Closing Costs). Unlike the Cap Rate, this metric accounts for your mortgage payments.
Formula: Annual Cash Flow / Total Cash Invested
What is a "Good" ROI?
While targets vary by investor and market, general benchmarks include:
Cash Flow: $100 – $300 per door, per month is a common minimum target.
Cap Rate: 4% to 10% depending on the area class (A-Class areas have lower rates; C-Class have higher).
Cash on Cash Return: 8% to 12% is often considered a solid return, outperforming the historical average of the stock market.
How to Use This Calculator
Fill in the fields above with your property details. If you don't know the exact taxes or insurance, a general rule of thumb in the US is 1-1.5% of the property value for taxes and 0.5% for insurance annually. Don't forget to account for Vacancy (typically 5-8%) and Maintenance/HOA reserves to get a realistic picture of your potential returns.