Home / Businesses / Inventory Costing: FIFO, LIFO, Weighted Average
Inventory Costing: FIFO, LIFO, Weighted Average
Cost of goods sold and ending inventory under FIFO, LIFO and weighted average from purchase layers and sales, periodic or perpetual, adding up to the cent and signed.
Testing
- What it does
- Cost of goods sold and ending inventory under FIFO, LIFO and weighted average from purchase layers and sales, periodic or perpetual, adding up to the cent and signed.
- Who it is for
- Businesses.
- Start in one step
- Ask your agent to call
inventory_fifo_lifoat llpro.ai/mcp (free, no sign-up). This page explains the tool; it has no form to run it. - What to expect
- Testing: open to try. Free
New to this? Start here.
What it does
Inventory Costing: FIFO, LIFO, Weighted Average is for agents that close the books for a business that holds stock (retail, wholesale, ecommerce) and must show what cost of goods sold and ending inventory are under each cost flow method. Work out cost of goods sold and ending inventory under FIFO, LIFO and weighted average cost from the purchases and sales of one item. Send the events in order (opening inventory is a purchase on the first line; each event is a purchase with units and unit cost, or a sale with units) and say whether your books are periodic or perpetual. Get back, for each of the three methods, cost of goods sold, ending units and ending inventory value (and the layers left for FIFO and LIFO, or the average cost), plus how much more cost LIFO puts into cost of goods sold than FIFO. Cost of goods sold plus ending inventory always equals the cost of goods available, to the cent. It is one of the Accounting department tools LLPRO builds for the work agents do across business software (QuickBooks, Xero, NetSuite, FreshBooks, Wave). Every answer carries the written rule it used, what it does not do, its sources with dates, and an Ed25519 signature you can check against the key below.
- Who it is for
- Agents that close the books for a business that holds stock (retail, wholesale, ecommerce) and must show what cost of goods sold and ending inventory are under each cost flow method.
- Price
- Free, no sign-up: 120 calls an hour per address and 3,000 an hour across all callers. Paid calls are planned and not charging.
- Limits
- Up to 30,000 bytes per call, events up to 200 entries; larger requests are refused, never cut. Unknown fields are refused with the list of accepted ones. Money takes up to 2 decimals unless a field says more, and every sum is exact (send amounts as numbers or strings; commas only as thousands separators, 1,234.56). Nothing you send is stored by the tool; no model and no network are used. Does not choose a method for you: IFRS (IAS 2 paragraph 25) does not allow LIFO, and in the United States a business using LIFO for tax must also use it in its financial reports (Internal Revenue Code section 472(c)) and elects it on Form 970. Does not apply lower of cost and net realisable value (or market), write-downs, shrinkage, freight or landed-cost allocation, returns, purchase discounts, or LIFO pools and dollar-value LIFO (one item only). Does not read your records: the events you send are taken as given. Not accounting or tax advice.
For developers: try it
POST https://llpro.ai/mcp
{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "inventory_fifo_lifo", "arguments": {"system": "periodic", "events": [{"kind": "purchase", "units": 100, "unit_cost": "10.00"}, {"kind": "purchase", "units": 200, "unit_cost": "12.00"}, {"kind": "purchase", "units": 100, "unit_cost": "14.00"}, {"kind": "sale", "units": 250}]}}}For agents
Tool inventory_fifo_lifo on https://llpro.ai/mcp and in the tools list. Signed answers are checked with the public key below (signer llpro1:g4w263gyrztbx3wbzhyajzb6t4): an Ed25519 signature over the observation as canonical JSON (sorted keys, no spaces).
Public key (base64): 4xhMcDIIgGAFEN0mp74QyeaQr5vg2U43TE6yT3OBXFM=
For agents that search MCP registries for FIFO, LIFO, weighted average cost tools (listed in MCP registries, served by the LLPRO gateway: MCP, agent-to-agent and REST). One fixed, written rule per call, a signed record, no account needed.
Next
- Connect your agent: Use this and the other LLPRO tools from your own agent.
- Get your agent: No agent yet? Get one that asks first.
- Hand the whole job to LLPRO: Inventory costing is one step of closing the books. Tell LLPRO the whole job; it routes you to the right signed tools.
For agents: this page as Markdown · JSON · llms.txt · MCP endpoint llpro.ai/mcp · agent card