function calculateRentalROI() {
// Get Input Values
var price = parseFloat(document.getElementById('rp_price').value) || 0;
var downPayment = parseFloat(document.getElementById('rp_down').value) || 0;
var rate = parseFloat(document.getElementById('rp_rate').value) || 0;
var term = parseFloat(document.getElementById('rp_term').value) || 0;
var closingCosts = parseFloat(document.getElementById('rp_closing').value) || 0;
var rehabCosts = parseFloat(document.getElementById('rp_rehab').value) || 0;
var rent = parseFloat(document.getElementById('rp_rent').value) || 0;
var hoa = parseFloat(document.getElementById('rp_hoa').value) || 0;
var yearlyTax = parseFloat(document.getElementById('rp_tax').value) || 0;
var yearlyIns = parseFloat(document.getElementById('rp_ins').value) || 0;
var vacancyRate = parseFloat(document.getElementById('rp_vacancy').value) || 0;
var maintRate = parseFloat(document.getElementById('rp_maint').value) || 0;
var mgmtRate = parseFloat(document.getElementById('rp_mgmt').value) || 0;
// 1. Calculate Mortgage (Principal & Interest)
var loanAmount = price – downPayment;
var monthlyRate = (rate / 100) / 12;
var numPayments = term * 12;
var monthlyMortgage = 0;
if (rate > 0 && term > 0) {
monthlyMortgage = loanAmount * monthlyRate * (Math.pow(1 + monthlyRate, numPayments)) / (Math.pow(1 + monthlyRate, numPayments) – 1);
} else if (term > 0) {
monthlyMortgage = loanAmount / numPayments; // 0% interest case
}
// 2. Calculate Operating Expenses
var vacancyCost = rent * (vacancyRate / 100);
var effectiveGrossIncome = rent – vacancyCost;
var taxMonthly = yearlyTax / 12;
var insMonthly = yearlyIns / 12;
var maintCost = rent * (maintRate / 100);
var mgmtCost = rent * (mgmtRate / 100);
var totalOpEx = taxMonthly + insMonthly + maintCost + mgmtCost + hoa;
// 3. Calculate NOI and Cash Flow
var monthlyNOI = effectiveGrossIncome – totalOpEx;
var monthlyCashFlow = monthlyNOI – monthlyMortgage;
var annualCashFlow = monthlyCashFlow * 12;
var annualNOI = monthlyNOI * 12;
// 4. Calculate Returns
var totalInvested = downPayment + closingCosts + rehabCosts;
var cashOnCash = 0;
if (totalInvested > 0) {
cashOnCash = (annualCashFlow / totalInvested) * 100;
}
var capRate = 0;
var totalCostBasis = price + rehabCosts; // Cap rate usually based on total asset value/cost
if (totalCostBasis > 0) {
capRate = (annualNOI / totalCostBasis) * 100;
}
// Display Results
document.getElementById('rp_results_area').style.display = 'block';
// Helper for currency formatting
var fmtMoney = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' });
document.getElementById('res_coc').innerText = cashOnCash.toFixed(2) + '%';
document.getElementById('res_cap').innerText = capRate.toFixed(2) + '%';
var cfElem = document.getElementById('res_cashflow_top');
cfElem.innerText = fmtMoney.format(monthlyCashFlow);
cfElem.style.color = monthlyCashFlow >= 0 ? '#166534' : '#991b1b';
document.getElementById('res_rent').innerText = fmtMoney.format(rent);
document.getElementById('res_vacancy').innerText = '- ' + fmtMoney.format(vacancyCost);
document.getElementById('res_egi').innerText = fmtMoney.format(effectiveGrossIncome);
document.getElementById('res_opex').innerText = '- ' + fmtMoney.format(totalOpEx);
document.getElementById('res_noi').innerText = fmtMoney.format(monthlyNOI);
document.getElementById('res_mortgage').innerText = '- ' + fmtMoney.format(monthlyMortgage);
var finalCF = document.getElementById('res_cashflow_final');
finalCF.innerText = fmtMoney.format(monthlyCashFlow);
var row = document.getElementById('cashflow_row');
if (monthlyCashFlow < 0) {
row.className = 'rp-result-row negative';
} else {
row.className = 'rp-result-row highlight';
}
}
How to Analyze a Rental Property Deal
Investing in real estate is one of the most reliable ways to build wealth, but it relies heavily on the numbers. A beautiful house in a great neighborhood can still be a terrible investment if the math doesn't work. This Rental Property Cash Flow Calculator is designed to help investors look past the aesthetics and focus on the profitability of an asset.
Key Metrics Explained
1. Net Operating Income (NOI)
NOI is the total income the property generates after all operating expenses are paid, but before the mortgage is paid. It is a pure measure of the property's efficiency. Operating expenses include taxes, insurance, maintenance, property management, and HOA fees. Note that principal and interest payments are not considered operating expenses.
2. Cash Flow
This is the money left in your pocket at the end of the month. It is calculated as NOI minus Mortgage Payments. Positive cash flow ensures the property pays for itself and provides you with passive income. A common mistake for new investors is underestimating expenses (like vacancy and repairs), leading to negative cash flow.
3. Cash on Cash ROI
Cash on Cash Return on Investment measures the velocity of your money. It answers the question: "For every dollar I actually invested, how much am I getting back this year?" It is calculated by dividing your annual pre-tax cash flow by your total cash invested (Down Payment + Closing Costs + Rehab Costs). A "good" Cash on Cash return varies by market, but many investors aim for 8-12%.
4. Cap Rate (Capitalization Rate)
Cap Rate measures the natural rate of return of the property assuming you paid for it in all cash. It helps you compare the profitability of one property against another, regardless of how they are financed. A higher Cap Rate generally indicates higher risk or higher return potential, while a lower Cap Rate is common in stable, high-demand areas.
The 50% Rule and 1% Rule
When quickly screening properties, investors often use "napkin math" rules:
The 1% Rule: Does the monthly rent equal at least 1% of the purchase price? (e.g., a $200,000 house should rent for $2,000).
The 50% Rule: Assume that 50% of your gross rent will go toward operating expenses (excluding mortgage). If the remaining 50% can cover the mortgage and leave a profit, it's worth a deeper look.
Use the calculator above to move beyond these estimates and get precise figures for your specific deal.