Calculate Cash Flow, Cap Rate, and Cash-on-Cash Return
(Taxes, Insurance, HOA, Repairs)
Monthly Mortgage Payment:—
Total Monthly Expenses:—
Monthly Cash Flow:—
Net Operating Income (Annual):—
Cap Rate:—
Cash on Cash Return:—
function calculateROI() {
// Get Inputs
var price = parseFloat(document.getElementById('purchasePrice').value);
var closing = parseFloat(document.getElementById('closingCosts').value);
var down = parseFloat(document.getElementById('downPayment').value);
var rate = parseFloat(document.getElementById('interestRate').value);
var term = parseFloat(document.getElementById('loanTerm').value);
var rent = parseFloat(document.getElementById('monthlyRent').value);
var exp = parseFloat(document.getElementById('monthlyExpenses').value);
// Validation
if (isNaN(price) || isNaN(rent) || isNaN(exp)) {
alert("Please enter valid numbers for Price, Rent, and Expenses.");
return;
}
// Handle defaults for zeros
if (isNaN(closing)) closing = 0;
if (isNaN(down)) down = 0;
if (isNaN(rate)) rate = 0;
if (isNaN(term)) term = 30;
// 1. Calculate Mortgage
var principal = price – down;
var monthlyMortgage = 0;
if (principal > 0 && rate > 0) {
var r = (rate / 100) / 12;
var n = term * 12;
// Formula: M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1 ]
monthlyMortgage = principal * ( (r * Math.pow(1 + r, n)) / (Math.pow(1 + r, n) – 1) );
}
// 2. Total Monthly Expenses (Mortgage + OpEx)
var totalMonthlyExpenses = monthlyMortgage + exp;
// 3. Monthly Cash Flow
var monthlyCashFlow = rent – totalMonthlyExpenses;
// 4. Annual Net Operating Income (NOI)
// NOI = (Gross Income – Operating Expenses) * 12
// Note: NOI excludes mortgage payments
var annualNOI = (rent – exp) * 12;
// 5. Cap Rate
// Cap Rate = NOI / Purchase Price
var capRate = 0;
if (price > 0) {
capRate = (annualNOI / price) * 100;
}
// 6. Cash on Cash Return
// CoC = Annual Pre-Tax Cash Flow / Total Cash Invested
var totalCashInvested = down + closing;
var annualCashFlow = monthlyCashFlow * 12;
var cocReturn = 0;
if (totalCashInvested > 0) {
cocReturn = (annualCashFlow / totalCashInvested) * 100;
} else if (totalCashInvested === 0 && annualCashFlow > 0) {
cocReturn = Infinity; // Infinite return if no money down
}
// Display Results
document.getElementById('resultsArea').style.display = 'block';
document.getElementById('resMortgage').innerText = '$' + monthlyMortgage.toFixed(2);
document.getElementById('resTotalExp').innerText = '$' + totalMonthlyExpenses.toFixed(2);
var cfEl = document.getElementById('resCashFlow');
cfEl.innerText = '$' + monthlyCashFlow.toFixed(2);
cfEl.className = monthlyCashFlow >= 0 ? "roi-result-value roi-highlight" : "roi-result-value roi-negative";
document.getElementById('resNOI').innerText = '$' + annualNOI.toFixed(2);
document.getElementById('resCapRate').innerText = capRate.toFixed(2) + '%';
var cocEl = document.getElementById('resCoC');
cocEl.innerText = cocReturn.toFixed(2) + '%';
cocEl.className = cocReturn >= 0 ? "roi-result-value roi-highlight" : "roi-result-value roi-negative";
}
Understanding Rental Property ROI
Investing in real estate is one of the most reliable ways to build wealth, but not every property is a good deal. To ensure profitability, investors must analyze the potential return on investment (ROI) before signing on the dotted line. This Rental Property ROI Calculator helps you crunch the numbers to determine if a property will generate positive cash flow or become a financial burden.
Key Metrics Explained
1. Cash Flow
Cash flow is the profit you bring in each month after all expenses are paid. It is calculated as:
Gross Income: Total rent collected.
Minus Expenses: Taxes, insurance, HOA fees, maintenance, vacancy reserves, and property management.
Minus Debt Service: Your monthly mortgage payment (principal and interest).
A positive cash flow ensures the property pays for itself and provides you with passive income.
2. Cap Rate (Capitalization Rate)
The Cap Rate measures the natural rate of return on the property independent of financing. It is calculated by dividing the Net Operating Income (NOI) by the property's purchase price. This metric allows you to compare the profitability of one property against another directly, regardless of how you pay for them (cash vs. mortgage). A higher Cap Rate generally indicates a higher potential return, though often with higher risk.
3. Cash-on-Cash Return
For most investors using leverage (mortgages), the Cash-on-Cash Return is the most important metric. It calculates the annual cash return relative to the actual cash you invested (Down Payment + Closing Costs).
Example: If you invest $50,000 to buy a house and it generates $5,000 in net positive cash flow per year, your Cash-on-Cash return is 10%. This allows you to compare real estate returns against other investment vehicles like stocks or bonds.
What is a "Good" ROI?
While target numbers vary by market and strategy, many buy-and-hold investors look for:
Cash Flow: At least $100–$200 per door per month.
Cap Rate: 5% to 10% (depending on the asset class and location).
Cash-on-Cash Return: 8% to 12% or higher.
How to Use This Calculator
To get the most accurate results, ensure you estimate your expenses conservatively. Don't forget to account for periodic maintenance costs (saving 5-10% of rent is standard) and potential vacancy rates. By inputting your purchase price, loan terms, and expected rental income above, you can instantly see if a property fits your investment criteria.