function calculateRental() {
// 1. Get Inputs
var price = parseFloat(document.getElementById("purchasePrice").value) || 0;
var downPercent = parseFloat(document.getElementById("downPaymentPercent").value) || 0;
var closing = parseFloat(document.getElementById("closingCosts").value) || 0;
var repairs = parseFloat(document.getElementById("repairCosts").value) || 0;
var rate = parseFloat(document.getElementById("interestRate").value) || 0;
var years = parseFloat(document.getElementById("loanTerm").value) || 30;
var rent = parseFloat(document.getElementById("monthlyRent").value) || 0;
var vacancy = parseFloat(document.getElementById("vacancyRate").value) || 0;
var tax = parseFloat(document.getElementById("annualTax").value) || 0;
var insurance = parseFloat(document.getElementById("annualInsurance").value) || 0;
var hoa = parseFloat(document.getElementById("monthlyHOA").value) || 0;
var maintPercent = parseFloat(document.getElementById("maintenancePercent").value) || 0;
// 2. Initial Calculations
var downPaymentAmount = price * (downPercent / 100);
var loanAmount = price – downPaymentAmount;
var totalCashInvested = downPaymentAmount + closing + repairs;
// Mortgage Calculation (Monthly P&I)
var monthlyRate = (rate / 100) / 12;
var numberOfPayments = years * 12;
var mortgagePayment = 0;
if (rate > 0) {
mortgagePayment = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) / (Math.pow(1 + monthlyRate, numberOfPayments) – 1);
} else {
mortgagePayment = loanAmount / numberOfPayments;
}
// Income Calculations
var vacancyLoss = rent * (vacancy / 100);
var effectiveIncome = rent – vacancyLoss;
// Expense Calculations
var monthlyTax = tax / 12;
var monthlyInsurance = insurance / 12;
var maintenanceCost = rent * (maintPercent / 100);
var totalOperatingExpenses = monthlyTax + monthlyInsurance + hoa + maintenanceCost;
var totalMonthlyExpenses = totalOperatingExpenses + mortgagePayment;
// Net Metrics
var monthlyCashFlow = effectiveIncome – totalMonthlyExpenses;
var annualCashFlow = monthlyCashFlow * 12;
var noi = (effectiveIncome – totalOperatingExpenses) * 12; // Net Operating Income (Annual)
// Returns
var coc = 0;
if (totalCashInvested > 0) {
coc = (annualCashFlow / totalCashInvested) * 100;
}
var capRate = 0;
if (price > 0) {
capRate = (noi / price) * 100;
}
// 3. Formatting Helper
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
});
// 4. Update DOM
document.getElementById("resTotalInvested").innerText = formatter.format(totalCashInvested);
document.getElementById("resMortgage").innerText = formatter.format(mortgagePayment);
document.getElementById("resTotalExpenses").innerText = formatter.format(totalMonthlyExpenses);
document.getElementById("resNOI").innerText = formatter.format(noi);
document.getElementById("resCapRate").innerText = capRate.toFixed(2) + "%";
document.getElementById("resCoc").innerText = coc.toFixed(2) + "%";
document.getElementById("resMonthlyCashflow").innerText = formatter.format(monthlyCashFlow);
// Show Results
document.getElementById("results").style.display = "block";
}
Understanding Your Rental Property Returns
Investing in real estate is one of the most reliable ways to build wealth, but simply buying a property and renting it out doesn't guarantee a profit. To succeed, investors must understand the specific metrics that determine the viability of a deal. This Rental Property Cash on Cash Return Calculator is designed to help you analyze potential investments by breaking down income, expenses, and debt service.
What is Cash on Cash Return?
Cash on Cash (CoC) Return is arguably the most important metric for rental property investors. Unlike Return on Investment (ROI), which might factor in equity paydown or appreciation, CoC strictly measures the annual pre-tax cash flow relative to the actual cash you invested.
The Formula: Cash on Cash Return = (Annual Pre-Tax Cash Flow / Total Cash Invested) × 100
For example, if you invest $50,000 cash (down payment + closing costs + repairs) and the property generates $5,000 in net cash flow per year, your CoC return is 10%.
Cap Rate vs. Cash on Cash
While this calculator provides both metrics, it is vital to know the difference:
Cap Rate (Capitalization Rate): Measures the property's natural rate of return assuming you bought it with 100% cash. It is calculated as Net Operating Income (NOI) / Purchase Price. It is useful for comparing the quality of the property itself, excluding your financing method.
Cash on Cash: Measures the return on your specific equity. This takes into account your mortgage. Leverage (borrowing money) typically allows for a higher CoC return than Cap Rate, assuming the interest rate is lower than the Cap Rate.
Key Inputs Explained
To get the most accurate result from the calculator above, ensure you account for "hidden" expenses:
Vacancy Rate: No property is occupied 365 days a year forever. A standard conservative estimate is 5% to 8% to account for turnover periods.
Maintenance Set Aside: Even if the house is new, things break. Prudent investors set aside 5% to 10% of monthly rent for future repairs (HVAC, roof, plumbing).
Total Cash Invested: Do not forget to include closing costs and immediate renovation budgets. These increase your denominator and lower your immediate return percentages, providing a more realistic view of your investment efficiency.
What is a "Good" Return?
Target returns vary by market and strategy. generally, a Cash on Cash return of 8% to 12% is considered healthy for a long-term buy-and-hold rental. In highly appreciating markets, investors might accept 4-6% cash flow, banking on future value increases. Conversely, in stable, low-appreciation markets, investors often demand 12%+ cash returns to justify the risk.