function calculateRentalROI() {
// 1. Get Inputs
var price = parseFloat(document.getElementById("rpcPurchasePrice").value) || 0;
var closingCosts = parseFloat(document.getElementById("rpcRepairCost").value) || 0;
var downPaymentPercent = parseFloat(document.getElementById("rpcDownPayment").value) || 0;
var interestRate = parseFloat(document.getElementById("rpcInterestRate").value) || 0;
var loanTermYears = parseFloat(document.getElementById("rpcLoanTerm").value) || 0;
var monthlyRent = parseFloat(document.getElementById("rpcMonthlyRent").value) || 0;
var vacancyRate = parseFloat(document.getElementById("rpcVacancyRate").value) || 0;
var annualTax = parseFloat(document.getElementById("rpcPropTax").value) || 0;
var annualInsurance = parseFloat(document.getElementById("rpcInsurance").value) || 0;
var monthlyHOA = parseFloat(document.getElementById("rpcHOA").value) || 0;
var maintenancePercent = parseFloat(document.getElementById("rpcMaintenance").value) || 0;
var mgmtFeePercent = parseFloat(document.getElementById("rpcMgmtFee").value) || 0;
// 2. Core Calculations
var downPaymentAmount = price * (downPaymentPercent / 100);
var loanAmount = price – downPaymentAmount;
var totalInitialCash = downPaymentAmount + closingCosts;
// Mortgage Calculation
var monthlyMortgage = 0;
if (loanAmount > 0 && interestRate > 0 && loanTermYears > 0) {
var r = interestRate / 100 / 12;
var n = loanTermYears * 12;
monthlyMortgage = (loanAmount * r) / (1 – Math.pow(1 + r, -n));
} else if (loanAmount > 0 && interestRate === 0) {
monthlyMortgage = loanAmount / (loanTermYears * 12);
}
// Monthly Income Calculations
var grossMonthlyIncome = monthlyRent;
var vacancyAmount = grossMonthlyIncome * (vacancyRate / 100);
var effectiveIncome = grossMonthlyIncome – vacancyAmount;
// Monthly Expense Calculations
var monthlyTax = annualTax / 12;
var monthlyInsurance = annualInsurance / 12;
var maintenanceAmount = grossMonthlyIncome * (maintenancePercent / 100);
var mgmtFeeAmount = grossMonthlyIncome * (mgmtFeePercent / 100);
var totalOperatingExpenses = monthlyTax + monthlyInsurance + monthlyHOA + maintenanceAmount + mgmtFeeAmount;
var monthlyNOI = effectiveIncome – totalOperatingExpenses;
var monthlyCashflow = monthlyNOI – monthlyMortgage;
// Annual Metrics
var annualNOI = monthlyNOI * 12;
var annualCashflow = monthlyCashflow * 12;
// ROI Metrics
var capRate = (price > 0) ? (annualNOI / price) * 100 : 0;
var cashOnCash = (totalInitialCash > 0) ? (annualCashflow / totalInitialCash) * 100 : 0;
// 3. Update DOM
var formatter = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' });
var percentFormatter = new Intl.NumberFormat('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
// Main Metrics
document.getElementById("rpcDisplayCashflow").innerText = formatter.format(monthlyCashflow);
document.getElementById("rpcDisplayCashflow").className = "rpc-metric-value " + (monthlyCashflow >= 0 ? "positive" : "negative");
document.getElementById("rpcDisplayCoC").innerText = percentFormatter.format(cashOnCash) + "%";
document.getElementById("rpcDisplayCoC").className = "rpc-metric-value " + (cashOnCash >= 0 ? "positive" : "negative");
document.getElementById("rpcDisplayCapRate").innerText = percentFormatter.format(capRate) + "%";
document.getElementById("rpcDisplayNOI").innerText = formatter.format(annualNOI);
// Breakdown Table
document.getElementById("rpcTableRent").innerText = formatter.format(grossMonthlyIncome);
document.getElementById("rpcTableVacancy").innerText = "-" + formatter.format(vacancyAmount);
document.getElementById("rpcTableExpenses").innerText = "-" + formatter.format(totalOperatingExpenses);
document.getElementById("rpcTableNOI").innerText = formatter.format(monthlyNOI);
document.getElementById("rpcTableMortgage").innerText = "-" + formatter.format(monthlyMortgage);
document.getElementById("rpcTableCashflow").innerText = formatter.format(monthlyCashflow);
// Show Results
document.getElementById("rpcResultContainer").style.display = "block";
}
Understanding Your Rental Property ROI
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 need to understand the numbers. This Rental Property ROI Calculator is designed to provide a comprehensive analysis of a potential investment's profitability, moving beyond simple estimates to give you concrete data.
Key Metrics Explained
1. Cash Flow
Cash flow is the profit you bring in each month after all operating expenses and mortgage payments are made. Positive cash flow is essential for a sustainable investment, as it provides passive income and a buffer against unexpected repairs. Our calculator breaks this down into both monthly and annual figures, helping you assess the liquidity of your investment.
2. Cash on Cash Return (CoC)
Perhaps the most critical metric for investors, Cash on Cash Return measures the annual return on the actual cash you invested (down payment + closing costs + rehab costs), rather than the total price of the home. This allows you to compare real estate investments against other asset classes like stocks or bonds.
Formula: Annual Pre-Tax Cash Flow / Total Cash Invested
Target: Many investors aim for a CoC return of 8-12% or higher.
3. Cap Rate (Capitalization Rate)
The Cap Rate measures the property's natural rate of return assuming you bought it in cash (no mortgage). It is calculated by dividing the Net Operating Income (NOI) by the purchase price. This metric is incredibly useful for comparing the intrinsic value of different properties regardless of how they are financed.
How to Use This Calculator
To get the most accurate results, ensure you account for "hidden" costs. While mortgage and taxes are obvious, many new investors forget to calculate:
Vacancy Rate: Properties are rarely occupied 100% of the time. A standard conservative estimate is 5-8% (representing about 2-4 weeks of vacancy per year).
Maintenance & CapEx: Even if the house is new, you should set aside 5-10% of the rent for future repairs (roof, HVAC, painting).
Management Fees: If you hire a property manager, they typically charge 8-10% of the monthly rent. If you self-manage, you can set this to 0%, but your time still has value!
Use the inputs above to run different scenarios. Adjust the Down Payment to see how leverage affects your Cash on Cash return, or tweak the Monthly Rent to see what is required to break even.