Dcf Valuation Calculator

DCF Valuation Calculator

function calculateDCF() { var currentFCF = parseFloat(document.getElementById("currentFCF").value); var forecastYears = parseInt(document.getElementById("forecastYears").value); var fcfGrowthRate = parseFloat(document.getElementById("fcfGrowthRate").value) / 100; var perpetualGrowthRate = parseFloat(document.getElementById("perpetualGrowthRate").value) / 100; var discountRate = parseFloat(document.getElementById("discountRate").value) / 100; var netDebt = parseFloat(document.getElementById("netDebt").value); var cashEquivalents = parseFloat(document.getElementById("cashEquivalents").value); var sharesOutstanding = parseFloat(document.getElementById("sharesOutstanding").value); if (isNaN(currentFCF) || isNaN(forecastYears) || isNaN(fcfGrowthRate) || isNaN(perpetualGrowthRate) || isNaN(discountRate) || isNaN(netDebt) || isNaN(cashEquivalents) || isNaN(sharesOutstanding) || sharesOutstanding <= 0) { document.getElementById("dcfResult").innerHTML = "Please enter valid numerical values for all fields and ensure Shares Outstanding is greater than zero."; return; } if (discountRate <= perpetualGrowthRate) { document.getElementById("dcfResult").innerHTML = "Discount Rate (WACC) must be greater than the Perpetual Growth Rate for the Terminal Value calculation to be valid."; return; } var projectedFCFs = []; var pvExplicitFCFs = 0; var currentYearFCF = currentFCF; var resultHTML = "

DCF Valuation Results:

"; resultHTML += "

Projected Free Cash Flows (FCF) & Present Values:

"; resultHTML += ""; for (var i = 1; i <= forecastYears; i++) { currentYearFCF *= (1 + fcfGrowthRate); projectedFCFs.push(currentYearFCF); var discountFactor = Math.pow((1 + discountRate), i); var pvOfFCF = currentYearFCF / discountFactor; pvExplicitFCFs += pvOfFCF; resultHTML += ""; } resultHTML += "
YearProjected FCFDiscount FactorPV of FCF
" + i + "$" + currentYearFCF.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) + "" + discountFactor.toLocaleString(undefined, {minimumFractionDigits: 4, maximumFractionDigits: 4}) + "$" + pvOfFCF.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) + "
"; resultHTML += "Sum of Present Values of Explicit FCFs: $" + pvExplicitFCFs.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) + ""; // Calculate Terminal Value var fcfYearNPlus1 = projectedFCFs[forecastYears – 1] * (1 + perpetualGrowthRate); var terminalValue = fcfYearNPlus1 / (discountRate – perpetualGrowthRate); var pvTerminalValue = terminalValue / Math.pow((1 + discountRate), forecastYears); resultHTML += "Terminal Value (at end of forecast period): $" + terminalValue.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) + ""; resultHTML += "Present Value of Terminal Value: $" + pvTerminalValue.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) + ""; // Calculate Enterprise Value var enterpriseValue = pvExplicitFCFs + pvTerminalValue; resultHTML += "Enterprise Value (EV): $" + enterpriseValue.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) + ""; // Calculate Equity Value var equityValue = enterpriseValue – netDebt + cashEquivalents; resultHTML += "Equity Value: $" + equityValue.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) + ""; // Calculate Per Share Value var perShareValue = equityValue / sharesOutstanding; resultHTML += "Per Share Value: $" + perShareValue.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) + ""; document.getElementById("dcfResult").innerHTML = resultHTML; } .calculator-container { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f9f9f9; padding: 25px; border-radius: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); max-width: 600px; margin: 30px auto; border: 1px solid #e0e0e0; } .calculator-container h2 { text-align: center; color: #2c3e50; margin-bottom: 25px; font-size: 1.8em; } .calc-input-group { margin-bottom: 15px; display: flex; flex-direction: column; } .calc-input-group label { margin-bottom: 7px; color: #34495e; font-size: 1em; font-weight: bold; } .calc-input-group input[type="number"] { padding: 10px 12px; border: 1px solid #ccc; border-radius: 5px; font-size: 1em; width: 100%; box-sizing: border-box; transition: border-color 0.3s ease; } .calc-input-group input[type="number"]:focus { border-color: #007bff; outline: none; box-shadow: 0 0 5px rgba(0, 123, 255, 0.2); } .calculate-button { display: block; width: 100%; padding: 12px 20px; background-color: #28a745; color: white; border: none; border-radius: 5px; font-size: 1.1em; cursor: pointer; transition: background-color 0.3s ease, transform 0.2s ease; margin-top: 20px; } .calculate-button:hover { background-color: #218838; transform: translateY(-2px); } .calculate-button:active { background-color: #1e7e34; transform: translateY(0); } .calc-result { margin-top: 30px; padding: 20px; background-color: #e9f7ef; border: 1px solid #d4edda; border-radius: 8px; color: #155724; font-size: 1.1em; line-height: 1.6; } .calc-result h3 { color: #2c3e50; margin-top: 0; margin-bottom: 15px; font-size: 1.5em; text-align: center; } .calc-result h4 { color: #34495e; margin-top: 20px; margin-bottom: 10px; font-size: 1.2em; } .calc-result p { margin-bottom: 8px; } .calc-result table { width: 100%; border-collapse: collapse; margin-top: 15px; margin-bottom: 20px; background-color: #ffffff; box-shadow: 0 2px 8px rgba(0,0,0,0.05); } .calc-result table th, .calc-result table td { border: 1px solid #ddd; padding: 10px; text-align: right; } .calc-result table th { background-color: #f2f2f2; font-weight: bold; color: #333; text-align: center; } .calc-result table tr:nth-child(even) { background-color: #f8f8f8; } .calc-result table tr:hover { background-color: #f1f1f1; }

Understanding the Discounted Cash Flow (DCF) Valuation Method

The Discounted Cash Flow (DCF) method is a widely used valuation technique that estimates the value of an investment based on its expected future cash flows. The core principle behind DCF is that an asset is worth the sum of its future cash flows, discounted back to the present day to account for the time value of money and risk.

How DCF Valuation Works

A DCF analysis typically involves several key steps:

  1. Project Free Cash Flows (FCF): The first step is to forecast the company's Free Cash Flow (FCF) for a specific period, usually 5 to 10 years. FCF represents the cash a company generates after accounting for cash outflows to support its operations and maintain its capital assets. It's the cash available to all capital providers (debt and equity).
  2. Determine the Discount Rate: Future cash flows are worth less than present cash flows due to inflation, opportunity cost, and risk. The discount rate, often the Weighted Average Cost of Capital (WACC), is used to bring these future cash flows back to their present value. WACC reflects the average rate of return a company expects to pay to all its security holders (debt and equity).
  3. Calculate Terminal Value (TV): After the explicit forecast period, it becomes difficult to project FCFs with accuracy. Therefore, a Terminal Value is calculated to represent the value of all cash flows beyond the explicit forecast period. The most common method for calculating TV is the Gordon Growth Model, which assumes a constant growth rate into perpetuity.
  4. Discount Future Cash Flows and Terminal Value: Each year's projected FCF and the Terminal Value are discounted back to the present using the chosen discount rate (WACC).
  5. Calculate Enterprise Value: The sum of the present values of the explicit forecast period's FCFs and the present value of the Terminal Value gives you the Enterprise Value (EV) of the company. This represents the total value of the company, including both debt and equity.
  6. Calculate Equity Value and Per Share Value: To arrive at the Equity Value, Net Debt (Total Debt – Cash & Equivalents) is subtracted from the Enterprise Value. Finally, dividing the Equity Value by the number of Shares Outstanding yields the Per Share Value, which is the intrinsic value per share of the company's stock.

Key Inputs Explained:

  • Current Free Cash Flow (FCF0): The starting point for your cash flow projections. This is typically the most recent year's FCF.
  • Explicit Forecast Period (Years): The number of years for which you will explicitly project the company's FCF. Longer periods can increase accuracy but also uncertainty.
  • FCF Growth Rate (Explicit Period): The assumed annual growth rate for the company's free cash flows during the explicit forecast period. This should reflect the company's business prospects and industry trends.
  • Perpetual Growth Rate (Terminal Value): The assumed constant growth rate of FCFs into perpetuity after the explicit forecast period. This rate should be sustainable and typically lower than the explicit growth rate, often aligning with long-term GDP growth or inflation.
  • Discount Rate (WACC): The rate used to discount future cash flows. It represents the cost of financing a company's assets and is a blend of the cost of equity and the after-tax cost of debt.
  • Net Debt: The total debt of the company minus its cash and cash equivalents. This is used to transition from Enterprise Value to Equity Value.
  • Cash & Equivalents: Highly liquid assets that can be readily converted into cash. Added back to Enterprise Value to get Equity Value.
  • Shares Outstanding: The total number of a company's shares currently held by all its shareholders. Used to calculate the per-share value.

Example Calculation:

Let's use the default values in the calculator to illustrate:

  • Current FCF (FCF0): $1,000,000
  • Explicit Forecast Period: 5 years
  • FCF Growth Rate: 10%
  • Perpetual Growth Rate: 2.5%
  • Discount Rate (WACC): 10%
  • Net Debt: $5,000,000
  • Cash & Equivalents: $2,000,000
  • Shares Outstanding: 10,000,000

Step 1: Project FCFs and their Present Values

  • Year 1 FCF: $1,000,000 * (1 + 0.10) = $1,100,000. PV = $1,100,000 / (1.10)^1 = $1,000,000.00
  • Year 2 FCF: $1,100,000 * (1 + 0.10) = $1,210,000. PV = $1,210,000 / (1.10)^2 = $1,000,000.00
  • Year 3 FCF: $1,210,000 * (1 + 0.10) = $1,331,000. PV = $1,331,000 / (1.10)^3 = $1,000,000.00
  • Year 4 FCF: $1,331,000 * (1 + 0.10) = $1,464,100. PV = $1,464,100 / (1.10)^4 = $1,000,000.00
  • Year 5 FCF: $1,464,100 * (1 + 0.10) = $1,610,510. PV = $1,610,510 / (1.10)^5 = $1,000,000.00

Sum of PV of Explicit FCFs = $5,000,000.00

Step 2: Calculate Terminal Value (TV)

  • FCF in Year 6 (FCF_n+1): $1,610,510 * (1 + 0.025) = $1,650,772.75
  • Terminal Value (TV): $1,650,772.75 / (0.10 – 0.025) = $22,010,303.33
  • Present Value of TV: $22,010,303.33 / (1.10)^5 = $13,666,666.67

Step 3: Calculate Enterprise Value (EV)

  • EV = Sum of PV of Explicit FCFs + PV of TV
  • EV = $5,000,000.00 + $13,666,666.67 = $18,666,666.67

Step 4: Calculate Equity Value

  • Equity Value = EV – Net Debt + Cash & Equivalents
  • Equity Value = $18,666,666.67 – $5,000,000 + $2,000,000 = $15,666,666.67

Step 5: Calculate Per Share Value

  • Per Share Value = Equity Value / Shares Outstanding
  • Per Share Value = $15,666,666.67 / 10,000,000 = $1.57

This example demonstrates how the calculator processes the inputs to arrive at the intrinsic value per share based on the projected future cash flows.

Leave a Reply

Your email address will not be published. Required fields are marked *