function calculateRentalROI() {
// Get Inputs
var price = parseFloat(document.getElementById('rp_price').value);
var downPayment = parseFloat(document.getElementById('rp_down_payment').value);
var closingCosts = parseFloat(document.getElementById('rp_closing_costs').value);
var interestRate = parseFloat(document.getElementById('rp_interest_rate').value);
var loanTerm = parseFloat(document.getElementById('rp_loan_term').value);
var monthlyRent = parseFloat(document.getElementById('rp_rent').value);
var monthlyExpenses = parseFloat(document.getElementById('rp_expenses').value);
// Validation
if (isNaN(price) || isNaN(downPayment) || isNaN(closingCosts) || isNaN(interestRate) || isNaN(loanTerm) || isNaN(monthlyRent) || isNaN(monthlyExpenses)) {
alert("Please fill in all fields with valid numbers.");
return;
}
// Mortgage Calculation
var loanAmount = price – downPayment;
var monthlyRate = (interestRate / 100) / 12;
var numberOfPayments = loanTerm * 12;
var mortgagePayment = 0;
if (interestRate === 0) {
mortgagePayment = loanAmount / numberOfPayments;
} else {
mortgagePayment = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) / (Math.pow(1 + monthlyRate, numberOfPayments) – 1);
}
// Cash Flow Calculations
var totalMonthlyCost = mortgagePayment + monthlyExpenses;
var monthlyCashFlow = monthlyRent – totalMonthlyCost;
var annualCashFlow = monthlyCashFlow * 12;
// ROI Calculations
var totalCashInvested = downPayment + closingCosts;
var cocReturn = 0;
if (totalCashInvested > 0) {
cocReturn = (annualCashFlow / totalCashInvested) * 100;
}
// Cap Rate Calculation
// Net Operating Income (NOI) = (Monthly Rent – Monthly Operating Expenses) * 12
// Note: Mortgage is NOT included in NOI for Cap Rate
var noi = (monthlyRent – monthlyExpenses) * 12;
var capRate = 0;
if (price > 0) {
capRate = (noi / price) * 100;
}
// Display Results
document.getElementById('res_mortgage').innerText = formatCurrency(mortgagePayment);
document.getElementById('res_total_expenses').innerText = formatCurrency(totalMonthlyCost);
var cfElement = document.getElementById('res_cash_flow');
cfElement.innerText = formatCurrency(monthlyCashFlow);
if(monthlyCashFlow < 0) { cfElement.classList.add('negative'); } else { cfElement.classList.remove('negative'); }
var annualCfElement = document.getElementById('res_annual_cash_flow');
annualCfElement.innerText = formatCurrency(annualCashFlow);
if(annualCashFlow < 0) { annualCfElement.classList.add('negative'); } else { annualCfElement.classList.remove('negative'); }
document.getElementById('res_total_invested').innerText = formatCurrency(totalCashInvested);
var cocElement = document.getElementById('res_coc_return');
cocElement.innerText = cocReturn.toFixed(2) + "%";
if(cocReturn < 0) { cocElement.classList.add('negative'); } else { cocElement.classList.remove('negative'); }
document.getElementById('res_cap_rate').innerText = capRate.toFixed(2) + "%";
// Show result box
document.getElementById('rp_result_box').style.display = "block";
}
function formatCurrency(num) {
return "$" + num.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
}
Understanding Rental Property 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. To succeed, investors must rigorously analyze the numbers before signing on the dotted line. This Rental Property Cash Flow Calculator helps you determine two critical metrics: Cash on Cash Return and Monthly Cash Flow.
What is Cash on Cash Return?
Cash on Cash (CoC) Return is a percentage that measures the annual return on the actual cash you invested in the property. Unlike the Cap Rate, which looks at the property's performance without considering the mortgage, CoC specifically accounts for financing.
Formula: Cash on Cash Return = (Annual Pre-Tax Cash Flow / Total Cash Invested) x 100
For example, if you invest $50,000 (down payment + closing costs) and the property generates $5,000 in positive cash flow per year after all expenses and mortgage payments, your Cash on Cash return is 10%.
Why is Monthly Cash Flow Important?
Cash flow is the net income from the property after all operating expenses and mortgage payments have been made. Positive cash flow ensures that the property pays for itself and provides you with passive income. Negative cash flow means you are losing money every month to hold the asset.
Inputs Explained
Purchase Price: The agreed-upon price to buy the property.
Down Payment: The cash amount you pay upfront (usually 20-25% for investment properties).
Closing Costs & Rehab: Fees paid at closing plus any immediate repair costs required to make the unit rentable.
Monthly Expenses: This should include Property Taxes, Insurance, HOA fees, Property Management fees, and a budget for Maintenance/Repairs (typically 5-10% of rent).
Cap Rate vs. Cash on Cash Return
While this calculator provides both, they serve different purposes:
Cap Rate (Capitalization Rate): Measures the natural return of the property as if you bought it with 100% cash. It is useful for comparing the quality of different properties.
Cash on Cash Return: Measures the efficiency of your specific investment capital using leverage (the mortgage). This is often the more important metric for investors using financing.
Example Calculation
Let's say you are looking at a single-family home:
Purchase Price: $200,000
Down Payment: $50,000 (25%)
Closing Costs: $5,000
Loan: 30-year fixed at 6.5%
Rent: $1,800/month
Expenses: $600/month (Taxes, Insurance, Repairs)
Using the calculator above, your total monthly cost (Mortgage + Expenses) would be roughly $1,548. Your Monthly Cash Flow would be roughly $252, and your Cash on Cash Return would be approximately 5.5%.