Calculating cash flow is the fundamental step in evaluating any real estate investment. Cash flow represents the net amount of money moving in or out of a rental property business after all expenses have been paid. A positive cash flow indicates that the property is generating income, while a negative cash flow means the property is costing you money to hold.
How to Calculate Cash on Cash Return
While cash flow measures the raw dollar amount, the Cash on Cash Return (CoC) measures the efficiency of your invested capital. It is calculated by dividing your annual pre-tax cash flow by the total cash invested (Down Payment + Closing Costs + Rehab Costs). This metric is crucial for comparing real estate investments against other asset classes like stocks or bonds.
Key Inputs for Accurate Calculation
Vacancy Rate: Never assume 100% occupancy. A standard vacancy rate is 5-8%, representing the time the property sits empty between tenants.
CapEx (Capital Expenditures): These are major expenses like a new roof or HVAC system. Smart investors set aside a portion of monthly rent (e.g., 5-10%) to budget for these future costs.
NOI (Net Operating Income): This is your total income minus operating expenses, excluding mortgage payments. It is used to calculate the Cap Rate.
Optimizing Your Investment Strategy
To maximize your rental property ROI, focus on increasing "Effective Gross Income" through value-add renovations that justify higher rent, or by minimizing operating expenses such as insurance premiums or maintenance waste. Use this calculator to simulate different scenarios—such as raising the rent by $50 or refinancing at a lower interest rate—to see the direct impact on your bottom line.
function calculateCashFlow() {
// 1. Get Inputs
var price = parseFloat(document.getElementById('purchasePrice').value);
var downPercent = parseFloat(document.getElementById('downPayment').value);
var interestRate = parseFloat(document.getElementById('interestRate').value);
var termYears = parseFloat(document.getElementById('loanTerm').value);
var rent = parseFloat(document.getElementById('monthlyRent').value);
var vacancyRate = parseFloat(document.getElementById('vacancyRate').value);
var taxYear = parseFloat(document.getElementById('propertyTax').value);
var insuranceYear = parseFloat(document.getElementById('insurance').value);
var hoaMonth = parseFloat(document.getElementById('hoa').value);
var capexMonth = parseFloat(document.getElementById('capex').value);
// Validation to prevent NaN errors
if (isNaN(price) || isNaN(rent) || isNaN(interestRate) || isNaN(termYears)) {
alert("Please enter valid numbers for all fields.");
return;
}
// 2. Loan Calculations
var downPaymentAmount = price * (downPercent / 100);
var loanAmount = price – downPaymentAmount;
var monthlyRate = (interestRate / 100) / 12;
var totalPayments = termYears * 12;
// Mortgage Formula: M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1]
var monthlyMortgage = 0;
if (interestRate > 0) {
monthlyMortgage = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, totalPayments)) / (Math.pow(1 + monthlyRate, totalPayments) – 1);
} else {
monthlyMortgage = loanAmount / totalPayments;
}
// 3. Income Calculations
var vacancyLoss = rent * (vacancyRate / 100);
var effectiveIncome = rent – vacancyLoss;
// 4. Expense Calculations
var monthlyTax = taxYear / 12;
var monthlyInsurance = insuranceYear / 12;
var totalMonthlyExpenses = monthlyMortgage + monthlyTax + monthlyInsurance + hoaMonth + capexMonth;
var operatingExpenses = monthlyTax + monthlyInsurance + hoaMonth + capexMonth; // Excluding debt service for NOI
// 5. Profit Metrics
var monthlyCashFlow = effectiveIncome – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
var monthlyNOI = effectiveIncome – operatingExpenses;
// Cash on Cash Return = Annual Cash Flow / Total Cash Invested (Assuming closing costs ~2% of price for simple estimate, or just Down Payment)
// For this specific calculator, we will use Down Payment as the primary basis to keep it simple but accurate enough.
var cashInvested = downPaymentAmount;
var cashOnCash = 0;
if (cashInvested > 0) {
cashOnCash = (annualCashFlow / cashInvested) * 100;
}
// 6. Display Results
document.getElementById('res-mortgage').innerText = "$" + monthlyMortgage.toFixed(2);
document.getElementById('res-expenses').innerText = "$" + totalMonthlyExpenses.toFixed(2);
document.getElementById('res-noi').innerText = "$" + monthlyNOI.toFixed(2);
var cfElement = document.getElementById('res-cashflow');
cfElement.innerText = "$" + monthlyCashFlow.toFixed(2);
// Styling for positive/negative cash flow
if (monthlyCashFlow >= 0) {
cfElement.style.color = "#27ae60"; // Green
} else {
cfElement.style.color = "#c0392b"; // Red
}
document.getElementById('res-coc').innerText = cashOnCash.toFixed(2) + "%";
// Show results area
document.getElementById('results-area').style.display = 'block';
}