Capitalization Rate (Cap Rate) Calculator
The Capitalization Rate (Cap Rate) is a key metric used in real estate investment to estimate the potential rate of return on a real estate investment property. It is calculated by dividing the property's Net Operating Income (NOI) by its current market value or purchase price. A higher cap rate generally indicates a more attractive investment, suggesting a higher potential return relative to the property's cost.
function calculateCapRate() {
var noiInput = document.getElementById("netOperatingIncome");
var propertyValueInput = document.getElementById("propertyValue");
var capRateResultDiv = document.getElementById("capRateResult");
var noi = parseFloat(noiInput.value);
var propertyValue = parseFloat(propertyValueInput.value);
if (isNaN(noi) || isNaN(propertyValue) || propertyValue <= 0) {
capRateResultDiv.innerHTML = "Please enter valid numbers for NOI and Property Value. Property Value cannot be zero or negative.";
return;
}
var capRate = (noi / propertyValue) * 100;
capRateResultDiv.innerHTML = "
Capitalization Rate (Cap Rate): " + capRate.toFixed(2) + "%";
}
.calculator-container {
font-family: sans-serif;
border: 1px solid #ccc;
padding: 20px;
border-radius: 8px;
max-width: 500px;
margin: 20px auto;
background-color: #f9f9f9;
}
.calculator-container h2 {
text-align: center;
margin-bottom: 20px;
color: #333;
}
.calculator-container p {
line-height: 1.6;
color: #555;
margin-bottom: 20px;
}
.inputs-section {
margin-bottom: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #444;
}
.form-group input[type="number"] {
width: calc(100% – 22px);
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
.calculator-container button {
display: block;
width: 100%;
padding: 12px 20px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
}
.calculator-container button:hover {
background-color: #45a049;
}
.results-section {
margin-top: 20px;
border-top: 1px solid #eee;
padding-top: 15px;
}
.results-section h3 {
margin-bottom: 10px;
color: #333;
}
#capRateResult p {
font-size: 1.1em;
font-weight: bold;
color: #2c3e50;
}