The capitalization rate, or "cap rate," is a key metric used in commercial real estate to estimate the potential 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.
function calculateCapRate() {
var noi = parseFloat(document.getElementById("netOperatingIncome").value);
var propertyValue = parseFloat(document.getElementById("propertyValue").value);
var resultDiv = document.getElementById("result");
if (isNaN(noi) || isNaN(propertyValue) || propertyValue === 0) {
resultDiv.innerHTML = "Please enter valid numbers for Net Operating Income and Property Value, and ensure Property Value is not zero.";
return;
}
var capRate = (noi / propertyValue) * 100;
resultDiv.innerHTML = "