{"uid":"cap_tiZFXrtcIOhy8nIRXvnYF","slug":"money-allocate-fowler-s-algorithm-320f4db7","name":"Money Allocate – Fowler's Algorithm","description":"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.","url":"https://x402.agentindex.world/money/allocate?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"ratios":{"type":"array","items":{"type":"integer"},"title":"Ratios","minItems":1},"amount_cents":{"type":"integer","title":"Amount Cents","minimum":0}}},"responseSchema":{"type":"json","example":{"allocations":[2,2,1]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_IKmd7SEdTrjwcghKYwik9","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Splits an integer amount of cents among N integer ratios with zero rounding loss, guaranteeing the parts always sum to the original amount.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Split restaurant bill by meal cost","prompt":"We have a group bill of $84.00 (8400 cents) to split among 4 people who ordered meals costing $22, $18, $25, and $19 respectively — use those as the ratios and make sure the total adds up exactly."},{"title":"Allocate revenue shares to co-founders","prompt":"We earned $10,000 (1000000 cents) in revenue this month and need to split it between two founders with a 60/40 equity split — give me the exact cent amounts with zero rounding error."},{"title":"Distribute subscription cost across departments","prompt":"Our $299.99 (29999 cents) SaaS subscription should be allocated to 3 departments by headcount: 12, 7, and 5 employees — what does each department owe in cents, making sure it adds up exactly?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-16T12:41:14.814Z","isFirstParty":false,"canonicalSlug":"money-allocate-fowler-s-algorithm-320f4db7"}