Investing in real estate is one of the most popular ways to build long-term wealth. However, the difference between a good investment and a financial burden often comes down to the numbers. This Rental Property ROI Calculator is designed to help investors analyze the potential profitability of a residential rental property before signing on the dotted line.
Why Use This Calculator? accurately estimating your cash flow and return on investment (ROI) helps you avoid properties that cost more to operate than they generate in income.
Key Metrics Explained
When analyzing a rental property, there are three main metrics every investor should understand:
Cash Flow: This is the net amount of cash moving into or out of the investment each month. It is calculated by subtracting all operating expenses and mortgage payments from the rental income. Positive cash flow means the property is generating profit.
Cash on Cash ROI: This metric measures the annual return on the actual cash you invested (Down Payment + Closing Costs). It is often considered the most important metric for investors using leverage (mortgages).
Cap Rate (Capitalization Rate): This measures the property's natural rate of return without considering the mortgage. It is calculated by dividing the Net Operating Income (NOI) by the purchase price. It helps compare properties regardless of how they are financed.
How to Calculate Rental Yield
To calculate the returns manually, you can use the following steps which our calculator automates:
Determine Gross Income: Estimate the total annual rent.
Subtract Operating Expenses: Deduct taxes, insurance, maintenance, HOA fees, and vacancy costs to find the Net Operating Income (NOI).
Subtract Debt Service: If you have a loan, subtract the annual mortgage payments from the NOI to find your annual Cash Flow.
Calculate Returns: Divide your Annual Cash Flow by your Total Cash Investment to get your Cash on Cash Return percentage.
Example Scenario
Imagine purchasing a property for $250,000 with a 20% down payment ($50,000). Your monthly rent is $2,200. After accounting for a mortgage payment of roughly $1,200 and other expenses totaling $600, your monthly cash flow is $400.
That means $4,800 annual profit on a $58,000 investment (including closing costs), resulting in an 8.2% Cash on Cash ROI.
function calculateROI() {
// 1. Get Input Values
var price = parseFloat(document.getElementById('purchasePrice').value);
var downPayment = parseFloat(document.getElementById('downPayment').value);
var closingCosts = parseFloat(document.getElementById('closingCosts').value);
var rate = parseFloat(document.getElementById('interestRate').value);
var years = parseFloat(document.getElementById('loanTerm').value);
var rent = parseFloat(document.getElementById('monthlyRent').value);
var tax = parseFloat(document.getElementById('annualTaxes').value);
var insurance = parseFloat(document.getElementById('annualInsurance').value);
var maintenance = parseFloat(document.getElementById('monthlyMaintenance').value);
// 2. Validate Inputs
if (isNaN(price) || isNaN(downPayment) || isNaN(rent)) {
alert("Please enter valid numbers for Price, Down Payment, and Rent.");
return;
}
// Default zeroes for optional fields if empty
if (isNaN(closingCosts)) closingCosts = 0;
if (isNaN(rate)) rate = 0;
if (isNaN(years)) years = 30;
if (isNaN(tax)) tax = 0;
if (isNaN(insurance)) insurance = 0;
if (isNaN(maintenance)) maintenance = 0;
// 3. Calculate Mortgage
var loanAmount = price – downPayment;
var monthlyRate = rate / 100 / 12;
var totalPayments = years * 12;
var mortgagePayment = 0;
if (rate > 0 && loanAmount > 0) {
mortgagePayment = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, totalPayments)) / (Math.pow(1 + monthlyRate, totalPayments) – 1);
} else if (loanAmount > 0 && rate === 0) {
mortgagePayment = loanAmount / totalPayments;
}
// 4. Calculate Expenses & Cash Flow
var monthlyTax = tax / 12;
var monthlyInsurance = insurance / 12;
var totalMonthlyExpensesNoMortgage = monthlyTax + monthlyInsurance + maintenance;
var totalMonthlyCost = mortgagePayment + totalMonthlyExpensesNoMortgage;
var monthlyCashFlow = rent – totalMonthlyCost;
var annualCashFlow = monthlyCashFlow * 12;
var totalCashInvested = downPayment + closingCosts;
// 5. Calculate NOI & Cap Rate
var annualNOI = (rent * 12) – (totalMonthlyExpensesNoMortgage * 12);
var capRate = 0;
if (price > 0) {
capRate = (annualNOI / price) * 100;
}
// 6. Calculate Cash on Cash ROI
var cocROI = 0;
if (totalCashInvested > 0) {
cocROI = (annualCashFlow / totalCashInvested) * 100;
}
// 7. Format Output Function
function formatCurrency(num) {
return "$" + num.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
}
// 8. Display Results
document.getElementById('resMortgage').innerText = formatCurrency(mortgagePayment);
document.getElementById('resExpenses').innerText = formatCurrency(totalMonthlyCost);
var cashFlowElem = document.getElementById('resCashFlow');
cashFlowElem.innerText = formatCurrency(monthlyCashFlow);
if (monthlyCashFlow >= 0) {
cashFlowElem.className = "result-value highlight-result";
} else {
cashFlowElem.className = "result-value highlight-negative";
}
document.getElementById('resNOI').innerText = formatCurrency(annualNOI);
var roiElem = document.getElementById('resROI');
roiElem.innerText = cocROI.toFixed(2) + "%";
if (cocROI >= 0) {
roiElem.className = "result-value highlight-result";
} else {
roiElem.className = "result-value highlight-negative";
}
document.getElementById('resCapRate').innerText = capRate.toFixed(2) + "%";
// Show results container
document.getElementById('results').style.display = "block";
}