Analyze potential real estate investments instantly. Calculate monthly cash flow, cap rate, and cash-on-cash return to make data-driven investment decisions.
Property & Loan Details
Income & Expenses (Monthly/Annual)
Investment Analysis
Monthly Cash Flow
–
Cash on Cash Return
–
Cap Rate
–
Monthly Breakdown
Effective Gross Income
–
Mortgage Payment (P&I)
–
Total Operating Expenses
–
Understanding Rental Property Profitability
Investing in real estate is one of the most reliable ways to build wealth, but it requires precise calculation. Simply comparing the monthly rent to the mortgage payment is a mistake that many novice investors make. To truly understand if a property is a good deal, you must analyze the Cash Flow, Cash on Cash Return, and Cap Rate.
What is Cash Flow?
Cash flow is the profit you bring in each month after all expenses are paid. This includes your mortgage principal and interest, taxes, insurance, vacancy reserves, repairs, and HOA fees. Positive cash flow ensures the property pays for itself and puts money in your pocket.
Formula:Cash Flow = Total Rental Income – Total Expenses
Why Cash on Cash Return Matters
While cash flow tells you dollar amounts, Cash on Cash Return (CoC) measures the efficiency of your investment. It calculates the annual return on the actual cash you invested (down payment + closing costs + repairs).
For example, if you invest $50,000 cash to buy a property and it generates $5,000 in positive cash flow annually, your CoC return is 10%. This metric allows you to compare real estate performance against stocks, bonds, or other properties.
Defining Cap Rate (Capitalization Rate)
Cap Rate is used to evaluate the profitability of a property independent of its financing. It helps compare properties as if they were bought with 100% cash. A higher Cap Rate generally indicates a higher return potential, though it often comes with higher risk.
How to Use This Calculator
To get the most accurate results, ensure you:
Estimate Vacancy: No property is occupied 100% of the time. A standard conservative estimate is 5-8%.
Include Maintenance: Budget 10-15% of rent for repairs, even if the house is new. Capital expenditures (roofs, HVAC) will eventually arise.
Check Tax Rates: Property taxes vary wildly by county. Look up the specific tax history of the address.
function calculateROI() {
// 1. Get input values
var price = parseFloat(document.getElementById("purchasePrice").value);
var downPercent = parseFloat(document.getElementById("downPaymentPercent").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTerm = parseFloat(document.getElementById("loanTerm").value);
var rent = parseFloat(document.getElementById("monthlyRent").value);
var vacancyRate = parseFloat(document.getElementById("vacancyRate").value);
var annualTaxes = parseFloat(document.getElementById("annualTaxes").value);
var annualInsurance = parseFloat(document.getElementById("annualInsurance").value);
var maintenance = parseFloat(document.getElementById("monthlyMaintenance").value);
var hoa = parseFloat(document.getElementById("monthlyHOA").value);
// 2. Validation
if (isNaN(price) || isNaN(interestRate) || isNaN(loanTerm) || isNaN(rent)) {
alert("Please fill in all required fields (Price, Interest Rate, Term, Rent) with valid numbers.");
return;
}
// Set defaults for optional fields if empty
if (isNaN(downPercent)) downPercent = 0;
if (isNaN(vacancyRate)) vacancyRate = 0;
if (isNaN(annualTaxes)) annualTaxes = 0;
if (isNaN(annualInsurance)) annualInsurance = 0;
if (isNaN(maintenance)) maintenance = 0;
if (isNaN(hoa)) hoa = 0;
// 3. Calculation Logic
// Financials
var downPaymentAmount = price * (downPercent / 100);
var loanAmount = price – downPaymentAmount;
// Mortgage Calculation (P&I)
var monthlyRate = interestRate / 100 / 12;
var numPayments = loanTerm * 12;
var monthlyMortgage = 0;
if (interestRate === 0) {
monthlyMortgage = loanAmount / numPayments;
} else {
monthlyMortgage = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numPayments)) / (Math.pow(1 + monthlyRate, numPayments) – 1);
}
// Operating Expenses
var monthlyTaxes = annualTaxes / 12;
var monthlyInsurance = annualInsurance / 12;
var vacancyCost = rent * (vacancyRate / 100);
// Effective Gross Income (Rent – Vacancy)
var effectiveIncome = rent – vacancyCost;
// Total Monthly Operating Expenses (Excluding Mortgage)
var operatingExpenses = monthlyTaxes + monthlyInsurance + maintenance + hoa;
// Net Operating Income (NOI) = Income – Operating Expenses (No Mortgage)
var noiMonthly = effectiveIncome – operatingExpenses;
var noiAnnual = noiMonthly * 12;
// Total Expenses (Including Mortgage)
var totalExpenses = operatingExpenses + monthlyMortgage;
// Cash Flow
var monthlyCashFlow = effectiveIncome – totalExpenses;
var annualCashFlow = monthlyCashFlow * 12;
// Metrics
// Cap Rate = Annual NOI / Price
var capRate = (noiAnnual / price) * 100;
// Cash on Cash Return = Annual Cash Flow / Total Cash Invested
// Assuming closing costs are roughly 2% of price for estimation logic, or just use down payment if simple
// Let's use Down Payment to be strictly consistent with inputs
var totalCashInvested = downPaymentAmount;
var cashOnCash = 0;
if (totalCashInvested > 0) {
cashOnCash = (annualCashFlow / totalCashInvested) * 100;
}
// 4. Update DOM
// Format Currency Helper
var fmt = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' });
var fmtPct = new Intl.NumberFormat('en-US', { style: 'percent', minimumFractionDigits: 2 });
document.getElementById("monthlyCashFlow").innerText = fmt.format(monthlyCashFlow);
document.getElementById("cashOnCash").innerText = cashOnCash.toFixed(2) + "%";
document.getElementById("capRate").innerText = capRate.toFixed(2) + "%";
document.getElementById("effectiveIncome").innerText = fmt.format(effectiveIncome);
document.getElementById("mortgagePayment").innerText = fmt.format(monthlyMortgage);
document.getElementById("totalExpenses").innerText = fmt.format(operatingExpenses + vacancyCost); // Including vacancy in expenses display usually
// Color Coding
var cfElement = document.getElementById("monthlyCashFlow");
if (monthlyCashFlow >= 0) {
cfElement.classList.remove("negative");
cfElement.classList.add("positive");
} else {
cfElement.classList.remove("positive");
cfElement.classList.add("negative");
}
// Show results
document.getElementById("resultsSection").style.display = "block";
}