function calculateRentalROI() {
// Get inputs
var price = parseFloat(document.getElementById('rpPurchasePrice').value) || 0;
var downPercent = parseFloat(document.getElementById('rpDownPayment').value) || 0;
var closingCosts = parseFloat(document.getElementById('rpClosingCosts').value) || 0;
var rehabCosts = parseFloat(document.getElementById('rpRehabCosts').value) || 0;
var interestRate = parseFloat(document.getElementById('rpInterestRate').value) || 0;
var loanTerm = parseFloat(document.getElementById('rpLoanTerm').value) || 30;
var monthlyRent = parseFloat(document.getElementById('rpMonthlyRent').value) || 0;
var annualTaxes = parseFloat(document.getElementById('rpAnnualTaxes').value) || 0;
var annualInsurance = parseFloat(document.getElementById('rpAnnualInsurance').value) || 0;
var monthlyHOA = parseFloat(document.getElementById('rpMonthlyHOA').value) || 0;
var vacancyMaintRate = parseFloat(document.getElementById('rpVacancyRate').value) || 0;
// Derived Variables
var downPayment = price * (downPercent / 100);
var loanAmount = price – downPayment;
var totalCashInvested = downPayment + closingCosts + rehabCosts;
// Mortgage Payment Calculation (Principal + Interest)
var monthlyRate = (interestRate / 100) / 12;
var numberOfPayments = loanTerm * 12;
var monthlyPI = 0;
if (interestRate > 0) {
monthlyPI = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) / (Math.pow(1 + monthlyRate, numberOfPayments) – 1);
} else {
monthlyPI = loanAmount / numberOfPayments;
}
// Monthly Expenses
var monthlyTaxes = annualTaxes / 12;
var monthlyInsurance = annualInsurance / 12;
var monthlyVacancyMaint = monthlyRent * (vacancyMaintRate / 100);
var totalMonthlyExpenses = monthlyPI + monthlyTaxes + monthlyInsurance + monthlyHOA + monthlyVacancyMaint;
var operatingExpenses = monthlyTaxes + monthlyInsurance + monthlyHOA + monthlyVacancyMaint; // Excludes Mortgage
// Cash Flow
var monthlyCashFlow = monthlyRent – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
// Net Operating Income (NOI) = Income – Operating Expenses (Excluding Mortgage)
var annualNOI = (monthlyRent * 12) – (operatingExpenses * 12);
// ROI Calculations
var cashOnCashROI = 0;
if (totalCashInvested > 0) {
cashOnCashROI = (annualCashFlow / totalCashInvested) * 100;
}
var capRate = 0;
if (price > 0) {
capRate = (annualNOI / price) * 100;
}
// Formatting function
var formatCurrency = function(num) {
return '$' + num.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
};
// Display Results
document.getElementById('rpResultCashFlow').innerText = formatCurrency(monthlyCashFlow);
document.getElementById('rpResultCashFlow').className = 'rp-metric-value ' + (monthlyCashFlow >= 0 ? 'positive' : 'negative');
document.getElementById('rpResultCoC').innerText = cashOnCashROI.toFixed(2) + '%';
document.getElementById('rpResultCoC').className = 'rp-metric-value ' + (cashOnCashROI >= 0 ? 'positive' : 'negative');
document.getElementById('rpResultCapRate').innerText = capRate.toFixed(2) + '%';
document.getElementById('rpResultCashNeeded').innerText = formatCurrency(totalCashInvested);
document.getElementById('rpResultExpenses').innerText = formatCurrency(totalMonthlyExpenses);
document.getElementById('rpResultNOI').innerText = formatCurrency(annualNOI);
document.getElementById('rp-result-section').style.display = 'block';
}
How to Use the Rental Property ROI Calculator
Investing in real estate is one of the most reliable ways to build wealth, but not every property is a good deal. To ensure your investment is sound, you must analyze the numbers objectively. This Rental Property Cash Flow & ROI Calculator helps investors determine the viability of a rental property by analyzing key metrics like Cash on Cash Return, Net Operating Income (NOI), and Monthly Cash Flow.
Understanding Key Metrics
Successful real estate investing relies on understanding three primary financial indicators, all of which are calculated above:
Cash Flow: This is the profit you take home each month after all expenses (mortgage, taxes, insurance, repairs) are paid. Positive cash flow ensures the property pays for itself and generates income.
Cash on Cash ROI: This metric measures the annual return on the actual cash you invested (down payment, closing costs, rehab). It is crucial because it allows you to compare real estate returns against other investment vehicles like stocks or bonds. A common target for investors is 8-12%.
Cap Rate (Capitalization Rate): This measures the property's natural rate of return assuming it was bought with all cash. It helps compare the profitability of different properties regardless of financing.
Step-by-Step Inputs Guide
To get the most accurate results, ensure you input precise figures:
Purchase Price & Down Payment: The agreed sale price and your cash contribution. The higher the down payment, the lower the mortgage, which typically improves cash flow but may lower Cash on Cash ROI.
Closing & Rehab Costs: Don't forget these upfront costs. They increase your "Total Cash Needed" and affect your ROI denominator.
Vacancy & Maintenance: A common mistake is assuming 100% occupancy and zero repairs. We recommend setting aside at least 5-10% of monthly rent for maintenance and 5% for vacancy buffers.
What is a Good Rental Property ROI?
While "good" is subjective, many professional investors look for a Cash on Cash return of at least 8% to 12%. In highly appreciating markets, investors might accept a lower cash flow (4-6%) in exchange for long-term equity growth. Conversely, in stable, low-appreciation markets, investors often demand higher cash flow (12%+) to offset the risk.
Use this calculator to test different scenarios. For example, see how changing your down payment from 20% to 25% impacts your monthly cash flow versus your overall return on investment. Adjust the rental income to see how sensitive your profit is to market fluctuations.