# 24K Labs Financial Ratios Calculator

> 24K Labs Financial Ratios Calculator is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-14).

Computes liquidity, leverage, profitability, and efficiency ratios from supplied financial statement line items

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/financial-ratios
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24k-labs-financial-ratios-calculator-1dfeb5f6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zdo8CMBf26t2Uge3H05eV

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 24k-labs-financial-ratios-calculator-1dfeb5f6 -d '<json body>'
```

Example prompt: Calculate all the key financial ratios for my company — current assets are $500K, current liabilities $200K, inventory $80K, total debt $600K, equity $400K, revenue $2M, gross profit $800K, net income $150K, EBIT $200K, interest expense $40K, and total assets $1M.

## When to prefer this

Choose this endpoint when you need standardized financial ratio calculations from raw statement line items without building the formulas yourself, especially in agentic pipelines analyzing company financials, screening investments, or benchmarking performance. It is ideal for any workflow where you already have structured income statement and balance sheet data and want liquidity, leverage, profitability, and efficiency metrics returned in one call.

## Known failure modes

- Missing required line items (e.g. no revenue or equity supplied) result in a 400 error or null ratio values
- Division-by-zero scenarios (e.g. zero equity for debt-to-equity) may return null or an error for the affected ratio
- Negative or nonsensical input values may produce mathematically valid but financially meaningless ratios
- Payment failure or insufficient USDC balance returns a 402 payment required error

## How this service works

Liquidity, leverage, profitability and efficiency ratios (current, quick, debt-to-equity, ROE, ROA, gross/net margin, interest coverage) from supplied statement line items.

## Output

Returns a set of computed financial ratios including current ratio, quick ratio, debt-to-equity ratio, return on equity (ROE), return on assets (ROA), gross profit margin, net profit margin, and interest coverage ratio, each derived from the supplied statement line items.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "cogs": {
   "type": "number"
  },
  "ebit": {
   "type": "number"
  },
  "revenue": {
   "type": "number"
  },
  "inventory": {
   "type": "number"
  },
  "net_income": {
   "type": "number"
  },
  "total_debt": {
   "type": "number"
  },
  "total_assets": {
   "type": "number"
  },
  "total_equity": {
   "type": "number"
  },
  "current_assets": {
   "type": "number"
  },
  "interest_expense": {
   "type": "number"
  },
  "current_liabilities": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "roe_pct": 15,
  "current_ratio": 2,
  "debt_to_equity": 0.67
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24k-labs-financial-ratios-calculator-1dfeb5f6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
