The capitalization rate, or cap rate, is a key metric used in commercial real estate to estimate the potential rate of return on an investment property. It's calculated by dividing the Net Operating Income (NOI) of a property by its current market value or purchase price. A higher cap rate generally indicates a potentially higher return, while a lower cap rate suggests a lower return but potentially lower risk.
function calculateCapRate() {
var noiInput = document.getElementById("netOperatingIncome");
var valueInput = document.getElementById("propertyValue");
var resultDiv = document.getElementById("result");
var noi = parseFloat(noiInput.value);
var value = parseFloat(valueInput.value);
if (isNaN(noi) || isNaN(value)) {
resultDiv.innerHTML = "Please enter valid numbers for all fields.";
return;
}
if (value <= 0) {
resultDiv.innerHTML = "Property value must be greater than zero.";
return;
}
var capRate = (noi / value) * 100;
resultDiv.innerHTML = "