function calculateRentalROI() {
var price = parseFloat(document.getElementById('purchasePrice').value);
var downPercent = parseFloat(document.getElementById('downPaymentPercent').value);
var rate = parseFloat(document.getElementById('interestRate').value) / 100 / 12;
var term = parseFloat(document.getElementById('loanTerm').value) * 12;
var rent = parseFloat(document.getElementById('monthlyRent').value);
var expenses = parseFloat(document.getElementById('monthlyExpenses').value);
if (isNaN(price) || isNaN(downPercent) || isNaN(rent)) {
alert("Please enter valid numbers in all fields.");
return;
}
var downPaymentAmount = price * (downPercent / 100);
var loanAmount = price – downPaymentAmount;
// Monthly Mortgage Calculation
var monthlyMortgage = 0;
if (rate > 0) {
monthlyMortgage = loanAmount * (rate * Math.pow(1 + rate, term)) / (Math.pow(1 + rate, term) – 1);
} else {
monthlyMortgage = loanAmount / term;
}
var totalMonthlyOutgo = monthlyMortgage + expenses;
var monthlyCashFlow = rent – totalMonthlyOutgo;
var annualCashFlow = monthlyCashFlow * 12;
// NOI = Annual Rent – Annual Expenses (Excluding Mortgage)
var annualExpensesNoMortgage = expenses * 12;
var noi = (rent * 12) – annualExpensesNoMortgage;
var capRate = (noi / price) * 100;
var cocReturn = (annualCashFlow / downPaymentAmount) * 100;
document.getElementById('initialCash').innerHTML = "$" + downPaymentAmount.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('monthlyMortgage').innerHTML = "$" + monthlyMortgage.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('monthlyCashFlow').innerHTML = "$" + monthlyCashFlow.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('capRate').innerHTML = capRate.toFixed(2) + "%";
document.getElementById('cocReturn').innerHTML = cocReturn.toFixed(2) + "%";
document.getElementById('roiResult').style.display = 'block';
}
How to Calculate Rental Property ROI
Investing in real estate is one of the most reliable ways to build wealth, but only if the numbers work. Our Rental Property ROI Calculator helps you determine if a potential investment will generate enough cash flow to justify the risk. To understand your returns, you must look at two primary metrics: Cap Rate and Cash on Cash Return.
Understanding the Key Metrics
Cap Rate (Capitalization Rate): This measures the property's natural rate of return without considering financing. It is calculated by dividing the Net Operating Income (NOI) by the purchase price. It's best for comparing the profitability of different properties side-by-side.
Cash on Cash Return: This is the "real world" metric for most investors. It measures the annual cash flow relative to the actual amount of cash you pulled out of your pocket (the down payment). If you put $50,000 down and get $5,000 back in profit per year, your Cash on Cash return is 10%.
Net Operating Income (NOI): This is your total annual income minus all operating expenses (taxes, insurance, repairs). Crucially, NOI does not include your mortgage payment.
Example ROI Calculation
Imagine you buy a property for $200,000 with a 20% down payment ($40,000).
If your monthly rent is $1,800 and your total expenses (mortgage, taxes, insurance) are $1,400, your monthly cash flow is $400.