Analyze cash flow and cash-on-cash return for your real estate investment.
(Taxes, Insurance, HOA, Repairs)
Investment Analysis
Total Initial Investment:$0.00
Monthly Mortgage Payment:$0.00
Monthly Cash Flow:$0.00
Annual Cash Flow:$0.00
Cash-on-Cash Return (ROI):0.00%
function calculateROI() {
// Get Input Values
var purchasePrice = parseFloat(document.getElementById("purchasePrice").value);
var downPayment = parseFloat(document.getElementById("downPayment").value);
var closingCosts = parseFloat(document.getElementById("closingCosts").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var loanTerm = parseFloat(document.getElementById("loanTerm").value);
var monthlyRent = parseFloat(document.getElementById("monthlyRent").value);
var monthlyExpenses = parseFloat(document.getElementById("monthlyExpenses").value);
// Validation
if (isNaN(purchasePrice) || isNaN(downPayment) || isNaN(interestRate) || isNaN(loanTerm) || isNaN(monthlyRent)) {
alert("Please enter valid numbers in all fields.");
return;
}
// 1. Calculate Loan Details
var loanAmount = purchasePrice – downPayment;
var monthlyRate = (interestRate / 100) / 12;
var numberOfPayments = loanTerm * 12;
// Mortgage Calculation Formula: M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1 ]
var monthlyMortgage = 0;
if (monthlyRate > 0) {
monthlyMortgage = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) / (Math.pow(1 + monthlyRate, numberOfPayments) – 1);
} else {
monthlyMortgage = loanAmount / numberOfPayments;
}
// 2. Calculate Cash Flow
var totalMonthlyOutflow = monthlyMortgage + monthlyExpenses;
var monthlyCashFlow = monthlyRent – totalMonthlyOutflow;
var annualCashFlow = monthlyCashFlow * 12;
// 3. Calculate Cash on Cash Return
var totalInitialInvestment = downPayment + closingCosts;
var cocReturn = 0;
if (totalInitialInvestment > 0) {
cocReturn = (annualCashFlow / totalInitialInvestment) * 100;
}
// 4. Update UI
document.getElementById("resultsArea").style.display = "block";
// Formatting function for currency
var fmt = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' });
document.getElementById("resTotalInvestment").innerHTML = fmt.format(totalInitialInvestment);
document.getElementById("resMortgage").innerHTML = fmt.format(monthlyMortgage);
var mcfEl = document.getElementById("resMonthlyCashFlow");
mcfEl.innerHTML = fmt.format(monthlyCashFlow);
mcfEl.className = monthlyCashFlow >= 0 ? "roi-result-value roi-highlight" : "roi-result-value roi-highlight-negative";
var acfEl = document.getElementById("resAnnualCashFlow");
acfEl.innerHTML = fmt.format(annualCashFlow);
acfEl.className = annualCashFlow >= 0 ? "roi-result-value roi-highlight" : "roi-result-value roi-highlight-negative";
var cocEl = document.getElementById("resCoC");
cocEl.innerHTML = cocReturn.toFixed(2) + "%";
cocEl.className = cocReturn >= 0 ? "roi-result-value roi-highlight" : "roi-result-value roi-highlight-negative";
}
Mastering Rental Property Analysis: Cash Flow & ROI
Investing in real estate is one of the most reliable ways to build wealth, but simply buying a property doesn't guarantee a profit. Successful investors rely on accurate math to determine if a property is an asset or a liability. This Rental Property ROI Calculator is designed to help you analyze the two most critical metrics in real estate investing: Cash Flow and Cash-on-Cash Return.
What is Cash Flow?
Cash flow is the profit remaining after all expenses are paid. It is calculated by taking your gross monthly rent and subtracting all operating expenses and debt service (mortgage payments). Positive cash flow ensures that the property pays for itself and puts money in your pocket every month.
Gross Income: Total rent collected.
Operating Expenses: Property taxes, insurance, HOA fees, maintenance, and vacancy reserves.
Debt Service: Principal and interest payments on your loan.
Understanding Cash-on-Cash Return
While cash flow tells you how much money you make monthly, Cash-on-Cash Return (CoC) tells you how hard your money is working. It measures the annual return on the actual cash you invested, rather than the total purchase price of the property.
For example, if you invest $50,000 (down payment + closing costs) and the property generates $5,000 in net annual cash flow, your Cash-on-Cash return is 10%. This metric allows you to compare real estate returns directly against other investment vehicles like stocks or bonds.
How to Use This Calculator
To get the most accurate results, ensure you input realistic numbers for your expenses. Don't forget to account for:
Vacancy: Properties aren't rented 100% of the time. A standard conservative estimate is 5-8% of rent.
Repairs & CapEx: Roofs and water heaters eventually break. Budgeting 5-10% of rent for repairs is prudent.
Closing Costs: These typically range from 2-5% of the purchase price and affect your total initial investment.
Use the tool above to run different scenarios. Adjust the rental price or down payment to see how slight changes impact your bottom line and overall return on investment.