Analyze cash flow, Cap Rate, and Cash on Cash Return for your real estate investment.
Purchase Information
Loan Details
Income & Expenses
Investment Analysis
Total Initial Cash Invested:$0.00
Monthly Mortgage Payment (P&I):$0.00
Total Monthly Expenses:$0.00
Net Operating Income (NOI) / Year:$0.00
Monthly Cash Flow:$0.00
Cap Rate:0.00%
Cash on Cash ROI:0.00%
function calculateRentalROI() {
// 1. Get Input Values
var price = parseFloat(document.getElementById('purchasePrice').value);
var closingCosts = parseFloat(document.getElementById('closingCosts').value);
var downPercent = 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 monthlyHOA = parseFloat(document.getElementById('monthlyHOA').value);
var annualTax = parseFloat(document.getElementById('annualTax').value);
var annualInsurance = parseFloat(document.getElementById('annualInsurance').value);
var vacancyRate = parseFloat(document.getElementById('vacancyRate').value);
// 2. Validation
if (isNaN(price) || isNaN(downPercent) || isNaN(monthlyRent)) {
alert("Please enter valid numbers for Purchase Price, Down Payment, and Rent.");
return;
}
// Handle empty fields with defaults
if (isNaN(closingCosts)) closingCosts = 0;
if (isNaN(monthlyHOA)) monthlyHOA = 0;
if (isNaN(annualTax)) annualTax = 0;
if (isNaN(annualInsurance)) annualInsurance = 0;
if (isNaN(vacancyRate)) vacancyRate = 0;
if (isNaN(interestRate)) interestRate = 0;
if (isNaN(loanTerm)) loanTerm = 30;
// 3. Loan Calculations
var downPaymentAmount = price * (downPercent / 100);
var loanAmount = price – downPaymentAmount;
var totalCashInvested = downPaymentAmount + closingCosts;
// Monthly Mortgage Payment Formula: M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1 ]
var monthlyMortgage = 0;
if (loanAmount > 0 && interestRate > 0) {
var r = (interestRate / 100) / 12; // Monthly interest rate
var n = loanTerm * 12; // Total number of payments
monthlyMortgage = loanAmount * (r * Math.pow(1 + r, n)) / (Math.pow(1 + r, n) – 1);
}
// 4. Expense Calculations
var monthlyTax = annualTax / 12;
var monthlyIns = annualInsurance / 12;
var monthlyVacancy = monthlyRent * (vacancyRate / 100);
// Total Operating Expenses (Used for NOI) – Does NOT include mortgage
var monthlyOperatingExpenses = monthlyHOA + monthlyTax + monthlyIns + monthlyVacancy;
// Total Cash Expenses (Used for Cash Flow) – INCLUDES mortgage
var totalMonthlyExpenses = monthlyOperatingExpenses + monthlyMortgage;
// 5. Profit Calculations
var monthlyCashFlow = monthlyRent – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
// Net Operating Income (Annual)
var annualNOI = (monthlyRent * 12) – (monthlyOperatingExpenses * 12);
// Cap Rate = (NOI / Current Market Value) * 100
var capRate = 0;
if (price > 0) {
capRate = (annualNOI / price) * 100;
}
// Cash on Cash ROI = (Annual Pre-Tax Cash Flow / Total Cash Invested) * 100
var cocRoi = 0;
if (totalCashInvested > 0) {
cocRoi = (annualCashFlow / totalCashInvested) * 100;
}
// 6. Display Results
// Helper to format currency
var fmt = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' });
document.getElementById('resCashInvested').innerText = fmt.format(totalCashInvested);
document.getElementById('resMortgage').innerText = fmt.format(monthlyMortgage);
document.getElementById('resTotalExp').innerText = fmt.format(totalMonthlyExpenses);
document.getElementById('resNOI').innerText = fmt.format(annualNOI);
document.getElementById('resCashFlow').innerText = fmt.format(monthlyCashFlow);
document.getElementById('resCapRate').innerText = capRate.toFixed(2) + "%";
document.getElementById('resCoC').innerText = cocRoi.toFixed(2) + "%";
// Styling positive/negative cash flow
var cashFlowEl = document.getElementById('resCashFlow');
if (monthlyCashFlow >= 0) {
cashFlowEl.className = "rp-result-value rp-highlight";
cashFlowEl.style.color = "#27ae60";
} else {
cashFlowEl.className = "rp-result-value rp-highlight-bad";
cashFlowEl.style.color = "#c0392b";
}
// Show result div
document.getElementById('rpResults').style.display = "block";
}
Understanding Rental Property ROI
Investing in real estate is one of the most reliable ways to build long-term wealth, but not every property is a good deal. To ensure your investment yields profit, you must analyze the numbers accurately. This Rental Property ROI Calculator helps investors determine the viability of a potential purchase by calculating key metrics like Cash Flow, Cap Rate, and Cash on Cash Return.
What is Cash Flow?
Cash flow is the net amount of cash moving into or out of your investment each month. It is calculated by subtracting your total monthly expenses (mortgage, taxes, insurance, HOA, maintenance, vacancy reserves) from your expected monthly rent. Positive cash flow means the property pays for itself and generates income, while negative cash flow implies you must pay out of pocket to hold the asset.
Key Metrics Explained
NOI (Net Operating Income): This measures the profitability of a property before adding in any financing costs or taxes. It is calculated as Total Income – Operating Expenses. Note that mortgage payments are not considered operating expenses.
Cap Rate (Capitalization Rate): This metric helps you compare the return of a property regardless of how you pay for it (cash vs. loan). It is calculated as (NOI / Purchase Price) × 100. A higher Cap Rate generally indicates a better annual return on the asset itself.
Cash on Cash Return (CoC ROI): This is arguably the most important metric for leveraged investors. It measures the return on the actual cash you put into the deal (down payment + closing costs). It is calculated as (Annual Cash Flow / Total Cash Invested) × 100.
How to Use This Calculator
To get the most accurate results, input realistic numbers for all fields. Don't forget to account for "silent" costs like Vacancy Rates (typically 5-8% to account for turnover) and Maintenance. If you are financing the property, the "Down Payment" and "Interest Rate" fields are critical for determining your mortgage expense, which heavily impacts your final Cash on Cash ROI.
What is a "Good" ROI?
A "good" ROI is subjective and depends on your strategy. However, many investors aim for a Cash on Cash return of 8% to 12% for long-term rentals. In highly appreciative markets, investors might accept a lower cash flow (4-6%) in exchange for potential equity growth, whereas in stable markets, cash flow is often the priority.