# Altman Z-Score

`D18-F04-A01` · Fundamental Analysis and Valuation → Quality and Distress · archetype `record-transform` · difficulty 2/5 · verification **verified**

Full page: https://docs.thefintechbuilder.com/fundamental-analysis-and-valuation/quality-and-distress/altman-z-score/
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 { altmanZScore } from "fintech-algorithms/fundamental-analysis-and-valuation/quality-and-distress/altman-z-score";
```

## Signature

```ts
altmanZScore(data)
```

Computes the original 1968 five-factor Altman Z-Score for a public manufacturer, weighting working capital, retained earnings, EBIT and sales against total assets and market equity against total liabilities, and places the result in the distress, grey or safe zone.

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `data` | `{ total_assets: number; total_liabilities: number; working_capital: number; retained_earnings: number; ebit: number; market_value_equity: number; sales: number }` | yes | One point-in-time accounting record. The function reads `total_assets` and `total_liabilities` as the two denominators, and `working_capital`, `retained_earnings`, `ebit`, `market_value_equity` and `sales` as the five numerators. |

## Returns

`{ state: string; method: string; ratios: { working_capital_to_assets: number; retained_earnings_to_assets: number; ebit_to_assets: number; market_equity_to_liabilities: number; sales_to_assets: number }; contributions: { working_capital: number; retained_earnings: number; ebit: number; market_equity: number; sales: number }; z_score: number; zone: string; threshold_policy: string }`

`ratios` holds the five raw ratios and `contributions` the same ratios after the 1.2, 1.4, 3.3, 0.6 and 1.0 coefficients. `z_score` is their sum. `zone` is `distress-zone` below 1.81, `safe-zone` above 2.99 and `grey-zone` between; `threshold_policy` restates those cutoffs, `method` is `altman-1968-public-manufacturer` and `state` is `calculated`.

## Errors

- When data is not a plain object — throws TypeError
- When any field read is missing or not a finite number — throws TypeError
- When total_assets or total_liabilities is zero or negative — throws RangeError
- When market_value_equity is negative — throws RangeError

## Complexity

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

## 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
{
  "working_capital": 200,
  "retained_earnings": 300,
  "ebit": 160,
  "market_value_equity": 700,
  "total_liabilities": 500,
  "sales": 1200,
  "total_assets": 1000
}
```

### Call

```ts
altmanZScore(data)
```

### Returns

object with 7 fields: state, method, ratios, contributions, z_score, zone, threshold_policy

```json
{
  "state": "calculated",
  "method": "altman-1968-public-manufacturer",
  "ratios": {
    "working_capital_to_assets": 0.2,
    "retained_earnings_to_assets": 0.3,
    "ebit_to_assets": 0.16,
    "market_equity_to_liabilities": 1.4,
    "sales_to_assets": 1.2
  },
  "contributions": {
    "working_capital": 0.24,
    "retained_earnings": 0.42,
    "ebit": 0.528,
    "market_equity": 0.84,
    "sales": 1.2
  },
  "z_score": 3.2279999999999998,
  "zone": "safe-zone",
  "threshold_policy": "distress<1.81; grey=1.81..2.99; safe>2.99"
}
```

## Other exports

`calculate`, `piotroskiFScore`, `beneishMScore`, `sloanAccrualMeasure`, `ohlsonOScore`, `zmijewskiXScore`, `springateSScore`, `tafflerZScore`, `fulmerHScore`, `groverGScore`, `dechowFScoreForMisstatementRisk`, `dechowDichevAccrualQuality`, `modifiedJonesDiscretionaryAccrualModel`. 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/quality-and-distress/altman-z-score/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/fundamental-analysis-and-valuation/quality-and-distress/altman-z-score/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
