Investing in real estate is one of the most powerful ways to build long-term wealth. However, the difference between a successful investment and a financial burden often comes down to the numbers. This Rental Property ROI Calculator is designed to help investors analyze the profitability of a potential rental property by calculating key metrics like Cash Flow and Cash-on-Cash Return.
Why Cash Flow is King
Cash flow is the profit remaining after all expenses—including mortgage, taxes, insurance, and maintenance—have been paid from the rental income. Positive cash flow ensures that the property pays for itself and generates income for you every month. Negative cash flow means you are paying out of pocket to hold the asset, which increases your risk.
Formula: Cash Flow = Total Rental Income – Total Expenses (Mortgage + Operating Costs)
What is Cash-on-Cash Return?
While cash flow tells you how much money you make monthly, Cash-on-Cash (CoC) Return tells you how hard your money is working. It measures the annual return on the actual cash you invested, rather than the total loan amount.
This metric is crucial because it accounts for leverage (the mortgage). A 10% CoC return means that for every $100 you invested, you are getting $10 back annually in profit.
Key Inputs Explained
Purchase Price: The agreed-upon price to buy the property.
Closing Costs: Fees associated with finalizing the real estate transaction (typically 2-5% of purchase price).
Down Payment: The percentage of the purchase price you pay upfront in cash.
Vacancy Rate (Tip): While not a direct input field above, prudent investors should assume a property won't be rented 100% of the time. You can factor this into the "Monthly Maintenance" or "Expenses" fields for a conservative estimate.
Example Scenario
Let's look at a realistic example to see how the math works:
Purchase Price: $200,000
Down Payment: 20% ($40,000)
Closing Costs: $5,000
Total Cash Invested: $45,000
Monthly Income: $2,000
Total Monthly Expenses (Mortgage + Taxes + Repairs): $1,600
Monthly Cash Flow: $400
Annual Cash Flow: $4,800
In this scenario, the Cash-on-Cash Return would be:
This is generally considered a strong return in many real estate markets.
Interpreting Your Results
If your calculation shows a negative Cash on Cash return, the property is costing you money to own. Investors often look for a CoC return between 8% and 12%, though this varies by market and strategy (e.g., appreciation vs. cash flow).
function calculateROI() {
// 1. Get Inputs using var
var price = parseFloat(document.getElementById('purchasePrice').value);
var closingCosts = parseFloat(document.getElementById('closingCosts').value);
var downPaymentPercent = parseFloat(document.getElementById('downPaymentPercent').value);
var interestRate = parseFloat(document.getElementById('interestRate').value);
var loanTerm = parseFloat(document.getElementById('loanTerm').value);
var monthlyRent = parseFloat(document.getElementById('monthlyRent').value);
var otherIncome = parseFloat(document.getElementById('otherIncome').value);
var annualPropTax = parseFloat(document.getElementById('propTax').value);
var annualInsurance = parseFloat(document.getElementById('insurance').value);
var monthlyHOA = parseFloat(document.getElementById('hoa').value);
var monthlyMaintenance = parseFloat(document.getElementById('maintenance').value);
// 2. Validation
if (isNaN(price) || isNaN(downPaymentPercent) || isNaN(interestRate) || isNaN(loanTerm) || isNaN(monthlyRent)) {
document.getElementById('errorMsg').style.display = 'block';
document.getElementById('results').style.display = 'none';
return;
} else {
document.getElementById('errorMsg').style.display = 'none';
}
// 3. Loan Calculations
var downPaymentAmount = price * (downPaymentPercent / 100);
var loanAmount = price – downPaymentAmount;
var totalCashInvested = downPaymentAmount + closingCosts;
// Mortgage Calculation (M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1])
var monthlyRate = (interestRate / 100) / 12;
var numberOfPayments = loanTerm * 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);
}
// 4. Monthly Expenses
var monthlyTax = annualPropTax / 12;
var monthlyInsurance = annualInsurance / 12;
var totalMonthlyExpenses = monthlyMortgage + monthlyTax + monthlyInsurance + monthlyHOA + monthlyMaintenance;
// 5. Income & Cash Flow
var totalMonthlyIncome = monthlyRent + otherIncome;
var monthlyCashFlow = totalMonthlyIncome – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
// 6. ROI Calculation
var cocReturn = 0;
if (totalCashInvested > 0) {
cocReturn = (annualCashFlow / totalCashInvested) * 100;
}
// 7. Format Functions
function formatMoney(num) {
return '$' + num.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
}
// 8. Display Results
document.getElementById('resTotalCash').innerText = formatMoney(totalCashInvested);
document.getElementById('resMortgage').innerText = formatMoney(monthlyMortgage);
document.getElementById('resExpenses').innerText = formatMoney(totalMonthlyExpenses);
var cfElement = document.getElementById('resMonthlyCashFlow');
cfElement.innerText = formatMoney(monthlyCashFlow);
cfElement.style.color = monthlyCashFlow >= 0 ? '#276749' : '#e53e3e';
var annualCfElement = document.getElementById('resAnnualCashFlow');
annualCfElement.innerText = formatMoney(annualCashFlow);
annualCfElement.style.color = annualCashFlow >= 0 ? '#276749' : '#e53e3e';
var cocElement = document.getElementById('resCoC');
cocElement.innerText = cocReturn.toFixed(2) + '%';
cocElement.style.color = cocReturn >= 0 ? '#22543d' : '#e53e3e';
document.getElementById('results').style.display = 'block';
}