function calculateCapRate() {
// Clear previous error
var errorDiv = document.getElementById('errorDisplay');
var resultDiv = document.getElementById('results');
errorDiv.style.display = 'none';
// Get Inputs
var price = parseFloat(document.getElementById('purchasePrice').value);
var monthlyRent = parseFloat(document.getElementById('grossMonthlyRent').value);
var monthlyOther = parseFloat(document.getElementById('otherMonthlyIncome').value) || 0;
var vacancyRate = parseFloat(document.getElementById('vacancyRate').value) || 0;
var tax = parseFloat(document.getElementById('propertyTax').value) || 0;
var insurance = parseFloat(document.getElementById('insurance').value) || 0;
var maintenance = parseFloat(document.getElementById('maintenance').value) || 0;
var management = parseFloat(document.getElementById('managementFees').value) || 0;
var otherExp = parseFloat(document.getElementById('otherExpenses').value) || 0;
// Validation
if (isNaN(price) || price <= 0 || isNaN(monthlyRent) || monthlyRent < 0) {
errorDiv.innerText = "Please enter a valid Purchase Price and Monthly Rent.";
errorDiv.style.display = 'block';
resultDiv.style.display = 'none';
return;
}
// Calculations
// 1. Annual Gross Scheduled Income (GSI)
var annualGrossIncome = (monthlyRent + monthlyOther) * 12;
// 2. Vacancy Loss
var vacancyLoss = annualGrossIncome * (vacancyRate / 100);
// 3. Effective Gross Income (EGI)
var effectiveGrossIncome = annualGrossIncome – vacancyLoss;
// 4. Total Operating Expenses
var totalExpenses = tax + insurance + maintenance + management + otherExp;
// 5. Net Operating Income (NOI)
var noi = effectiveGrossIncome – totalExpenses;
// 6. Cap Rate
var capRate = (noi / price) * 100;
// Display Results
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
});
document.getElementById('displayGSI').innerText = formatter.format(annualGrossIncome);
document.getElementById('displayVacancy').innerText = "(" + formatter.format(vacancyLoss) + ")";
document.getElementById('displayEGI').innerText = formatter.format(effectiveGrossIncome);
document.getElementById('displayOpEx').innerText = "(" + formatter.format(totalExpenses) + ")";
document.getElementById('displayNOI').innerText = formatter.format(noi);
document.getElementById('displayCapRate').innerText = capRate.toFixed(2) + "%";
resultDiv.style.display = 'block';
}
What is a Cap Rate Calculator?
A Cap Rate Calculator (Capitalization Rate Calculator) is an essential tool for real estate investors to evaluate the profitability of an investment property. The Cap Rate represents the rate of return on a real estate investment property based on the income that the property is expected to generate.
Unlike simple ROI, the Cap Rate focuses specifically on the property's natural ability to generate income relative to its purchase price, assuming an all-cash purchase. This allows investors to compare different properties on an apples-to-apples basis, regardless of financing methods.
How to Calculate Cap Rate
The formula used in this calculator is industry-standard:
Cap Rate = (Net Operating Income / Current Market Value) × 100
To derive these figures, follow these steps:
Step 1: Calculate Gross Scheduled Income. This is the total annual rental income if the property were 100% occupied.
Step 2: Subtract Vacancy Losses. No property is occupied 100% of the time. Deduct a percentage (usually 5-10%) for vacancy.
Step 3: Calculate Net Operating Income (NOI). Subtract all annual operating expenses (taxes, insurance, management, maintenance) from the effective gross income. Note: Do not include mortgage payments in NOI calculations.
Step 4: Divide by Purchase Price. Divide the NOI by the property's price and multiply by 100 to get the percentage.
What is a "Good" Cap Rate?
There is no single "good" Cap Rate, as it depends heavily on the risk level and location of the property. However, here are general guidelines:
4% – 5%: Often found in high-demand, low-risk areas (Class A properties in major cities). These properties usually appreciate well but offer lower immediate cash flow.
6% – 8%: A balanced range often sought by investors in suburban markets. Offers a mix of stability and cash flow.
8% – 10%+: Higher risk properties or those in rural/declining areas. These offer high cash flow to offset the potential risk of tenants defaulting or lack of property appreciation.
Difference Between Cap Rate and Cash-on-Cash Return
While the Cap Rate measures the property's raw performance, Cash-on-Cash Return measures the return on the actual cash you invested (your down payment). If you are using a mortgage (leverage), your Cash-on-Cash return might differ significantly from the Cap Rate. Use the Cap Rate to screen properties and the Cash-on-Cash return to evaluate your specific financing scenario.