Rental Property Cash Flow & ROI Calculator
.roi-calculator-wrapper {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
max-width: 800px;
margin: 20px auto;
border: 1px solid #e0e0e0;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.05);
background: #ffffff;
overflow: hidden;
}
.roi-calc-header {
background: #2c3e50;
color: white;
padding: 20px;
text-align: center;
}
.roi-calc-header h2 {
margin: 0;
font-size: 24px;
}
.roi-calc-body {
padding: 25px;
display: flex;
flex-wrap: wrap;
gap: 20px;
}
.roi-input-section {
flex: 1;
min-width: 300px;
}
.roi-result-section {
flex: 1;
min-width: 300px;
background: #f8f9fa;
border-radius: 8px;
padding: 20px;
border: 1px solid #dee2e6;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: 600;
font-size: 14px;
color: #495057;
}
.form-group input {
width: 100%;
padding: 10px;
border: 1px solid #ced4da;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}
.form-group .input-wrapper {
position: relative;
}
.form-group .currency-symbol {
position: absolute;
left: 10px;
top: 50%;
transform: translateY(-50%);
color: #6c757d;
}
.form-group .percent-symbol {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
color: #6c757d;
}
.form-group input.has-currency {
padding-left: 25px;
}
.calc-btn {
width: 100%;
padding: 12px;
background: #28a745;
color: white;
border: none;
border-radius: 4px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
transition: background 0.3s;
margin-top: 10px;
}
.calc-btn:hover {
background: #218838;
}
.result-row {
display: flex;
justify-content: space-between;
padding: 12px 0;
border-bottom: 1px solid #e9ecef;
}
.result-row:last-child {
border-bottom: none;
}
.result-label {
color: #6c757d;
font-weight: 500;
}
.result-value {
font-weight: bold;
color: #2c3e50;
}
.highlight-result {
background: #e8f5e9;
padding: 10px;
border-radius: 4px;
margin-top: 5px;
border: 1px solid #c3e6cb;
}
.highlight-result .result-value {
color: #28a745;
font-size: 18px;
}
.roi-content {
padding: 25px;
border-top: 1px solid #e0e0e0;
line-height: 1.6;
color: #333;
}
.roi-content h3 {
color: #2c3e50;
margin-top: 25px;
}
.roi-content ul {
margin-bottom: 20px;
}
.roi-content li {
margin-bottom: 8px;
}
@media (max-width: 600px) {
.roi-calc-body {
flex-direction: column;
}
}
Investment Analysis
Monthly Income:
$0.00
Monthly Mortgage (P&I):
$0.00
Total Monthly Expenses:
$0.00
Monthly Cash Flow:
$0.00
Annual Net Operating Income (NOI):
$0.00
Cash on Cash Return:
0.00%
Cap Rate:
0.00%
How to Calculate Rental Property ROI
Understanding the return on investment (ROI) for a rental property is crucial for making informed real estate decisions. This calculator breaks down the financial performance of a potential property using three key metrics:
- Cash Flow: The net amount of cash moving in or out of the investment each month after all operating expenses and mortgage payments are made. Positive cash flow is essential for long-term sustainability.
- Cash on Cash Return (CoC): This metric calculates the annual cash return relative to the amount of cash you actually invested (Down Payment + Closing Costs). It is arguably the most important metric for investors using leverage.
- Cap Rate (Capitalization Rate): This measures the property's natural rate of return assuming you bought it with all cash. It helps compare the profitability of different properties regardless of financing method.
Real Estate Investment Calculation Example
Consider a property listed for $250,000. You make a down payment of $50,000 and pay $5,000 in closing costs. You secure a mortgage at 6.5% interest for 30 years.
If the property rents for $2,200/month and your total operating expenses (taxes, insurance, maintenance, vacancy) average $800/month, the calculator determines your Net Operating Income (NOI). After subtracting the mortgage payment, you see your "Cash on Cash Return." A CoC return above 8-10% is generally considered a strong performing asset in many markets, though this varies by location.
Why Vacancy and Repair Reserves Matter
Many new investors make the mistake of calculating ROI based solely on rent minus mortgage. However, real life involves vacancies and broken water heaters. This calculator allows you to set a percentage (typically 5-10%) to set aside for these inevitable costs, ensuring your profit projections are realistic.
function calculateRentalROI() {
// 1. Get Input Values
var price = parseFloat(document.getElementById('propPrice').value) || 0;
var down = parseFloat(document.getElementById('downPayment').value) || 0;
var closing = parseFloat(document.getElementById('closingCosts').value) || 0;
var rate = parseFloat(document.getElementById('interestRate').value) || 0;
var term = parseFloat(document.getElementById('loanTerm').value) || 0;
var rent = parseFloat(document.getElementById('monthlyRent').value) || 0;
var tax = parseFloat(document.getElementById('annualTax').value) || 0;
var insurance = parseFloat(document.getElementById('annualIns').value) || 0;
var hoa = parseFloat(document.getElementById('monthlyHoa').value) || 0;
var vacancyPct = parseFloat(document.getElementById('vacancyRate').value) || 0;
// 2. Calculate Mortgage (P&I)
var loanAmount = price – down;
var monthlyRate = (rate / 100) / 12;
var totalPayments = term * 12;
var mortgagePayment = 0;
if (loanAmount > 0 && monthlyRate > 0) {
mortgagePayment = loanAmount * (monthlyRate * Math.pow(1 + monthlyRate, totalPayments)) / (Math.pow(1 + monthlyRate, totalPayments) – 1);
} else if (loanAmount > 0 && monthlyRate === 0) {
mortgagePayment = loanAmount / totalPayments;
}
// 3. Calculate Monthly Operating Expenses
var monthlyTax = tax / 12;
var monthlyIns = insurance / 12;
var vacancyReserve = rent * (vacancyPct / 100);
// Operating Expenses (Excluding Mortgage)
var operatingExpenses = monthlyTax + monthlyIns + hoa + vacancyReserve;
// Total Expenses (Including Mortgage)
var totalExpenses = operatingExpenses + mortgagePayment;
// 4. Calculate Key Metrics
var monthlyCashFlow = rent – totalExpenses;
var annualCashFlow = monthlyCashFlow * 12;
// Net Operating Income (Annual) – Excludes debt service
var annualNOI = (rent * 12) – (operatingExpenses * 12);
// Cash on Cash Return
var totalCashInvested = down + closing;
var cocReturn = 0;
if (totalCashInvested > 0) {
cocReturn = (annualCashFlow / totalCashInvested) * 100;
}
// Cap Rate
var capRate = 0;
if (price > 0) {
capRate = (annualNOI / price) * 100;
}
// 5. Update HTML
document.getElementById('res_income').innerText = '$' + rent.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('res_mortgage').innerText = '$' + mortgagePayment.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('res_expenses').innerText = '$' + totalExpenses.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
var cfElement = document.getElementById('res_cashflow');
cfElement.innerText = '$' + monthlyCashFlow.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
// Style Cashflow Color
if(monthlyCashFlow >= 0) {
cfElement.style.color = "#28a745";
} else {
cfElement.style.color = "#dc3545";
}
document.getElementById('res_noi').innerText = '$' + annualNOI.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('res_coc').innerText = cocReturn.toFixed(2) + '%';
document.getElementById('res_cap').innerText = capRate.toFixed(2) + '%';
}
// Run once on load to populate example data
window.onload = function() {
calculateRentalROI();
};