A AION Academy

Learn / Costing

Food manufacturing costing — the complete 2026 guide

How modern F&B factories actually compute their costs. Average vs standard cost, multi-level BOM rollup, WIP valuation, variance analysis, and the 2-day period close — with a worked example from a Saudi juice manufacturer running live in our demo.

TL;DR

If you only read three paragraphs

Costing in F&B is a margin problem, not an accounting problem. Most juice, dairy, bakery, and frozen factories above SAR 1M revenue compute unit cost in Excel using last year's standards, miss WIP entirely, and discover variance only when the auditor asks. The result is 5–12% of margin that disappears without anyone seeing it leave.

Modern costing is five capabilities working together. Multi-level BOM rollup (so finished-goods cost reflects current raw material prices). Cost layer tracking (so FIFO/average is mechanical, not guessed). WIP valuation per job (so the production floor stops hiding inventory). Variance analysis (material usage, labour efficiency, overhead — posted automatically as journals). Period close with crash recovery (so you close in two days, not three weeks).

AION ships all five. Live in our Saudi demo BG (Oasis Fresh Beverages Co.) running SAR-denominated books with ZATCA Phase 2 e-invoicing. The rest of this guide explains each capability, when to use which costing method, and how the numbers actually flow — anchored to source paths so you can verify every claim.

Section 1

Why F&B costing is uniquely hard

A general manufacturer makes one widget from three predictable raw materials at one supplier price. An F&B factory does none of these things.

Take a 1-litre carton of mango juice. The recipe is concentrate (imported in USD or EUR), sugar (local, but price moves with crop yields), citric acid (imported), vitamin C (imported), water (cheap, but real cost when treated for food grade), packaging (PET bottle, cap, label, shrink film, carton — each priced separately), and a slice of plant overhead. Six of those eight inputs change price month to month. The recipe yields between 95% and 102% of the planned output depending on viscosity, temperature, and how aggressively the operator filled the pasteurizer. The mango concentrate spoils on a 6-month clock. The finished good has 6–12 months of shelf life — but only if the cold chain holds.

This is why "cost per unit" in F&B is a moving target. The factory's CFO doesn't have a number — she has a range. And the difference between the bottom and top of that range, multiplied by 5 million units a year, is where the company's margin actually lives.

Four structural properties make F&B costing harder than general manufacturing:

  • Multi-currency raw materials. Most concentrate is imported. A Saudi or Qatari factory buys in USD, EUR, BRL, TRY simultaneously. An Egyptian factory feels every EGP devaluation in next month's COGS. Without FX-aware costing, the books drift.
  • Yield variance is systemic, not exceptional. A 2% loss on a bottling line is a normal day. The same 2% on revenue of SAR 65M is SAR 1.3M of margin to track. Standard cost without variance reporting hides this entirely.
  • WIP is always non-zero. Bulk mix tanks, pasteurised batches, palletised stock waiting for QA release — between raw material issue and finished-goods receipt there's always inventory in motion. If WIP balance isn't valued, the balance sheet is wrong.
  • Batch traceability is mandatory. Food-safety regulators (SFDA in Saudi, ETA Egypt, EFSA-aligned in the GCC) require lot tracking for every raw material that becomes part of a finished good. This isn't optional, and it shapes how costing has to work — every cost has to attach to a lot.

The rest of this guide is about how to handle each of these properly. None of it is theoretical — every claim ties back to a real product capability or a real seeded scenario in our demo BG.

Section 2

The three costing methods — and when each fits

Every ERP has to pick a costing method, and every F&B factory has to decide which one matches their reality. Three methods cover 95% of cases.

Average cost (periodic) — the default for most F&B SMBs

Average cost recalculates per-unit cost at period close from the formula opening balance value + value of receipts in period divided by opening quantity + receipts in period. Every issue in the period gets costed at this final number, and the balance carries forward as next month's opening.

This works well for F&B because most inputs are interchangeable (one barrel of mango concentrate from the same supplier is the same as the next barrel) and the period close gives a clean cost-per-unit that smooths short-term price variation. AION uses this as the default method per item.

Source: inventory.enum.ts CostingMethod.AVERAGE · close-costing-period.use-case.ts Steps 4 (recalculate) and 7 (cost outstanding issues).

Standard cost — when recipes are stable and you want to see leak

Standard cost holds a pre-computed rate per item and per resource. Production posts at standard cost; variance from actual posts to dedicated GL accounts. The discipline is hard — someone has to maintain the standards — but the reward is that every variance shows up in the financials, instead of being absorbed silently into COGS.

Standard cost fits factories that produce a stable SKU set, source most raw material from contracted suppliers, and want their CFO to see margin slippage as it happens. Less appropriate for a factory whose recipes change quarterly or whose suppliers vary widely.

Source: standard-cost-rollup.service.ts (FULL + SIMPLE modes) · variance-calculation.service.ts (material, labour, overhead variance posting).

Actual cost — rarely the right fit for F&B

Actual cost tracks every issue and every receipt at its specific cost. In F&B this is impractical because batch-to-batch variation, blended raw materials, and continuous-process production make it impossible to assign "this exact USD price" to "this exact bottle that came off the line." Theoretically supported in AION via cost layers (FIFO/LIFO scaffolding), but we don't recommend it for F&B SMBs.

Source: cost-layer.orm-entity.ts tracks per-receipt cost layers if needed.

Decision rule

Use average cost if you're under SAR 20M annual revenue and recipes change quarterly. Use standard cost if you're over SAR 50M and want CFO-level visibility into where margin disappears. Between those two, pick whichever is faster to administer for your finance team.

A full article walks through this decision in detail with worked numbers from the Oasis Fresh demo data: Standard vs actual cost in food manufacturing →

Section 3

Multi-level BOM rollup with phantom items

A juice 1L bottle isn't made from concentrate directly. There's an intermediate step — a bulk mix tank — where concentrate, sugar, acid, and water are blended. The bulk mix is then filled into bottles, capped, labelled, and packed into cases.

The bulk mix is a work-in-process (WIP) item. The bottle is a finished good (FG). The recipe relationship — bottle requires bulk mix requires concentrate + sugar + acid + water — is a multi-level BOM.

Some intermediate steps don't even need their own inventory line. A "blended fruit base" that exists only conceptually, never as a tracked item, is a phantom item. It exists in the BOM as a node but doesn't get stocked, valued, or counted. AION supports phantom items because real F&B recipes almost always have them — the alternative is bloating the item master with every conceptual sub-mix.

How rollup actually computes cost

For Oasis Mango Juice 1L (FG-SA-MNG-1L), the standard-cost rollup walks the recipe tree:

  1. Start at the FG node. Find the bulk-mix WIP and packaging components.
  2. For each component, recursively explode if it's also a BOM parent. Phantom items get exploded but don't contribute their own cost line — only their children do.
  3. At each leaf (a raw material or packaging item), pull the standard cost (or the current average cost, depending on the rollup mode).
  4. Multiply by the quantity-per-unit in the recipe. Sum.
  5. Add the routing-driven labour and overhead absorbed from the manufacturing resource definitions.
  6. The sum is the FG's rolled-up standard cost — written to the item master and used for production posting.

AION ships a FULL rollup (recursive multi-level, the default) and a SIMPLE rollup (one level, useful for shallow BOMs). A batch-cost rollup use case re-runs the calculation for every APPROVED or FROZEN BOM in the organisation at once — typically run after a raw-material price change.

Source: bom-explosion.service.ts · standard-cost-rollup.service.ts · batch-cost-rollup.use-case.ts

A full article works through a 3-level BOM rollup numerically: Multi-level BOM rollup for layered recipes →

Section 4

WIP valuation — what's on the production floor

At any moment, a running F&B factory has stock that's neither raw material nor finished good. A bulk-mix tank holding 5,000 litres of mango juice destined for tomorrow's bottling line. A pallet of pasteurised bottles waiting for QA release before they can move to the finished-goods warehouse. A partially completed run that the operator paused at end of shift.

All of that is work-in-process (WIP). It has real value — the raw materials are gone, the labour has been charged, the overhead has been absorbed — and the balance sheet should reflect it. Without WIP valuation, your inventory line is too low and your COGS is too high. The auditor will eventually catch this and adjust.

How AION calculates WIP per job

Every job order accumulates WIP transactions: material issued in (debit WIP, credit raw inventory), labour charged in (debit WIP, credit accrued payroll), overhead applied in (debit WIP, credit overhead absorption), completions out (credit WIP, debit finished goods), and scrap out (credit WIP, debit scrap expense or write-off).

The WIP balance at any moment is materials issued + resource charged + overhead charged − completion relief − scrap relief. AION runs this query against the wip_transaction table for any job order, and aggregates across jobs for the period-end WIP report.

Source: get-wip-valuation.use-case.ts · wip-transaction.orm-entity.ts

Why this matters for cash-flow management

A typical F&B factory holds 5–15% of monthly revenue in WIP. For Oasis Fresh at SAR 65M annual revenue, that's SAR 270K–810K of working capital tied up in production at any moment. Knowing this number — and watching whether it's growing or shrinking — is a leading indicator of operational health. WIP growing faster than revenue means production efficiency is dropping or QA hold times are increasing.

A full article on WIP balance reading: WIP valuation — the hidden number on the F&B balance sheet →

Section 5

Variance analysis — where margin actually leaks

If you only take one section from this guide, take this one. Variance analysis is the difference between a CFO who knows where the money went and a CFO who is permanently surprised.

Standard cost says: "for every 1,000 litres of bulk mango mix, we should use 65 kg of concentrate at SAR 42/kg, 80 kg of sugar at SAR 5/kg, and 0.5 kg of citric acid." If the actual job consumed 70 kg of concentrate (5 kg more) and only produced 980 litres (20 fewer), there's a story buried in those numbers. Variance analysis pulls the story out.

Material usage variance

Difference between actual quantity consumed and standard quantity allowed for the actual output. Calculated as (actual quantity − standard quantity for output) × standard cost. A negative variance means you consumed more than expected — typically waste, spillage, recipe drift, or measurement error.

Source: variance-calculation.service.ts:34-59

Labour efficiency variance

Difference between actual labour hours and standard hours allowed for actual output. Calculated as (actual hours − standard hours for output) × standard rate. Negative means the job took longer than the routing said. Could be operator skill, line setup time, or equipment delay.

Source: variance-calculation.service.ts:61-79

Overhead variance

Difference between actual overhead absorbed (based on the chosen driver — machine hours or labour hours) and the budgeted absorption for actual output. Negative variance often signals capacity under-utilisation, which is its own management problem.

Source: variance-calculation.service.ts:81+

What AION does and what's on the roadmap

The three variances above are posted automatically via the SLA engine — each gets its own GL account, and the variance report drills into the per-job detail.

On the roadmap: separate material price variance (today it's bundled into usage), standalone yield variance reporting (the yield numbers are captured per job — _standardYield, _actualYield, _yieldVariance — but there's no dedicated yield variance posting yet), and where-used reverse BOM analysis. We mention these as roadmap items, not current features.

Three deep-dive articles cover variance work specifically: Material usage variance · Labour efficiency variance · Yield variance — the 8% you're losing

Section 6

Period close in 2 days, not 3 weeks

Period close in most F&B factories takes 10–20 working days. Books that should reflect February's reality come out in late March. By the time anyone sees the numbers, the operational decisions they should drive are already out of date.

The closing time isn't about size — it's about how much work is manual. Every manual journal entry, every paper reconciliation, every "the accountant has to wait for the warehouse to send the spreadsheet" step adds days. Eliminate them and 2-day close is reachable for an SMB F&B factory.

The 5 steps of costing close in AION

  1. Import previous period averages. Opening balances carry forward from last month's final unit costs.
  2. Update purchased item costs. All receipts in the period get their landed cost composed and average cost recalculated.
  3. Cost job orders. Production runs that completed in the period get their actual cost computed from material + labour + overhead. (Marked as roadmap for primary feature use — average cost is the default flow today.)
  4. Update produced item costs. Finished goods receive the recalculated unit cost.
  5. Finalise. Sweep any uncosted issues in the period and apply the final cost. Mark the period as closed.

Each step is a unit of work in inv_costing_period_close_steps, so the close is resumable after a crash. If the API restarts halfway through step 4, the next close run picks up at step 4. This matters because real close runs touch millions of rows and you can't afford to start over.

Source: close-costing-period.use-case.ts · costing-close-processor.ts (SLA invocation for orphaned cost transactions)

Why the SLA engine matters

The SLA (Subledger Accounting) engine is what makes 2-day close achievable. Every operational transaction — receipt, issue, completion, scrap, transfer — has SLA rules that generate the matching GL journals. By the time you start the costing close, the GL is already mostly there. Close just trues up the cost averages and applies them to the issues that hadn't been costed yet.

Without SLA — which is what most F&B factories run on, either through Excel or through ERPs that require manual journals — every transaction is an opportunity for a missed posting, a wrong account, or a duplicate entry. Close time grows linearly with the manual journal count.

The full article goes deep on what each close step actually does and the crash-recovery flow: Period close in 2 days — the mechanics →

Section 7

How AION ties it all together

Walk a real cycle in the Oasis Fresh demo as cfo.saudi and watch each capability hand off to the next.

1. PO receipt

Cairo Citrus Co. ships 500 kg of mango concentrate at USD 42/kg. AION captures the FX rate at receipt, computes the SAR-equivalent landed cost (including freight and customs), and writes a cost layer.

2. BOM rollup

When the new concentrate price moves the average cost, the standard-cost rollup re-explodes the BOM tree. Bulk mango mix gets a new standard cost. Oasis Mango Juice 1L gets a new standard cost. All updated atomically.

3. Production

A job order issues 65 kg of concentrate (at standard) plus other raws and labour. WIP debits accumulate. Completion of 10,000 bottles relieves WIP and debits finished goods at standard cost.

4. Variance posting

The job actually consumed 67 kg (not 65). The SLA engine generates a material usage variance journal — 2 kg × SAR 42 = SAR 84 debit to variance, credit to WIP. Posted automatically.

5. Sale + COGS

Sale to Panda Retail Co. ships 2,000 bottles. AION posts COGS at the current finished-goods unit cost (debit COGS, credit FG inventory). Sales invoice carries ZATCA Phase 2 XML + QR.

6. Period close

End of month: 5-step costing close runs. Average costs recalculate. Uncosted issues are swept. WIP report aggregates per-job balances. Trial balance comes out on day 2.

Common questions

What is the difference between average cost, standard cost, and actual cost in F&B manufacturing?

Average cost recalculates per-unit cost continuously from opening balance + receipts in the period — the right default for most F&B SMBs. Standard cost holds a pre-set rate (per recipe and per resource) and posts variances against it — useful when your recipes are stable and you want to see margin leak. Actual cost tracks every transaction at its specific cost — rare in F&B because batch-to-batch variation makes it impractical. AION supports all three with a per-item configuration.

What is multi-level BOM rollup and why does it matter for juice factories?

A juice 1L bottle is made from a bulk mix (a WIP item), which is made from concentrate + sugar + acid + water + vitamin (raw materials). Multi-level rollup explodes the recipe through every layer — including phantom items that exist only as recipe nodes — to compute the finished good's standard cost from primary inputs. Without it, you cost finished goods at last year's number and your margin reports lie.

Why do F&B factories almost always have WIP on the production floor?

A bulk juice mix tank or pasteurised but unfilled batch sits in WIP until bottling completes. For a continuously running line, there's always something between raw material issue and finished good completion. The WIP balance can run 5–15% of monthly revenue and is invisible without proper accounting.

What does "variance analysis" mean in production costing?

When you produce 10,000 bottles, the recipe says you should have consumed X kg of concentrate at Y SAR. If you consumed more, that's a material usage variance. If labour took longer than the routing said, that's a labour efficiency variance. If your overhead absorbed differently than budgeted, that's an overhead variance. Variance reports show where margin disappeared.

How long should period close take for a typical F&B factory?

2 days end-to-end is achievable when costing is automated, the SLA engine generates GL journals from operational transactions, and the multi-step close has crash recovery. Most Excel-driven factories take 2–3 weeks because every cost adjustment is a manual journal entry, and reconciliation is paper-driven.

What costing capabilities does AION ship today versus on the roadmap?

Production-ready (live in the Oasis Fresh demo): average cost method, standard cost rollup (multi-level with phantom items), material usage variance, labour efficiency variance, overhead variance, WIP valuation per job, period close with crash recovery, multi-currency capture at receipt, cost layers (FIFO/LIFO scaffolding). On the roadmap (not yet primary features): job order costing as a standalone primary feature, separate material price variance, yield variance standalone reporting (data is captured), cost simulation / what-if pricing, FX revaluation on COGS, activity-based costing, where-used reverse BOM lookup.

Watch costing run in the live demo

Log into the Oasis Fresh BG as cfo.saudi and walk through a real cycle — receipt → BOM rollup → production → variance posting → period close. Every step in this guide is live, with real SAR numbers.