function calculateRentalROI() {
// 1. Get Inputs by ID
var price = parseFloat(document.getElementById('roi_purchase_price').value) || 0;
var downPercent = parseFloat(document.getElementById('roi_down_percent').value) || 0;
var closingCosts = parseFloat(document.getElementById('roi_closing_costs').value) || 0;
var interestRate = parseFloat(document.getElementById('roi_interest_rate').value) || 0;
var loanTerm = parseFloat(document.getElementById('roi_loan_term').value) || 0;
var monthlyRent = parseFloat(document.getElementById('roi_monthly_rent').value) || 0;
var monthlyExpenses = parseFloat(document.getElementById('roi_monthly_expenses').value) || 0;
var vacancyRate = parseFloat(document.getElementById('roi_vacancy_rate').value) || 0;
// 2. Perform Calculations
// Loan Calculation
var downPaymentAmount = price * (downPercent / 100);
var loanAmount = price – downPaymentAmount;
var monthlyRate = (interestRate / 100) / 12;
var numberOfPayments = loanTerm * 12;
var monthlyMortgage = 0;
if (loanAmount > 0 && interestRate > 0) {
monthlyMortgage = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) / (Math.pow(1 + monthlyRate, numberOfPayments) – 1);
} else if (loanAmount > 0 && interestRate === 0) {
monthlyMortgage = loanAmount / numberOfPayments;
}
// Income and Expense Calculations
var vacancyLoss = monthlyRent * (vacancyRate / 100);
var effectiveGrossIncome = monthlyRent – vacancyLoss;
var totalMonthlyOutflow = monthlyExpenses + monthlyMortgage;
var monthlyCashFlow = effectiveGrossIncome – totalMonthlyOutflow;
var annualCashFlow = monthlyCashFlow * 12;
// ROI Metrics
var totalCashInvested = downPaymentAmount + closingCosts;
// Net Operating Income (NOI) = (Rent – Vacancy – Operating Expenses) * 12
// NOI does NOT include Mortgage payments
var monthlyNOI = effectiveGrossIncome – monthlyExpenses;
var annualNOI = monthlyNOI * 12;
var cashOnCashReturn = 0;
if (totalCashInvested > 0) {
cashOnCashReturn = (annualCashFlow / totalCashInvested) * 100;
}
var capRate = 0;
if (price > 0) {
capRate = (annualNOI / price) * 100;
}
// 3. Display Results
var cashFlowElem = document.getElementById('res_cashflow');
var cocElem = document.getElementById('res_coc');
var capElem = document.getElementById('res_cap');
var noiElem = document.getElementById('res_noi');
// Formatting currency and percentages
cashFlowElem.innerText = "$" + monthlyCashFlow.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
cocElem.innerText = cashOnCashReturn.toFixed(2) + "%";
capElem.innerText = capRate.toFixed(2) + "%";
noiElem.innerText = "$" + annualNOI.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
// Style updates for positive/negative flow
if(monthlyCashFlow >= 0) {
cashFlowElem.className = "roi-result-value roi-value-positive";
} else {
cashFlowElem.className = "roi-result-value roi-value-negative";
}
if(cashOnCashReturn >= 0) {
cocElem.className = "roi-result-value roi-value-positive";
} else {
cocElem.className = "roi-result-value roi-value-negative";
}
// Show result section
document.getElementById('roi_results').style.display = 'block';
}
Understanding Rental Property ROI
Investing in real estate is one of the most popular ways to build wealth, but simply buying a property doesn't guarantee a profit. To succeed, investors must accurately calculate their Return on Investment (ROI). This calculator helps you analyze the profitability of a rental property by looking at cash flow, Cash on Cash return, and Cap Rate.
Key Metrics Explained
When analyzing a rental deal, there are three main numbers you should focus on:
Monthly Cash Flow: This is the profit you take home each month after all expenses, including the mortgage, taxes, insurance, and repairs, have been paid. Positive cash flow is essential for a sustainable investment.
Cash on Cash Return (CoC): This percentage measures the annual return on the actual cash you invested (down payment + closing costs). Unlike general ROI, it compares your profit specifically to the cash that left your pocket, giving a better picture of your money's efficiency.
Cap Rate (Capitalization Rate): Cap Rate measures the natural rate of return of the property assuming it was bought with cash (no mortgage). It is calculated by dividing the Net Operating Income (NOI) by the purchase price. It helps compare different properties regardless of financing.
How to Use This Calculator
To get the most accurate results, ensure you include all potential costs:
Purchase Price & Loan Details: Enter the agreed price and your financing terms. The interest rate significantly impacts your monthly mortgage payment and cash flow.
Monthly Expenses: Don't just list the mortgage. Include property taxes, insurance premiums, HOA fees, and a budget for repairs. A common mistake is underestimating maintenance costs.
Vacancy Rate: Properties aren't rented 365 days a year forever. A standard vacancy rate to factor in is 5% to 8%, representing the time the unit sits empty between tenants.
What is a Good ROI for Rental Property?
While "good" is subjective, many investors aim for a Cash on Cash return of 8% to 12%. In highly appreciative markets, investors might accept a lower monthly cash flow (or lower CoC) in exchange for long-term equity growth. Conversely, in stable markets with lower appreciation, investors typically demand higher immediate cash flow.
Use this tool to run multiple scenarios—changing your rent price or down payment—to see how they affect your bottom line before you sign on the dotted line.