Analyze cash flow, Cap Rate, and Cash on Cash Return instantly.
$
%
%
$
$
Monthly Mortgage Payment (P&I):$0.00
Total Monthly Expenses:$0.00
Net Operating Income (Annual):$0.00
Monthly Cash Flow:$0.00
Cap Rate:0.00%
Cash on Cash Return:0.00%
function calculateROI() {
// Get Inputs
var price = parseFloat(document.getElementById('purchasePrice').value);
var downPct = parseFloat(document.getElementById('downPayment').value);
var interest = parseFloat(document.getElementById('interestRate').value);
var term = parseFloat(document.getElementById('loanTerm').value);
var rent = parseFloat(document.getElementById('monthlyRent').value);
var expenses = parseFloat(document.getElementById('monthlyExpenses').value);
// Validation
if (isNaN(price) || isNaN(downPct) || isNaN(interest) || isNaN(term) || isNaN(rent) || isNaN(expenses)) {
alert("Please enter valid numbers in all fields.");
return;
}
// Calculations
var downPaymentAmount = price * (downPct / 100);
var loanAmount = price – downPaymentAmount;
// Mortgage P&I Calculation (M = P [ i(1 + i)^n ] / [ (1 + i)^n – 1 ])
var monthlyRate = (interest / 100) / 12;
var numPayments = term * 12;
var mortgagePayment = 0;
if (interest > 0) {
mortgagePayment = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numPayments)) / (Math.pow(1 + monthlyRate, numPayments) – 1);
} else {
mortgagePayment = loanAmount / numPayments;
}
// Cash Flow Logic
var totalMonthlyExpenses = mortgagePayment + expenses;
var monthlyCashFlow = rent – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
// NOI (Net Operating Income) = (Rent – Operating Expenses) * 12.
// Note: Mortgage P&I is NOT an operating expense for NOI, but Tax/HOA/Repairs (in 'expenses') are.
var annualNOI = (rent – expenses) * 12;
// Cap Rate = NOI / Purchase Price
var capRate = (annualNOI / price) * 100;
// Cash on Cash Return = Annual Pre-Tax Cash Flow / Total Cash Invested
// Assuming Closing costs are roughly 2% of price for realistic estimation, or just use downpayment for simplicity.
// We will use just downPaymentAmount to keep it simple unless we added a closing cost field.
var cocReturn = (annualCashFlow / downPaymentAmount) * 100;
// Display Results
document.getElementById('resMortgage').innerText = "$" + mortgagePayment.toFixed(2);
document.getElementById('resTotalExp').innerText = "$" + totalMonthlyExpenses.toFixed(2);
document.getElementById('resNOI').innerText = "$" + annualNOI.toFixed(2);
var cfEl = document.getElementById('resCashFlow');
cfEl.innerText = "$" + monthlyCashFlow.toFixed(2);
cfEl.style.color = monthlyCashFlow >= 0 ? "#27ae60" : "#c0392b";
document.getElementById('resCapRate').innerText = capRate.toFixed(2) + "%";
var cocEl = document.getElementById('resCoC');
cocEl.innerText = cocReturn.toFixed(2) + "%";
cocEl.style.color = cocReturn >= 0 ? "#27ae60" : "#c0392b";
// Show result div
document.getElementById('results').style.display = "block";
}
Understanding Rental Property Metrics
Investing in real estate requires more than just guessing if the rent covers the mortgage. Professional investors rely on specific key performance indicators (KPIs) to evaluate the profitability of a rental property. This calculator helps you determine the three most critical metrics: Cash Flow, Cap Rate, and Cash on Cash Return.
1. Monthly Cash Flow
Cash Flow is the net amount of money left over each month after all expenses are paid. This includes your mortgage principal and interest, taxes, insurance, HOA fees, and maintenance set-asides.
Positive Cash Flow: The property generates income for you every month.
Negative Cash Flow: You are paying out of pocket to hold the property.
2. Capitalization Rate (Cap Rate)
The Cap Rate measures the natural rate of return on the property independent of debt. It is calculated by dividing the Net Operating Income (NOI) by the property's purchase price. It allows you to compare the profitability of a property purchased with cash versus other investment vehicles.
Formula: Cap Rate = (Annual NOI / Purchase Price) x 100
3. Cash on Cash Return (CoC)
The Cash on Cash Return is arguably the most important metric for investors using leverage (loans). It calculates the return on the actual cash you invested (Down Payment), rather than the total value of the home. This tells you how hard your money is working for you.
A "good" CoC return varies by market, but many investors look for returns between 8% and 12% to justify the risk of real estate ownership compared to the stock market.
How to Use This Calculator
Input your purchase price, down payment percentage, and loan details to estimate your mortgage. Then, input your expected monthly rent and total monthly operating expenses (excluding the mortgage). The calculator will instantly break down the financial health of the deal.