Investing in real estate is a powerful way to build wealth, but not every property is a good deal. This Rental Property Calculator helps you analyze the potential profitability of a real estate investment 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 money moving into and out of your rental business. Positive cash flow indicates that the property's liquid assets are increasing, allowing you to settle debts, reinvest in the business, and turn a profit. It is calculated as:
While Cap Rate measures the return on the property itself (as if you bought it with cash), Cash-on-Cash (CoC) Return measures the return on the actual cash you invested. This is critical for investors using leverage (mortgages). A CoC return of 8-12% is generally considered solid for rental properties, though this varies by market.
Hidden Expenses to Watch For
Many new investors fail because they underestimate expenses. Our calculator includes fields for:
Vacancy Rate: Properties won't be rented 100% of the time. Budgeting 5-8% helps account for turnover periods.
Maintenance: Roofs leak and toilets break. Setting aside 5-10% of monthly rent ensures you have funds for repairs.
Property Management: If you hire a manager, expect to pay 8-12% of the monthly rent.
Cap Rate vs. Cash-on-Cash
Cap Rate (Capitalization Rate) is calculated by dividing the Net Operating Income (NOI) by the property's value. It helps compare different properties without considering financing. Cash-on-Cash is specific to your financing structure and tells you how hard your specific dollars are working.
function calculateRentalROI() {
// 1. Get Input Values
var price = parseFloat(document.getElementById('rpcPrice').value) || 0;
var closingCosts = parseFloat(document.getElementById('rpcClosingCosts').value) || 0;
var downPct = parseFloat(document.getElementById('rpcDownPct').value) || 0;
var intRate = parseFloat(document.getElementById('rpcIntRate').value) || 0;
var loanTerm = parseFloat(document.getElementById('rpcLoanTerm').value) || 0;
var rent = parseFloat(document.getElementById('rpcRent').value) || 0;
var propTaxAnnual = parseFloat(document.getElementById('rpcPropTax').value) || 0;
var insuranceAnnual = parseFloat(document.getElementById('rpcInsurance').value) || 0;
var hoa = parseFloat(document.getElementById('rpcHOA').value) || 0;
var vacancyPct = parseFloat(document.getElementById('rpcVacancy').value) || 0;
var maintPct = parseFloat(document.getElementById('rpcMaint').value) || 0;
// 2. Calculate Loan Details
var downPaymentAmount = price * (downPct / 100);
var loanAmount = price – downPaymentAmount;
var totalCashInvested = downPaymentAmount + closingCosts;
// Mortgage Calculation (P&I)
var monthlyMortgage = 0;
if (loanAmount > 0 && loanTerm > 0) {
if (intRate === 0) {
monthlyMortgage = loanAmount / (loanTerm * 12);
} else {
var monthlyRate = (intRate / 100) / 12;
var numPayments = loanTerm * 12;
monthlyMortgage = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numPayments)) / (Math.pow(1 + monthlyRate, numPayments) – 1);
}
}
// 3. Calculate Monthly Expenses
var monthlyTax = propTaxAnnual / 12;
var monthlyIns = insuranceAnnual / 12;
var monthlyVacancyCost = rent * (vacancyPct / 100);
var monthlyMaintCost = rent * (maintPct / 100);
var operatingExpenses = monthlyTax + monthlyIns + hoa + monthlyVacancyCost + monthlyMaintCost;
var totalMonthlyExpenses = operatingExpenses + monthlyMortgage;
// 4. Calculate Key Metrics
var monthlyNOI = rent – operatingExpenses;
var annualNOI = monthlyNOI * 12;
var monthlyCashFlow = rent – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
var capRate = 0;
if (price > 0) {
capRate = (annualNOI / price) * 100;
}
var cashOnCash = 0;
if (totalCashInvested > 0) {
cashOnCash = (annualCashFlow / totalCashInvested) * 100;
}
// 5. Update UI
document.getElementById('rpcResults').style.display = 'block';
// Helper to format currency
function formatMoney(num) {
return '$' + num.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
}
// Helper to format percent
function formatPct(num) {
return num.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2}) + '%';
}
// Display Values
var cashFlowEl = document.getElementById('resCashFlow');
cashFlowEl.innerText = formatMoney(monthlyCashFlow);
if(monthlyCashFlow >= 0) {
cashFlowEl.style.color = "#38a169"; // Green
} else {
cashFlowEl.style.color = "#e53e3e"; // Red
}
var cocEl = document.getElementById('resCocRoi');
cocEl.innerText = formatPct(cashOnCash);
if(cashOnCash >= 0) {
cocEl.style.color = "#38a169";
} else {
cocEl.style.color = "#e53e3e";
}
document.getElementById('resNOI').innerText = formatMoney(annualNOI);
document.getElementById('resCapRate').innerText = formatPct(capRate);
document.getElementById('resCashNeeded').innerText = formatMoney(totalCashInvested);
document.getElementById('resMortgage').innerText = formatMoney(monthlyMortgage);
document.getElementById('resTotalExp').innerText = formatMoney(totalMonthlyExpenses);
}