.cap-rate-calculator {
font-family: sans-serif;
border: 1px solid #ccc;
padding: 20px;
border-radius: 8px;
max-width: 600px;
margin: 20px auto;
background-color: #f9f9f9;
}
.cap-rate-calculator h2 {
text-align: center;
color: #333;
margin-bottom: 20px;
}
.cap-rate-calculator label {
display: block;
margin-bottom: 8px;
font-weight: bold;
color: #555;
}
.cap-rate-calculator input[type="number"],
.cap-rate-calculator input[type="text"] {
width: calc(100% – 22px); /* Adjust for padding and border */
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box; /* Include padding and border in the element's total width and height */
}
.cap-rate-calculator button {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
display: block;
width: 100%;
margin-top: 10px;
}
.cap-rate-calculator button:hover {
background-color: #45a049;
}
.cap-rate-calculator .result {
margin-top: 20px;
padding: 15px;
border: 1px solid #ddd;
background-color: #e9e9e9;
border-radius: 4px;
text-align: center;
font-size: 1.1em;
color: #333;
}
.cap-rate-calculator .result span {
font-weight: bold;
color: #4CAF50;
}
.cap-rate-calculator .explanation {
margin-top: 30px;
font-size: 0.9em;
line-height: 1.5;
color: #666;
}
.cap-rate-calculator .explanation h3 {
margin-bottom: 10px;
color: #444;
}
function calculateCapRate() {
var propertyValue = parseFloat(document.getElementById("propertyValue").value);
var annualRentalIncome = parseFloat(document.getElementById("annualRentalIncome").value);
var annualOperatingExpenses = parseFloat(document.getElementById("annualOperatingExpenses").value);
// Validate inputs
if (isNaN(propertyValue) || propertyValue <= 0) {
document.getElementById("result").innerHTML = "Please enter a valid property purchase price.";
return;
}
if (isNaN(annualRentalIncome) || annualRentalIncome < 0) {
document.getElementById("result").innerHTML = "Please enter a valid annual gross rental income.";
return;
}
if (isNaN(annualOperatingExpenses) || annualOperatingExpenses < 0) {
document.getElementById("result").innerHTML = "Please enter valid annual operating expenses.";
return;
}
var netOperatingIncome = annualRentalIncome – annualOperatingExpenses;
if (netOperatingIncome < 0) {
document.getElementById("result").innerHTML = "Net Operating Income is negative. Cannot calculate Cap Rate with negative NOI.";
return;
}
var capRate = (netOperatingIncome / propertyValue) * 100;
document.getElementById("result").innerHTML = "Cap Rate: " + capRate.toFixed(2) + "%";
}
Rental Property Cap Rate Calculator
Your Cap Rate will appear here.
What is Cap Rate?
The Capitalization Rate, or Cap Rate, is a key metric used in real estate investing to estimate the potential rate of return on a property. It's particularly useful for comparing different investment properties. The formula for Cap Rate is:
Cap Rate = (Net Operating Income / Property Value) * 100
Where:
- Net Operating Income (NOI): This is the gross rental income from the property minus all reasonable operating expenses. It does NOT include mortgage payments, depreciation, or capital expenditures.
- Property Value: This is typically the purchase price of the property, or its current market value if you're assessing an existing investment.
A higher Cap Rate generally indicates a potentially better investment, as it suggests a higher return relative to the property's value. However, Cap Rates vary significantly by market and property type. It's important to compare the Cap Rate of a property to similar properties in the same area.