# Money Allocate – Fowler's Algorithm

> Money Allocate – Fowler's Algorithm is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-16).

Splits an integer amount of cents among N integer ratios with zero rounding loss, guaranteeing the parts always sum to the original amount.

## Facts

- Endpoint: GET https://x402.agentindex.world/money/allocate?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/money-allocate-fowler-s-algorithm-320f4db7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tiZFXrtcIOhy8nIRXvnYF

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 money-allocate-fowler-s-algorithm-320f4db7
```

Example prompt: Split $127.43 (12743 cents) among three parties using ratios 3, 2, and 1 — make sure all the parts add up exactly to the total with no rounding loss.

## When to prefer this

Choose this endpoint when you need mathematically exact integer cent allocation with zero rounding loss — especially when splitting among multiple parties by arbitrary weighted ratios and the sum must always equal the original total. Prefer over floating-point division or custom code when correctness and auditability of cent-level allocation matter, such as in financial, billing, or revenue-sharing contexts.

## Known failure modes

- Empty ratios array (minItems:1 violated) returns a validation error
- Negative amount_cents (minimum:0 violated) returns a validation error
- Non-integer ratio values cause schema validation failure
- All-zero ratios array may cause division-by-zero error
- Network or payment failure returns HTTP 402 or timeout

## How this service works

Split an integer amount of cents among N ratios with zero rounding loss (Fowler's allocation algorithm) - the parts always sum back to the original amount.

## Output

An array of integer cent amounts, one per input ratio, that sum exactly to the original amount_cents. Rounding remainders are distributed using Fowler's algorithm so no cent is lost or double-counted.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ratios": {
   "type": "array",
   "items": {
    "type": "integer"
   },
   "title": "Ratios",
   "minItems": 1
  },
  "amount_cents": {
   "type": "integer",
   "title": "Amount Cents",
   "minimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "allocations": [
   2,
   2,
   1
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/money-allocate-fowler-s-algorithm-320f4db7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
