Evaluating a rental property investment requires more than just checking if the rent covers the mortgage. A comprehensive analysis involves calculating the Cash Flow, Capitalization Rate (Cap Rate), and Cash on Cash Return (CoC). This calculator helps investors break down expenses to determine the true profitability of a real estate asset.
How is Cash Flow Calculated?
Cash flow is the net amount of money left over each month after all operating expenses and debt services are paid. The formula used in this calculator is:
Cash Flow = Rental Income – (Mortgage + Taxes + Insurance + HOA + Vacancy + Repairs)
Positive cash flow ensures that the property pays for itself and generates passive income, while negative cash flow implies the investor must contribute money monthly to keep the property afloat.
Key Metrics Explained
Net Operating Income (NOI): This is the total income generated by the property minus all operating expenses (Vacancy, Taxes, Insurance, HOA, Repairs), excluding the mortgage payment. It represents the profitability of the asset itself, regardless of financing.
Cap Rate: Calculated as (Annual NOI / Purchase Price) × 100. The Cap Rate measures the natural rate of return of the property. A higher Cap Rate generally indicates a better return, though often associated with higher risk areas.
Cash on Cash Return (CoC): Calculated as (Annual Cash Flow / Total Cash Invested) × 100. This is the most critical metric for investors using leverage, as it tells you exactly what percentage return you are making on the actual cash you put down (Down Payment).
Example Calculation
If you purchase a property for $200,000 with $40,000 down, and it generates $1,800 in rent. After paying a $1,000 mortgage and $400 in other expenses, your monthly cash flow is $400. Your annual cash flow is $4,800. Your Cash on Cash return would be ($4,800 / $40,000) = 12%.
function calculateRentalCashFlow() {
// Get Input Values
var price = parseFloat(document.getElementById('rp_price').value);
var downPayment = parseFloat(document.getElementById('rp_down').value);
var interestRate = parseFloat(document.getElementById('rp_rate').value);
var years = parseFloat(document.getElementById('rp_term').value);
var rent = parseFloat(document.getElementById('rp_rent').value);
var hoa = parseFloat(document.getElementById('rp_hoa').value);
var annualTax = parseFloat(document.getElementById('rp_tax').value);
var annualIns = parseFloat(document.getElementById('rp_insurance').value);
var vacancyRate = parseFloat(document.getElementById('rp_vacancy').value);
var capexRate = parseFloat(document.getElementById('rp_capex').value);
// Validation
if (isNaN(price) || isNaN(downPayment) || isNaN(rent)) {
alert("Please enter valid numbers for Price, Down Payment, and Rent.");
return;
}
// 1. Calculate Mortgage (P&I)
var loanAmount = price – downPayment;
var monthlyRate = (interestRate / 100) / 12;
var numberOfPayments = years * 12;
var monthlyPI = 0;
if (interestRate === 0) {
monthlyPI = loanAmount / numberOfPayments;
} else {
monthlyPI = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) / (Math.pow(1 + monthlyRate, numberOfPayments) – 1);
}
// 2. Calculate Monthly Operating Expenses
var monthlyTax = annualTax / 12;
var monthlyIns = annualIns / 12;
var monthlyVacancy = rent * (vacancyRate / 100);
var monthlyCapex = rent * (capexRate / 100);
var totalOperatingExpenses = monthlyTax + monthlyIns + monthlyVacancy + monthlyCapex + hoa;
var totalMonthlyExpenses = totalOperatingExpenses + monthlyPI;
// 3. Calculate Results
var monthlyNOI = rent – totalOperatingExpenses;
var monthlyCashFlow = rent – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
var annualNOI = monthlyNOI * 12;
// 4. Calculate ROI Metrics
var capRate = (annualNOI / price) * 100;
var cocReturn = 0;
if (downPayment > 0) {
cocReturn = (annualCashFlow / downPayment) * 100;
}
// 5. Update DOM
document.getElementById('res_pi').textContent = '$' + monthlyPI.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('res_expenses').textContent = '$' + totalMonthlyExpenses.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('res_noi').textContent = '$' + monthlyNOI.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
var cfElement = document.getElementById('res_cashflow');
cfElement.textContent = '$' + monthlyCashFlow.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
// Style changes for negative cash flow
if (monthlyCashFlow < 0) {
cfElement.classList.add('rp-negative');
cfElement.classList.remove('rp-highlight');
} else {
cfElement.classList.remove('rp-negative');
cfElement.classList.add('rp-highlight');
}
document.getElementById('res_annual_cashflow').textContent = '$' + annualCashFlow.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('res_coc').textContent = cocReturn.toFixed(2) + '%';
document.getElementById('res_cap').textContent = capRate.toFixed(2) + '%';
// Show Results
document.getElementById('rp_results').style.display = 'block';
}