calculate_dcf
Compute a Discounted Cash Flow (DCF) valuation: enterprise value from projected free cash flows plus a Gordon-growth terminal value. WHEN TO USE: to value a company or asset from its projected free cash flows, WACC and perpetual terminal growth rate (standard corporate/asset valuation). WHEN NOT TO USE: for a single-exit lump-sum investment (use calculate_irr), or when you need the discount rate itself (use calculate_wacc). BEHAVIOUR: pure deterministic calculation — no side effects, no network or storage access; idempotent and non-destructive. Terminal value uses the Gordon Growth Model; it is only defined when wacc is strictly greater than terminal_growth_rate. RETURNS: JSON object { inputs, results: { present_value, terminal_value, enterprise_value } }, each rounded to 2dp. present_value is the discounted explicit-period FCFs; enterprise_value = present_value + discounted terminal value (debt and cash are NOT netted — this is enterprise value, not equity value). PARAMETERS: free_cash_flows (array of per-period projected free cash flows, typically positive; the first element is discounted by one period), wacc (decimal, e.g. 0.10 = 10% — never pass percentage points; must be > terminal_growth_rate), terminal_growth_rate (decimal perpetual growth rate, e.g. 0.03 = 3% — never pass percentage points; must be < wacc).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wacc | Yes | Weighted average cost of capital as a decimal, e.g. 0.10 = 10% (never pass percentage points). Must be strictly greater than terminal_growth_rate. | |
| free_cash_flows | Yes | Projected free cash flows per period, e.g. [5000000, 6000000, 7000000, 8000000, 9000000]. Typically positive; first element discounted one period. | |
| terminal_growth_rate | Yes | Perpetual terminal growth rate as a decimal, e.g. 0.03 = 3% (never pass percentage points). Must be strictly less than wacc, otherwise terminal value is undefined. |