# Free-Cash-Flow DCF

`D18-F02-A01` · Fundamental Analysis and Valuation → Intrinsic Valuation · archetype `record-transform` · difficulty 4/5 · verification **verified**

Full page: https://docs.thefintechbuilder.com/fundamental-analysis-and-valuation/intrinsic-valuation/free-cash-flow-dcf/
Agent skill: `npx skills add IslamBaraka90/Fintech-Algorithms-Library` — https://docs.thefintechbuilder.com/guides/agent-skill/

## Install and import

```bash
npm install fintech-algorithms
```

```ts
import { freeCashFlowDcf } from "fintech-algorithms/fundamental-analysis-and-valuation/intrinsic-valuation/free-cash-flow-dcf";
```

## Signature

```ts
freeCashFlowDcf(data)
```

Discounts an explicit free-cash-flow-to-the-firm forecast at the WACC and adds a growing-perpetuity terminal value built from the last forecast period, then bridges the resulting enterprise value to equity value and to value per diluted share.

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `data` | `{ fcff: number[]; wacc: number; terminal_growth: number; cash_and_non_operating_assets: number; debt: number; preferred_equity: number; noncontrolling_interest: number; diluted_shares: number }` | yes | `fcff` holds the explicit forecast, one finite number per period, discounted at periods 1 through n. `wacc` is the discount rate and `terminal_growth` grows the final `fcff` entry into the terminal cash flow. The bridge takes `cash_and_non_operating_assets` less `debt`, `preferred_equity` and `noncontrolling_interest`, and `diluted_shares` divides equity value. Other keys in the record are not read. |

## Returns

`{ state: string; method: string; schedule: { period: number; fcff: number; discount_factor: number; present_value: number }[]; pv_explicit_fcff: number; terminal_fcff: number; terminal_value: number; terminal_discount_factor: number; pv_terminal_value: number; terminal_value_share: number; enterprise_value: number; net_equity_bridge: number; equity_value: number; intrinsic_value_per_share: number }`

A `schedule` row per forecast period carrying its `discount_factor` and `present_value`, alongside `pv_explicit_fcff`, the terminal block (`terminal_fcff`, `terminal_value`, `terminal_discount_factor`, `pv_terminal_value`), and the bridge (`enterprise_value`, `net_equity_bridge`, `equity_value`, `intrinsic_value_per_share`). `terminal_value_share` is the terminal present value over enterprise value, emitted as 0 when enterprise value is 0.

## Errors

- When `data` is absent, an array, or not an object — throws Error
- When `fcff` is not an array holding at least one finite number — throws Error
- When `wacc` is not strictly between 0 and 1 — throws Error
- When `terminal_growth` is at or below -1, or at or above `wacc` — throws Error
- When any bridge item is not a finite number, or `diluted_shares` is not positive — throws Error

## Complexity

Time `O(n)`, space `O(n)`.

## Worked example

Captured by running this function on the input its own test provides. Real output of real code — but not asserted against a published figure.

### Input

`data`:

```json
{
  "valuation_date": "2026-08-04",
  "currency": "USD",
  "unit_scale": "millions except per-share",
  "fcff": [90, 100, 112, 124, 136],
  "wacc": 0.09,
  "terminal_growth": 0.03,
  "cash_and_non_operating_assets": 120,
  "debt": 450,
  "preferred_equity": 20,
  "noncontrolling_interest": 10,
  "diluted_shares": 100
}
```

### Call

```ts
freeCashFlowDcf(data)
```

### Returns

object with 13 fields: state, method, schedule, pv_explicit_fcff, terminal_fcff, terminal_value, terminal_discount_factor, pv_terminal_value, …

```json
{
  "state": "valued",
  "method": "fcff-enterprise-dcf",
  "schedule": [
    {
      "period": 1,
      "fcff": 90,
      "discount_factor": 0.9174311926605504,
      "present_value": 82.56880733944953
    },
    {
      "period": 2,
      "fcff": 100,
      "discount_factor": 0.84167999326656,
      "present_value": 84.167999326656
    },
    {
      "period": 3,
      "fcff": 112,
      "discount_factor": 0.772183480061064,
      "present_value": 86.48454976683917
    }
  ],
  "pv_explicit_fcff": 429.45675114160395,
  "terminal_fcff": 140.08,
  "terminal_value": 2334.666666666667,
  "terminal_discount_factor": 0.6499313862983452,
  "pv_terminal_value": 1517.3731432112036,
  "terminal_value_share": 0.7794071519102238,
  "enterprise_value": 1946.8298943528075,
  "net_equity_bridge": -360,
  "equity_value": 1586.8298943528075,
  "intrinsic_value_per_share": 15.868298943528075
}
```

## Other exports

`calculate`, `dividendDiscountModel`, `gordonGrowthModel`, `residualIncomeModel`, `economicValueAdded`. Every module additionally exports `run` as an alias of its primary
function, and a `meta` object carrying its catalog id, domain, family, shape and article URL.

## Verification and provenance

Tier: **verified** (via D).

The worked example below is the figure published in this algorithm's article, replayed and asserted by the test suite on every build. The arithmetic cannot drift without the build failing.

Both tiers guarantee the signature. Full explanation: https://docs.thefintechbuilder.com/guides/verification/

Generated from the docs.json payload shipped inside fintech-algorithms@0.13.0.
The signature and parameter list are checked against the compiled implementation at build time,
so a description that contradicts the code fails the build rather than reaching this file.

## Links

- Article (how it works, step by step): https://thefintechbuilder.com/fundamental-analysis-and-valuation/intrinsic-valuation/free-cash-flow-dcf/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/fundamental-analysis-and-valuation/intrinsic-valuation/free-cash-flow-dcf/impl.ts
- Package on npm: https://www.npmjs.com/package/fintech-algorithms
- Domain index for agents: https://docs.thefintechbuilder.com/fundamental-analysis-and-valuation/llms.txt
