Capitalization Rate (Cap Rate) Calculator
The Capitalization Rate, or Cap Rate, is a key metric used in real estate investment to estimate the potential return on an investment property. It represents the ratio between the Net Operating Income (NOI) of a property and its market value (or purchase price).
A higher cap rate generally indicates a potentially higher return relative to the property's price, suggesting it might be a better investment. Conversely, a lower cap rate may imply a lower return for the given price, or it could suggest a stable, less risky investment in a desirable area.
Calculate Cap Rate
function calculateCapRate() {
var noi = parseFloat(document.getElementById("netOperatingIncome").value);
var value = parseFloat(document.getElementById("propertyValue").value);
var resultDiv = document.getElementById("result");
var capRateResultDisplay = document.getElementById("capRateResult");
if (isNaN(noi) || isNaN(value)) {
capRateResultDisplay.innerHTML = "Please enter valid numbers for both NOI and Property Value.";
resultDiv.style.display = "block";
return;
}
if (value <= 0) {
capRateResultDisplay.innerHTML = "Property Value must be greater than zero.";
resultDiv.style.display = "block";
return;
}
var capRate = (noi / value) * 100;
capRateResultDisplay.innerHTML = "The Cap Rate is: " + capRate.toFixed(2) + "%";
resultDiv.style.display = "block";
}
.calculator-container {
font-family: sans-serif;
border: 1px solid #ccc;
padding: 20px;
border-radius: 8px;
max-width: 600px;
margin: 20px auto;
background-color: #f9f9f9;
}
.calculator-container h2 {
text-align: center;
color: #333;
margin-bottom: 15px;
}
.calculator-container p {
color: #555;
line-height: 1.6;
margin-bottom: 15px;
}
.calculator-inputs {
display: flex;
flex-direction: column;
gap: 15px;
margin-bottom: 20px;
}
.input-group {
display: flex;
flex-direction: column;
}
.input-group label {
margin-bottom: 8px;
font-weight: bold;
color: #444;
}
.input-group input {
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 1rem;
}
.input-group span {
font-size: 0.85em;
color: #777;
margin-top: 5px;
}
.calculator-container button {
display: block;
width: 100%;
padding: 12px 20px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
font-size: 1.1rem;
cursor: pointer;
transition: background-color 0.3s ease;
margin-bottom: 20px;
}
.calculator-container button:hover {
background-color: #0056b3;
}
.calculator-result {
background-color: #e9ecef;
padding: 15px;
border-radius: 5px;
border: 1px solid #ced4da;
text-align: center;
display: none; /* Initially hidden */
}
.calculator-result h3 {
margin-top: 0;
color: #333;
margin-bottom: 10px;
}
.calculator-result p {
font-size: 1.2rem;
font-weight: bold;
color: #28a745;
margin-bottom: 0;
}