Investing in real estate requires precise math to ensure a property is a viable asset. This Rental Property ROI Calculator helps investors analyze the profitability of a potential purchase by breaking down key metrics like Cash Flow, Cap Rate, and Cash on Cash Return.
Key Terms Explained
Net Operating Income (NOI): This is your total annual rental income minus all operating expenses (taxes, insurance, maintenance). It notably excludes mortgage payments. It represents the raw profitability of the asset itself.
Cap Rate (Capitalization Rate): Calculated as (NOI / Purchase Price) × 100. This metric allows you to compare the profitability of properties regardless of how they are financed. A higher cap rate generally indicates a better return, though often comes with higher risk.
Cash on Cash Return: Calculated as (Annual Cash Flow / Total Cash Invested) × 100. Unlike Cap Rate, this metric takes your financing into account. It tells you exactly how hard your down payment and closing costs are working for you.
Example Calculation
Imagine you purchase a property for $200,000 with a 20% down payment ($40,000). You rent it out for $2,000/month ($24,000/year).
If your annual operating expenses (taxes, repairs, vacancy) are $8,000, your NOI is $16,000 ($24,000 – $8,000).
Your Cap Rate would be ($16,000 / $200,000) = 8.0%.
However, if you have a mortgage payment of $12,000/year, your actual cash flow is only $4,000 ($16,000 NOI – $12,000 Mortgage). Your Cash on Cash Return would be ($4,000 / $40,000) = 10.0%.
function calculateRentalROI() {
// Get Input Values
var price = parseFloat(document.getElementById('prop_price').value);
var downPercent = parseFloat(document.getElementById('prop_down_percent').value);
var interestRate = parseFloat(document.getElementById('prop_rate').value);
var loanTermYears = parseFloat(document.getElementById('prop_term').value);
var monthlyRent = parseFloat(document.getElementById('prop_rent').value);
var annualExpenses = parseFloat(document.getElementById('prop_expenses').value);
// Validation to prevent NaN errors
if (isNaN(price) || isNaN(downPercent) || isNaN(interestRate) || isNaN(loanTermYears) || isNaN(monthlyRent) || isNaN(annualExpenses)) {
alert("Please enter valid numbers in all fields.");
return;
}
// Calculations
var downPaymentAmount = price * (downPercent / 100);
var loanAmount = price – downPaymentAmount;
// Monthly Mortgage Calculation (Principal + Interest)
// Formula: M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1 ]
var monthlyRate = (interestRate / 100) / 12;
var numberOfPayments = loanTermYears * 12;
var monthlyMortgage = 0;
if (interestRate === 0) {
monthlyMortgage = loanAmount / numberOfPayments;
} else {
monthlyMortgage = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) / (Math.pow(1 + monthlyRate, numberOfPayments) – 1);
}
// Annual Aggregates
var grossAnnualIncome = monthlyRent * 12;
var annualMortgagePayment = monthlyMortgage * 12;
// Net Operating Income (NOI) = Income – Operating Expenses (Excluding Mortgage)
var noi = grossAnnualIncome – annualExpenses;
// Annual Cash Flow = NOI – Mortgage Payments
var annualCashFlow = noi – annualMortgagePayment;
var monthlyCashFlow = annualCashFlow / 12;
// Cap Rate = (NOI / Purchase Price) * 100
var capRate = (noi / price) * 100;
// Cash on Cash Return = (Annual Cash Flow / Total Cash Invested) * 100
// Assuming Closing costs are roughly 3% of price (simplified estimation for this calc)
var closingCosts = price * 0.03;
var totalCashInvested = downPaymentAmount + closingCosts;
var cashOnCash = (annualCashFlow / totalCashInvested) * 100;
// Update UI
document.getElementById('results-area').style.display = 'block';
// Formatting helper
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
});
document.getElementById('res_mortgage').innerHTML = formatter.format(monthlyMortgage);
var cashFlowElem = document.getElementById('res_cashflow');
cashFlowElem.innerHTML = formatter.format(monthlyCashFlow);
cashFlowElem.style.color = monthlyCashFlow >= 0 ? '#28a745' : '#dc3545';
document.getElementById('res_noi').innerHTML = formatter.format(noi);
document.getElementById('res_cap_rate').innerHTML = capRate.toFixed(2) + '%';
var cocElem = document.getElementById('res_coc');
cocElem.innerHTML = cashOnCash.toFixed(2) + '%';
cocElem.style.color = cashOnCash >= 0 ? '#28a745' : '#dc3545';
}