Skip to content
TotalFinance

Value a company

A discounted-cash-flow valuation with a full two-way sensitivity table, where every cell is a real valuation.

Run it

Live, in your browser. Nothing leaves this page.

Local
$1,000,000.00

USD

6%

decimal · each forecast year

10%

decimal · user assumption

2.5%

decimal · below discount rate

Change any input; everything updates.

Enterprise value
$14,939,965
USD · not equity value
Forecast present value
$4,226,680
USD
Terminal present value
$10,713,284
USD
Terminal share of value
71.71%
of enterprise value
Enterprise value by discount rate and terminal growthEach cell is a full discounted-cash-flow valuation with one row and one column value substituted. The outlined cell is your base case.
8.50%9.00%9.50%10.00%10.50%11.00%11.50%15.71M16.58M17.58M18.74M20.12M21.78M23.8M14.7M15.45M16.3M17.28M18.43M19.78M21.41M13.81M14.46M15.19M16.03M16.99M18.12M19.45M13.02M13.59M14.22M14.94M15.76M16.71M17.81M12.32M12.81M13.37M13.99M14.7M15.5M16.43M11.68M12.12M12.61M13.15M13.76M14.46M15.25M11.11M11.5M11.93M12.41M12.94M13.54M14.22M1.00%1.50%2.00%2.50%3.00%3.50%4.00%Terminal growthRows: Annual discount rate
Show data (7 rows)
Annual discount rate \ Terminal growth1.00%1.50%2.00%2.50%3.00%3.50%4.00%
8.50%15.71M16.58M17.58M18.74M20.12M21.78M23.8M
9.00%14.7M15.45M16.3M17.28M18.43M19.78M21.41M
9.50%13.81M14.46M15.19M16.03M16.99M18.12M19.45M
10.00%13.02M13.59M14.22M14.94M15.76M16.71M17.81M
10.50%12.32M12.81M13.37M13.99M14.7M15.5M16.43M
11.00%11.68M12.12M12.61M13.15M13.76M14.46M15.25M
11.50%11.11M11.5M11.93M12.41M12.94M13.54M14.22M
Enterprise value along the discount-rate axisThe base-case terminal growth column of the table: value falls as the discount rate rises.
Base case
Show data (7 rows)
Annual discount rateTerminal growth 2.5%
8.50%18.74M
9.00%17.28M
9.50%16.03M
10.00%14.94M
10.50%13.99M
11.00%13.15M
11.50%12.41M

Assumptions & conventions

What the calculation assumed, echoed by the library rather than hidden.

valuation.contractVersion
1
valuation.modelVersion
1
valuation.valuationDate
2026-01-01
valuation.currency
USD
valuation.valuationBasis
firm
valuation.annualDiscountRate
0.1
valuation.discountRateSource
user-supplied
valuation.compounding
annual
valuation.dayCount
ACT/365F
valuation.terminalValueMethod.method
perpetual-growth
valuation.terminalValueMethod.terminalCashFlow
1,262,476.96
valuation.terminalValueMethod.perpetualGrowthRate
0.025
valuation.terminalCashFlowConvention
final-forecast-period-flow
valuation.bridgeDecision
no-bridge-supplied-equity-value-absent
valuation.shareCountDecision
no-shares-supplied-per-share-absent
sensitivity.rowVariable
annual-discount-rate
sensitivity.rowUnit
annual decimal rate
sensitivity.columnVariable
perpetual-growth-rate
sensitivity.columnUnit
annual decimal rate
sensitivity.cellValue
enterpriseValue

Diagnostics & warnings

No warnings. Engine, method and convergence details:

valuation.projectedPeriodCount
5
valuation.terminalValueShareOfValue
0.717089
valuation.exclusions
none

Use it in your project

Returns a valuation report. This example prints three selected fields from the firm-basis report, in USD. The sensitivity table is a separate set of full valuations, not a required conversion of the answer.

First call
import { discountedCashFlow, type DiscountedCashFlowInput } from '@insiderfinance/totalfinance/valuation';

const input: DiscountedCashFlowInput = {
  "valuationBasis": "firm",
  "valuationDate": "2026-01-01",
  "currency": "USD",
  "projectedCashFlows": [
    {
      "timeYears": 1,
      "amount": 1000000
    },
    {
      "timeYears": 2,
      "amount": 1060000
    },
    {
      "timeYears": 3,
      "amount": 1123600.0000000002
    },
    {
      "timeYears": 4,
      "amount": 1191016.0000000002
    },
    {
      "timeYears": 5,
      "amount": 1262476.9600000004
    }
  ],
  "annualDiscountRate": 0.1,
  "compounding": "annual",
  "terminalValueMethod": {
    "method": "perpetual-growth",
    "terminalCashFlow": 1262476.9600000004,
    "perpetualGrowthRate": 0.025
  }
};
const valuation = discountedCashFlow(input);
if (valuation.valuationBasis !== 'firm') throw new Error('Expected firm basis.');
const result = {
  enterpriseValue: valuation.enterpriseValue,
  projectedCashFlowPresentValue: valuation.projectedCashFlowPresentValue,
  terminalValuePresentValue: valuation.terminalValuePresentValue,
};
console.log(result);
Output of this example
{
  "enterpriseValue": 14939964.574368779,
  "projectedCashFlowPresentValue": 4226680.095125146,
  "terminalValuePresentValue": 10713284.479243632
}
Reproduce this entire calculator
Full result object

Both examples use the inputs of the last successful calculation. Displayed metrics are rounded; copied programs keep exact values. Every copy on this page is type-checked and executed against the packed package in CI.

Ask your AI agent

With the TotalFinance docs MCP connected, your agent looks up the exact API and writes the code. The prompt below uses your current inputs.

Prompt

Using the TotalFinance docs MCP, read the reference for discountedCashFlow, then write TypeScript with @insiderfinance/totalfinance that values a company whose first-year free cash flow is 1,000,000 USD growing 6% a year, discounted at 10% with 2.5% perpetual growth. Show the assumptions the result reports.

Connect Claude, Cursor, VS Code, Codex or ChatGPT

What this calculates

discountedCashFlow discounts a forecast of free cash flow plus a terminal value. Firm-basis cash flows (FCFF) produce enterprise value, not equity value: no debt, cash or share count is invented for you. discountedCashFlowSensitivityTable re-runs the same valuation for every pair of discount rate and terminal growth, so each cell equals a direct discountedCashFlow call by construction.

Reading the heatmap

Rows are discount rates and columns are terminal growth rates; darker cells are higher enterprise values. The outlined cell is your base case. A valuation that swings widely across neighbouring cells is telling you how much of the answer is assumption.

Watch the terminal share

The terminal share of value metric reports how much of enterprise value comes from the terminal value. When it dominates, the discount rate and terminal growth, which are assumptions rather than market facts, drive the answer.

Edit this page on GitHub ↗Every code block on this site is executed in CI against the library.