function calculateCapRate() {
// Get inputs using var
var priceInput = document.getElementById("propertyPrice");
var rentInput = document.getElementById("monthlyRent");
var expensesInput = document.getElementById("annualExpenses");
var resultBox = document.getElementById("result");
var capRateDisplay = document.getElementById("capRateOutput");
var noiDisplay = document.getElementById("noiOutput");
// Parse values
var price = parseFloat(priceInput.value);
var monthlyRent = parseFloat(rentInput.value);
var annualExpenses = parseFloat(expensesInput.value);
// Validation
if (isNaN(price) || isNaN(monthlyRent) || isNaN(annualExpenses)) {
alert("Please enter valid numbers for all fields.");
return;
}
if (price <= 0) {
alert("Property Price must be greater than zero.");
return;
}
// Calculations
var annualGrossIncome = monthlyRent * 12;
var netOperatingIncome = annualGrossIncome – annualExpenses;
var capRate = (netOperatingIncome / price) * 100;
// Display Results
resultBox.style.display = "block";
// Format numbers currency and percentage
capRateDisplay.innerHTML = capRate.toFixed(2) + "%";
noiDisplay.innerHTML = "Net Operating Income (NOI): $" + netOperatingIncome.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
// Change color based on yield (simple visual cue)
if(capRate = 4 && capRate < 8) {
capRateDisplay.style.color = "#f39c12"; // Orange for moderate
} else {
capRateDisplay.style.color = "#27ae60"; // Green for high
}
}
What is Capitalization Rate (Cap Rate)?
The Capitalization Rate, or "Cap Rate," is widely regarded as the most critical metric for evaluating the profitability of a real estate investment. It represents the ratio between the Net Operating Income (NOI) produced by an asset and its current market value or purchase price.
Unlike simple "Cash on Cash" return, the Cap Rate ignores financing (mortgage debt). This makes it a pure measure of the property's natural ability to generate a return, allowing investors to compare different properties on an apples-to-apples basis regardless of how they were bought.
How is Cap Rate Calculated?
The formula for calculating Cap Rate is relatively straightforward:
Cap Rate = (Net Operating Income / Property Value) × 100
Net Operating Income (NOI): This is your annual revenue (rent) minus all necessary operating expenses (taxes, insurance, maintenance, property management, and vacancy costs). It does not include mortgage payments.
Property Value: The current market value of the property or the price you intend to pay for it.
Real Estate Investment Example
Imagine you are looking to buy a duplex listed for $500,000.
Gross Income: The two units rent for $2,250 each, totaling $4,500/month ($54,000/year).
Operating Expenses: Property taxes, insurance, and maintenance cost $15,000 per year.
Step 2 (Calculate Cap Rate): ($39,000 / $500,000) = 0.078.
Result: This property has a 7.8% Cap Rate.
What is a "Good" Cap Rate?
There is no single number that defines a "good" cap rate, as it depends heavily on the location, asset class, and current interest rates. Generally speaking:
4% to 5%: Common in high-demand "Class A" areas (like NYC or San Francisco) where appreciation potential is high but immediate cash flow is lower.
6% to 8%: Often considered a healthy balance for residential rental properties in stable suburban markets.
8% to 12%+: Typically found in riskier neighborhoods or rural areas where the property price is low compared to the rent, but vacancy risks or maintenance issues may be higher.
Use the calculator above to quickly assess deals. Remember, a higher cap rate implies a better annual return on your capital, but it often comes with higher risk.