{"id":"dcf-valuation-compute","version":"1.0.0","description":"Enterprise and equity value from forecast free cash flows with a Gordon or exit-multiple terminal value.","supported_operations":["discounted cash flow valuation","DCF with terminal value","Gordon growth terminal value","enterprise value from free cash flow forecast","exit multiple terminal value DCF","mid-year convention DCF","equity value from enterprise value and net debt","terminal value as a share of enterprise value"],"unsupported_operations":["estimating WACC, beta or the cost of equity","forecasting free cash flows from financial statements","terminal value discounted at N minus one half under the mid-year convention","minority interests, preferred equity, leases or tax adjustments in the equity bridge"],"semantics":["Inputs: cash_flows (forecast free cash flows for years 1 to N, N from 1 to 200 decimal strings, first flow is year 1, any sign), discount_rate (annual rate as a decimal fraction, greater than -1 and at most 100), terminal (required object: either {method: gordon-growth, growth_rate} with growth_rate a decimal greater than -1 and at most 100, or {method: exit-multiple, multiple, terminal_metric} with multiple a decimal from 0 to 1000000 and terminal_metric any decimal, for example the year-N EBITDA), mid_year (boolean, default false), net_debt (optional decimal, negative means net cash), scale (0 to 12, default 2, for amounts), rate_scale (0 to 12, default 10, for terminal_value_share) and rounding (default half-up). There is no year-0 flow: the valuation date is the start of year 1.","Discounting: the flow of year t (t = 1 .. N) is discounted by (1+r)^t (end-of-year convention, mid_year false) or by (1+r)^(t - 0.5) (mid-year convention, mid_year true), with r = discount_rate; (1+r)^(t-0.5) is computed as (1+r)^(t-1) times the square root of (1+r). pv_cash_flows[t-1] = cash_flow_t / that factor.","Terminal value at the end of year N: gordon-growth TV = cash_flow_N * (1+g) / (r - g), where cash_flow_N is the LAST listed flow and g = growth_rate (the next flow is FCF_N*(1+g); it is not built from FCF_N alone); it requires g < r, otherwise not_computable (details.reason growth_not_below_rate). exit-multiple TV = multiple * terminal_metric.","Terminal value discounting: under BOTH methods and regardless of mid_year, pv_terminal_value = terminal_value / (1+r)^N (discounted N whole years, not N - 0.5). This is a stated convention of this tool; practitioners who discount a Gordon terminal value at N - 0.5 under the mid-year convention must adjust the result themselves (multiply pv_terminal_value by (1+r)^0.5).","Results: sum_pv_cash_flows = sum of pv_cash_flows; enterprise_value = sum_pv_cash_flows + pv_terminal_value; terminal_value_share = pv_terminal_value / enterprise_value (a fraction, rounded to rate_scale; it can be negative or above 1 when flows or enterprise value are negative) or null when enterprise_value is exactly 0; equity_value = enterprise_value - net_debt, or null when net_debt is not supplied. Nothing else (tax, minority interests, cash) is deducted.","Exact path: each discounted flow, the terminal value and the discounted terminal value is computed with an absolute error below 1e-33 and rounded half-even to 30 fractional digits (so exact results such as 110/1.1 = 100 are recovered exactly); sums and differences of these values are exact; every output is then rounded once from the unrounded value to scale (or rate_scale for the share) with the rounding mode. The printed pv_cash_flows can therefore differ from the printed sum_pv_cash_flows by units of the last digit.","If any discounted flow, terminal value, discounted terminal value or enterprise value reaches 1e20 in magnitude the result is not_computable (details.reason overflow); this happens only with a negative discount rate or extreme inputs.","More than 200 cash flows, or a decimal string longer than 64 UTF-8 bytes, is limit_exceeded, checked before parsing. Percent values are not accepted: 0.1 means 10 percent per year. Output pv_cash_flows always has one entry per input flow.","Every rounded output is rounded exactly once from the unrounded value using the rounding mode: half-up (ties away from zero, the default), half-even, half-down (ties toward zero), up (away from zero), down (toward zero), ceiling, floor. Amount outputs print exactly scale fractional digits and rate-like outputs exactly rate_scale fractional digits; a result that rounds to zero prints without a minus sign (never '-0.00').","Decimal string fields (amounts, rates) must match ^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$ with at most 20 integer digits and at most 20 fractional digits; a JSON number, exponent form, leading plus, surrounding spaces, percent sign, missing integer part or trailing dot is invalid_input. Rates are decimal fractions (0.065 means 6.5 percent; \"6.5\" means 650 percent). A decimal string longer than 64 UTF-8 bytes is limit_exceeded, checked before parsing.","Disclaimer: arithmetic calculation only; not financial, tax, legal, or investment advice."],"limits":{"max_items":200,"max_string_bytes":64},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["cash_flows","discount_rate","terminal"],"properties":{"cash_flows":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$","maxLength":64}},"discount_rate":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$","maxLength":64},"terminal":{"oneOf":[{"type":"object","additionalProperties":false,"required":["method","growth_rate"],"properties":{"method":{"type":"string","enum":["gordon-growth"]},"growth_rate":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$","maxLength":64}}},{"type":"object","additionalProperties":false,"required":["method","multiple","terminal_metric"],"properties":{"method":{"type":"string","enum":["exit-multiple"]},"multiple":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$","maxLength":64},"terminal_metric":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$","maxLength":64}}}]},"mid_year":{"type":"boolean"},"net_debt":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$","maxLength":64},"scale":{"type":"integer","minimum":0,"maximum":12},"rate_scale":{"type":"integer","minimum":0,"maximum":12},"rounding":{"type":"string","enum":["half-up","half-even","half-down","up","down","ceiling","floor"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["pv_cash_flows","sum_pv_cash_flows","terminal_value","pv_terminal_value","enterprise_value","terminal_value_share","equity_value"],"properties":{"pv_cash_flows":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$","maxLength":64}},"sum_pv_cash_flows":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$","maxLength":64},"terminal_value":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$","maxLength":64},"pv_terminal_value":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$","maxLength":64},"enterprise_value":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$","maxLength":64},"terminal_value_share":{"type":["string","null"],"pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$","maxLength":64},"equity_value":{"type":["string","null"],"pattern":"^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$","maxLength":64}}},"examples":[{"input":{"cash_flows":["8000","9200","10000","12000","14500"],"discount_rate":"0.08","terminal":{"method":"exit-multiple","multiple":"0","terminal_metric":"0"}},"output":{"pv_cash_flows":["7407.41","7887.52","7938.32","8820.36","9868.46"],"sum_pv_cash_flows":"41922.06","terminal_value":"0.00","pv_terminal_value":"0.00","enterprise_value":"41922.06","terminal_value_share":"0.0000000000","equity_value":null}},{"input":{"cash_flows":["100","110","120","130","140"],"discount_rate":"0.09","terminal":{"method":"gordon-growth","growth_rate":"0.03"}},"output":{"pv_cash_flows":["91.74","92.58","92.66","92.10","90.99"],"sum_pv_cash_flows":"460.08","terminal_value":"2403.33","pv_terminal_value":"1562.00","enterprise_value":"2022.08","terminal_value_share":"0.7724737867","equity_value":null}}],"execute_url":"/v1/tools/dcf-valuation-compute/versions/1.0.0/execute"}