function calculateEquityYield() {
// Get input values
var initialEquity = parseFloat(document.getElementById('initialEquity').value);
var annualCashFlow = parseFloat(document.getElementById('annualCashFlow').value);
var equityReversion = parseFloat(document.getElementById('equityReversion').value);
var holdingPeriod = parseInt(document.getElementById('holdingPeriod').value);
// Validation
if (isNaN(initialEquity) || isNaN(annualCashFlow) || isNaN(equityReversion) || isNaN(holdingPeriod)) {
alert("Please enter valid numbers in all fields.");
return;
}
if (initialEquity <= 0 || holdingPeriod <= 0) {
alert("Initial investment and holding period must be greater than zero.");
return;
}
// Construct Cash Flow Array
// CF0 is negative (outflow)
// CF1 to CF(n-1) is Annual Cash Flow
// CF(n) is Annual Cash Flow + Reversion (Sale Proceeds)
var cashFlows = [];
cashFlows.push(-initialEquity); // Year 0
for (var i = 1; i < holdingPeriod; i++) {
cashFlows.push(annualCashFlow);
}
// Final year includes operation cash flow plus sale proceeds
cashFlows.push(annualCashFlow + equityReversion);
// Calculate IRR using numerical method (Newton-Raphson approximation)
var resultIRR = computeIRR(cashFlows);
// Display Result
var resultDiv = document.getElementById('eyResult');
var yieldDisplay = document.getElementById('yieldResultValue');
var periodDisplay = document.getElementById('periodDisplay');
resultDiv.style.display = 'block';
if (resultIRR === null) {
yieldDisplay.innerHTML = "Calculation Error (Diverged)";
yieldDisplay.style.color = "red";
} else {
var percentage = (resultIRR * 100).toFixed(2);
yieldDisplay.innerHTML = percentage + "%";
yieldDisplay.style.color = "#27ae60";
}
periodDisplay.innerHTML = holdingPeriod;
}
// Helper function to compute IRR
function computeIRR(cfs) {
var guess = 0.1; // Initial guess 10%
var maxIter = 1000;
var precision = 0.000001;
for (var i = 0; i < maxIter; i++) {
var npv = 0;
var d_npv = 0; // Derivative of NPV
for (var t = 0; t < cfs.length; t++) {
var val = cfs[t];
var denom = Math.pow(1 + guess, t);
npv += val / denom;
d_npv -= (t * val) / (denom * (1 + guess));
}
if (Math.abs(npv) < precision) {
return guess;
}
if (d_npv === 0) {
return null; // Avoid division by zero
}
var newGuess = guess – (npv / d_npv);
// Check for valid range (avoid huge negative rates causing overflow)
if (Math.abs(newGuess – guess) < precision) {
return newGuess;
}
guess = newGuess;
}
return null; // Failed to converge
}
Understanding Equity Yield Rate
The Equity Yield Rate (often synonymous with the Internal Rate of Return or IRR of the equity position) is a comprehensive metric used in real estate and private equity to determine the annualized return on the specific capital invested (equity), distinct from the return on the total asset value.
Unlike a simple "Cash-on-Cash" return, which only looks at a single year's dividend income, the Equity Yield Rate considers the time value of money and accounts for three distinct sources of profit:
Annual Cash Flow: The yearly net income (after debt service) distributed to the investor.
Principal Paydown: The increase in equity resulting from the amortization of any underlying loans.
Equity Appreciation: The profit realized upon the sale of the asset (reversion), captured in the net proceeds.
How It Is Calculated
The calculation typically requires an iterative process (such as the Newton-Raphson method used in this calculator) because there is no simple linear algebraic formula to solve for the rate. The formula seeks to find the discount rate ($r$) that sets the Net Present Value (NPV) of all future equity cash flows equal to zero:
Equity Yield Rate is critical for comparing investments with different holding periods and cash flow structures. For example, a property with low annual cash flow but high appreciation potential might have the same Equity Yield Rate as a property with high cash flow but zero appreciation. This metric allows investors to compare "apples to apples" across different asset classes.
Key Inputs Defined
Initial Equity Investment: The actual cash down payment plus closing costs. Do not include the loan amount.
Annual Cash Flow to Equity: The Net Operating Income (NOI) minus Debt Service. This is the pre-tax cash actually put in your pocket.
Net Equity Proceeds from Sale: The estimated sale price at the end of the holding period minus the remaining mortgage balance and selling costs.