DCF Model Skill
What is a DCF?
A Discounted Cash Flow (DCF) analysis is a method of valuing a company based on the cash it is expected to generate in the future. The core idea rests on one of the most fundamental principles in finance: the time value of money — a dollar today is worth more than a dollar tomorrow, because you could invest that dollar today and earn a return on it. Here is the intuition: if someone offered you 100 one year from now, you would take the 100 today or 100 in the meantime. If you could earn 5% risk-free, then 105 in a year — so the $110 offer is better. This is discounting in reverse. A DCF works the same way, but for an entire company. You project how much free cash flow the company will generate over the next 5-10 years, then “discount” those future cash flows back to today’s value using a rate that reflects the riskiness of those cash flows (called the discount rate or WACC). The sum of all those discounted cash flows, plus a “terminal value” representing everything beyond your projection period, equals the company’s enterprise value. Quick numeric example: Suppose a company will generate 100M next year is worth 90.9M** today. If the same company generates 110M / (1.10)^2 = $90.9M today as well. The farther out the cash flow, the less it is worth today — that is the time value of money at work. DCF is considered the gold standard for intrinsic valuation because it does not depend on what the market currently thinks a company is worth. Instead, it asks: “Based on what this company will actually earn, what should it be worth?” This makes it especially valuable when the market may be over- or under-pricing a company relative to its fundamentals.Detailed Worked Example
Let us walk through a complete, simplified DCF for WidgetCo, a fictional manufacturing company. Assumptions:- Last twelve months (LTM) revenue: $500M
- LTM EBITDA margin: 20% (EBITDA = $100M)
- Revenue growth: 12% Year 1, 10% Year 2, 8% Year 3, 6% Year 4, 5% Year 5
- EBITDA margin: stable at 20%
- Tax rate: 25%
- D&A: 3% of revenue
- CapEx: 5% of revenue
- Change in NWC: 1% of incremental revenue
- WACC: 10%
- Terminal growth rate: 2.5%
- Net debt: $150M
- Diluted shares: 50M
Calculate Free Cash Flow
| Year | Revenue | EBIT | NOPAT | D&A | CapEx | dNWC | uFCF |
|---|---|---|---|---|---|---|---|
| 1 | $560.0M | $95.2M | $71.4M | $16.8M | $28.0M | $0.6M | $59.6M |
| 2 | $616.0M | $104.7M | $78.5M | $18.5M | $30.8M | $0.6M | $65.7M |
| 3 | $665.3M | $113.1M | $84.8M | $20.0M | $33.3M | $0.5M | $71.0M |
| 4 | $705.2M | $119.9M | $89.9M | $21.2M | $35.3M | $0.4M | $75.4M |
| 5 | $740.5M | $125.9M | $94.4M | $22.2M | $37.0M | $0.4M | $79.3M |
Discount Cash Flows (Mid-Year Convention)
| Year | uFCF | Period | Discount Factor (1/1.10^n) | PV of FCF |
|---|---|---|---|---|
| 1 | $59.6M | 0.5 | 0.9535 | $56.8M |
| 2 | $65.7M | 1.5 | 0.8668 | $56.9M |
| 3 | $71.0M | 2.5 | 0.7880 | $55.9M |
| 4 | $75.4M | 3.5 | 0.7164 | $54.0M |
| 5 | $79.3M | 4.5 | 0.6512 | $51.6M |
| Total | $275.3M |
Calculate Terminal Value
Why It Matters
DCF analysis is used across virtually every corner of finance:- Investment bankers build DCFs to advise clients on fair valuations for mergers, acquisitions, and IPOs. A buyer wants to know “what is this company actually worth?” before offering a price.
- Equity researchers use DCFs to generate price targets for stocks. If the DCF implies a price significantly above the current stock price, the analyst might recommend buying.
- Private equity firms use DCFs alongside LBO models to evaluate whether an acquisition will generate acceptable returns.
- Corporate finance teams use DCFs to evaluate capital projects — should we build a new factory? Launch a new product? The DCF answers whether the future cash flows justify the investment.
Key Concepts
| Term | Definition | Why It Matters |
|---|---|---|
| Free Cash Flow (FCF) | Cash generated by the business after all operating expenses and capital investments. Calculated as EBIT x (1 - Tax Rate) + D&A - CapEx - Change in Working Capital. | This is the cash actually available to investors — it is what you are valuing in a DCF. |
| WACC | Weighted Average Cost of Capital. The blended rate of return required by both equity and debt investors, weighted by the company’s capital structure. | This is your discount rate — it reflects how risky the company’s cash flows are. Higher risk = higher WACC = lower present value. |
| Terminal Value | The value of all cash flows beyond your explicit projection period. Calculated using either the perpetuity growth method or exit multiple method. | Typically represents 50-70% of total enterprise value. Getting this wrong can swing the entire valuation. |
| Discount Factor | The multiplier used to convert a future cash flow to its present value. Equals 1 / (1 + WACC)^n where n is the time period. | This is the mechanical step that implements the time value of money. |
| Enterprise Value (EV) | The total value of the business — equity plus net debt. The sum of PV of projected FCFs + PV of terminal value. | This is the headline output of the DCF before bridging to equity value. |
| Equity Value | Enterprise Value minus net debt. Divided by shares outstanding to get implied price per share. | This is what you compare to the current stock price to determine if the company is over- or under-valued. |
| CAPM | Capital Asset Pricing Model. Used to calculate the cost of equity: Risk-Free Rate + Beta x Equity Risk Premium. | Provides a theoretically grounded way to estimate what return equity investors require for bearing this company’s risk. |
| Beta | A measure of a stock’s volatility relative to the overall market. Beta of 1.0 = moves with the market. Beta > 1.0 = more volatile. | Higher beta means higher cost of equity, which means higher WACC, which means lower valuation — all else equal. |
| Sensitivity Analysis | Tables showing how the valuation changes when you vary key assumptions (WACC, terminal growth rate, exit multiple). | No DCF assumption is certain. Sensitivity tables show the range of reasonable outcomes and which assumptions matter most. |
How It Works
Triggers automatically when: users need to value a company using DCF methodology, request intrinsic value analysis, or ask for detailed financial modeling with growth projections and terminal value calculations.Environment: Office JS vs Python/openpyxl
- Office JS (Excel Add-in)
- Python/openpyxl (Standalone .xlsx)
range.formulas = [["=D19*(1+$B$8)"]]. No separate recalc step needed; Excel calculates natively. Use range.format.* for styling. Never use range.values for derived cells.Merged cell pitfall: Do NOT call .merge() then set .values on the merged range — it throws InvalidArgument. Instead write value to the top-left cell alone, then merge and format:Step 1: Data Retrieval and Validation
Data Source Priority:- MCP Servers (if configured) — Daloopa, FactSet, S&P Global, Morningstar
- User-Provided Data — Historical financials from their research
- Web Search/Fetch — Current prices, beta, debt and cash when needed
- Verify net debt vs. net cash (critical for valuation)
- Confirm diluted shares outstanding (check for recent buybacks/issuances)
- Validate historical margins are consistent with business model
- Cross-check revenue growth rates with industry benchmarks
- Verify tax rate is reasonable (typically 21-28%)
"Source: [System/Document], [Date], [Reference], [URL if applicable]". Every blue input must have a comment before moving to the next section.
Step 2: Historical Analysis (3-5 Years)
Before projecting the future, you need to understand the past. Analyze:- Revenue growth trends: Calculate CAGR, identify drivers
- Margin progression: Track gross margin, EBIT margin, FCF margin
- Capital intensity: D&A and CapEx as % of revenue
- Working capital efficiency: NWC changes as % of revenue growth
- Return metrics: ROIC, ROE trends
Step 3: Revenue Projections
Revenue is the top line that drives everything else. The projection should reflect a gradual moderation from current growth toward a sustainable long-term rate:- Year 1-2: Higher growth reflecting near-term visibility
- Year 3-4: Gradual moderation toward industry average
- Year 5+: Approaching terminal growth rate
| Scenario | Revenue Growth |
|---|---|
| Bear Case | Conservative (e.g., 8-12%) |
| Base Case | Most likely (e.g., 12-16%) |
| Bull Case | Optimistic (e.g., 16-20%) |
=IF($B$6=1,[Bear cell],IF($B$6=2,[Base cell],[Bull cell])) so the entire model flexes when the scenario selector changes.
Step 4: Operating Expense Modeling
Model each expense line as a percentage of revenue, with operating leverage (percentages declining as revenue scales):- Sales & Marketing: 15-40% of revenue
- Research & Development: 10-30% for technology companies
- General & Administrative: 8-15% of revenue
Step 5: Free Cash Flow Calculation
Step 6: WACC Calculation
Cost of Equity (using CAPM):| Company Type | WACC Range |
|---|---|
| Large Cap, Stable | 7-9% |
| Growth Companies | 9-12% |
| High Growth/Risk | 12-15% |
Step 7: Discounting Cash Flows
Use mid-year convention (cash flows assumed to occur mid-year):- Discount Period: 0.5, 1.5, 2.5, 3.5, 4.5
- Discount Factor = 1 / (1 + WACC)^Period
Step 8: Terminal Value
Perpetuity Growth Method (Preferred):| Approach | Range |
|---|---|
| Conservative | 2.0-2.5% (GDP growth rate) |
| Moderate | 2.5-3.5% |
| Aggressive | 3.5-5.0% (market leaders only) |
Step 9: Enterprise to Equity Value Bridge
Step 10: Sensitivity Analysis
Build three sensitivity tables:- WACC vs. Terminal Growth — How the valuation changes with different discount rates and long-term growth assumptions
- Revenue Growth vs. EBIT Margin — Impact of top-line growth and operating leverage
- Beta vs. Risk-Free Rate — Sensitivity to cost of equity components
- Use odd dimensions (5x5 or 7x7) for a true center cell
- Center cell = base case (highlighted in medium-blue
#BDD7EEwith bold font) - Every cell must contain a full DCF recalculation formula
- Axis values symmetric around base case (e.g., if base WACC = 9.0%, axis =
[7.0%, 8.0%, 9.0%, 10.0%, 11.0%]) - Use openpyxl or Office JS loops to write formulas programmatically — no placeholders or manual steps
Model Layout Planning
Step-by-Step User Verification
Do NOT build the entire model end-to-end. Verify with the user at each checkpoint:After Data Retrieval
After Revenue Projections
After Terminal Value + PV
Formatting Standards
Fill Color Palette (Professional Blues and Greys):| Element | Fill Color | Font |
|---|---|---|
| Section headers | Dark blue #1F4E79 | White bold |
| Column headers | Light blue #D9E1F2 | Black bold |
| Input cells | Light grey #F2F2F2 or white | Blue #0000FF |
| Formula cells | White | Black |
| Key outputs (EV, equity value, share price) | Medium blue #BDD7EE | Black bold |
- Currency:
$#,##0;($#,##0)or$#,##0.0 - Percentages:
0.0% - Multiples:
0.0"x" - All numeric cells right-aligned
Formula Recalculation
Runpython recalc.py model.xlsx 30 before delivery. Fix ALL errors until status is “success.” Zero formula errors required.
Common Mistakes
1. Terminal value dominates the valuation (>75% of EV)
1. Terminal value dominates the valuation (>75% of EV)
2. WACC uses book values for capital structure weights
2. WACC uses book values for capital structure weights
3. Including interest expense in Free Cash Flow
3. Including interest expense in Free Cash Flow
4. Double-counting the tax shield
4. Double-counting the tax shield
5. Terminal growth rate exceeds long-term GDP growth
5. Terminal growth rate exceeds long-term GDP growth
6. Forgetting to discount the terminal value back to present
6. Forgetting to discount the terminal value back to present
7. Not verifying the DCF against comps
7. Not verifying the DCF against comps
8. Hardcoding values instead of using formulas
8. Hardcoding values instead of using formulas
revenue * margin in Python and write the number. But the resulting model is static.The fix: Every derived cell must contain a formula. Write ws["D20"] = "=D19*(1+$B$8)", not ws["D20"] = 627.2. The model must update automatically when any assumption changes.9. Using end-of-year convention instead of mid-year
9. Using end-of-year convention instead of mid-year
10. Wrong share count in the equity bridge
10. Wrong share count in the equity bridge
Daily Workflow
Scenario 1: Equity Research Price Target Update
Scenario 1: Equity Research Price Target Update
- Update historical actuals with the new Q4 data (revenue, margins, CapEx)
- Revise your revenue growth assumptions for Years 1-5 to reflect the guidance raise
- Check whether the beat changes your margin trajectory assumptions
- Update the current stock price, 10-year Treasury yield, and beta
- Recalculate WACC if cost of equity inputs changed materially
- Run the model and compare the new implied price to the prior target
- Build a sensitivity table showing the range of outcomes under different growth/margin scenarios
- Draft the price target revision note explaining which assumptions changed and why
Scenario 2: M&A Buy-Side Advisory Valuation
Scenario 2: M&A Buy-Side Advisory Valuation
- Gather the target’s historical financials from the CIM (Confidential Information Memorandum)
- Build revenue projections using the target’s historical CAGR and management’s forward guidance
- Model operating expenses to reflect margin improvement from scale (the acquirer’s thesis)
- Calculate WACC using public comps’ betas as a proxy (the target is private)
- Build the DCF with Bear/Base/Bull scenarios reflecting different integration outcomes
- Present a valuation range (e.g., 1.1B) with the sensitivity tables showing which assumptions drive the range
- Cross-check against precedent transaction multiples and public comps
Scenario 3: Corporate Capital Allocation Decision
Scenario 3: Corporate Capital Allocation Decision
- Project the incremental cash flows from the facility over 10 years
- Use the company’s existing WACC as the discount rate (since the facility has similar risk)
- Calculate NPV: PV of incremental FCFs minus the $50M upfront investment
- If NPV is positive, the project creates value. If negative, the capital is better deployed elsewhere.
- Build a sensitivity table on revenue ramp and EBITDA margin to show the breakeven assumptions
- Present to the CFO with a clear recommendation and the range of outcomes
Practice Exercise
Scenario: You are asked to value TechServ Inc., a B2B SaaS company. Given Information:- LTM Revenue: $200M, growing 25% YoY
- LTM EBITDA: $30M (15% margin)
- Management guides FY+1 revenue of $240M and expects EBITDA margins to expand to 18% by Year 3
- Tax rate: 22%
- D&A: 4% of revenue; CapEx: 6% of revenue
- Change in NWC: 2% of incremental revenue
- Current stock price: 50M
- Risk-free rate: 4.2%; Beta: 1.35; ERP: 5.5%; No debt
- Project revenue for 5 years (Year 1: $240M per guidance, then moderate growth toward 10% by Year 5)
- Model EBITDA margin expansion from 15% to 18% by Year 3, stable thereafter
- Calculate unlevered FCF for each year
- Calculate WACC (note: no debt, so WACC = cost of equity)
- Discount FCFs and calculate terminal value (use 3.0% terminal growth)
- Bridge to equity value (remember: net cash of $50M is added, not subtracted)
- Calculate implied price per share and compare to $45.00 market price
- Build a 5x5 sensitivity table (WACC vs. terminal growth rate)